* [PATCH 1/2] common: Escape SCRATCH_DEV variable
@ 2021-03-24 22:48 André Almeida
2021-03-24 22:48 ` [PATCH 2/2] generic/556: Fix rename test André Almeida
2021-03-24 22:55 ` [PATCH 1/2] common: Escape SCRATCH_DEV variable Gabriel Krisman Bertazi
0 siblings, 2 replies; 3+ messages in thread
From: André Almeida @ 2021-03-24 22:48 UTC (permalink / raw)
To: fstests; +Cc: krisman, kernel, Lakshmipathi . G, Eryu Guan, André Almeida
Escape SCRATCH_DEV variable so it prints its name, instead of printing
the value. If the value is "", the error message will not be very
informative.
Signed-off-by: André Almeida <andrealmeid@collabora.com>
---
common/rc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/common/rc b/common/rc
index 6d1757da..fc1a7751 100644
--- a/common/rc
+++ b/common/rc
@@ -1537,7 +1537,7 @@ _require_scratch_nocheck()
tmpfs)
if [ -z "$SCRATCH_DEV" -o ! -d "$SCRATCH_MNT" ];
then
- _notrun "this test requires a valid \$SCRATCH_MNT and unique $SCRATCH_DEV"
+ _notrun "this test requires a valid \$SCRATCH_MNT and unique \$SCRATCH_DEV"
fi
;;
ubifs)
--
2.31.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH 2/2] generic/556: Fix rename test
2021-03-24 22:48 [PATCH 1/2] common: Escape SCRATCH_DEV variable André Almeida
@ 2021-03-24 22:48 ` André Almeida
2021-03-24 22:55 ` [PATCH 1/2] common: Escape SCRATCH_DEV variable Gabriel Krisman Bertazi
1 sibling, 0 replies; 3+ messages in thread
From: André Almeida @ 2021-03-24 22:48 UTC (permalink / raw)
To: fstests; +Cc: krisman, kernel, Lakshmipathi . G, Eryu Guan, André Almeida
Casefold rename test should check if renaming a file to an equivalent
name fails as expect (e.g. renaming from "file.txt" to "FILE.TXT") and
`mv` correctly identifies that those names refers to the same file.
Currently, the test doesn't do what is expected given that it doesn't
have the file to be renamed, and `mv` returns "No such file or
directory". Fix that by creating test files and checking the correct
output.
Fixes: 12b7dddbc265fcb ("generic: Add tests for filename casefolding feature")
Signed-off-by: André Almeida <andrealmeid@collabora.com>
---
tests/generic/556 | 4 +++-
tests/generic/556.out | 2 +-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/tests/generic/556 b/tests/generic/556
index 3efd0510..3145188c 100755
--- a/tests/generic/556
+++ b/tests/generic/556
@@ -341,8 +341,10 @@ test_file_rename()
mkdir -p ${basedir}
_casefold_set_attr ${basedir}
+ touch ${basedir}/rename
+
# Move to an equivalent name should not work
- mv ${basedir}/rename ${basedir}/rename 2>&1 | \
+ mv ${basedir}/rename ${basedir}/RENAME 2>&1 | \
_filter_scratch
_casefold_check_exact_name ${basedir} "rename" || \
diff --git a/tests/generic/556.out b/tests/generic/556.out
index 47656065..f9dd9542 100644
--- a/tests/generic/556.out
+++ b/tests/generic/556.out
@@ -5,7 +5,7 @@ SCRATCH_MNT/casefold_flag_removal Casefold
SCRATCH_MNT/casefold_flag_removal Casefold
SCRATCH_MNT/flag_inheritance/d1/d2/d3 Casefold
SCRATCH_MNT/symlink/ind1/TARGET
-mv: cannot stat 'SCRATCH_MNT/rename/rename': No such file or directory
+mv: 'SCRATCH_MNT/rename/rename' and 'SCRATCH_MNT/rename/RENAME' are the same file
# file: SCRATCH_MNT/xattrs/x
user.foo="bar"
--
2.31.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 1/2] common: Escape SCRATCH_DEV variable
2021-03-24 22:48 [PATCH 1/2] common: Escape SCRATCH_DEV variable André Almeida
2021-03-24 22:48 ` [PATCH 2/2] generic/556: Fix rename test André Almeida
@ 2021-03-24 22:55 ` Gabriel Krisman Bertazi
1 sibling, 0 replies; 3+ messages in thread
From: Gabriel Krisman Bertazi @ 2021-03-24 22:55 UTC (permalink / raw)
To: André Almeida; +Cc: fstests, kernel, Lakshmipathi . G, Eryu Guan
André Almeida <andrealmeid@collabora.com> writes:
> Escape SCRATCH_DEV variable so it prints its name, instead of printing
> the value. If the value is "", the error message will not be very
> informative.
>
> Signed-off-by: André Almeida <andrealmeid@collabora.com>
cover letter is missing. Other than that, for the entire series:
Reviewed-by: Gabriel Krisman Bertazi <krisman@collabora.com>
--
Gabriel Krisman Bertazi
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-03-24 22:56 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-24 22:48 [PATCH 1/2] common: Escape SCRATCH_DEV variable André Almeida
2021-03-24 22:48 ` [PATCH 2/2] generic/556: Fix rename test André Almeida
2021-03-24 22:55 ` [PATCH 1/2] common: Escape SCRATCH_DEV variable Gabriel Krisman Bertazi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).