aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnthony Iliopoulos <ailiop@suse.com>2024-02-01 17:17:32 +0100
committerZorro Lang <zlang@kernel.org>2024-03-01 19:24:16 +0800
commit28928ea7af864f6f38133122c8f739e4f658f46a (patch)
tree6cb480dff2306e848b3bd8dafd8f4c70f411b84b
parentcc23dcb3ebe6fe6ab8307da183e660717eea38fc (diff)
downloadxfstests-dev-28928ea7af864f6f38133122c8f739e4f658f46a.tar.gz
generic/682: update and fix-up golden output
coreutils v9.4 introduced a change in the error output of mv under certain errno values via commit 3cb862ce5f10 ("mv: better diagnostic for 'mv dir x' failure"), which broke the golden output. Update golden output to match the change, and further add an output filter to avoid having the test fail on environments that ran with an older coreutils release, taken from commit d9323ad7a05e ("generic/245: Filter mv error message"). Signed-off-by: Anthony Iliopoulos <ailiop@suse.com> Reviewed-by: Andrey Albershteyn <aalbersh@redhat.com> Signed-off-by: Zorro Lang <zlang@kernel.org>
-rwxr-xr-xtests/generic/6828
-rw-r--r--tests/generic/682.out2
2 files changed, 8 insertions, 2 deletions
diff --git a/tests/generic/682 b/tests/generic/682
index a51d183387..417598804b 100755
--- a/tests/generic/682
+++ b/tests/generic/682
@@ -54,6 +54,12 @@ repquota -upn $SCRATCH_MNT >> $seqres.full
echo $(ls $scratchdir | wc -l) files in $scratchdir >> $seqres.full
ls -sld $scratchdir >> $seqres.full
+_filter_mv_output()
+{
+ sed -e "s,cannot move .* to \(.*\):\(.*\),cannot overwrite \1:\2,g" \
+ -e 's/y[0-9]*/yXXX/g'
+}
+
# Fail at renaming into the directory as qa_user to ensure quota enforcement
# works
chmod a+rwx $stagedir
@@ -62,7 +68,7 @@ for ((i = 0; i < dirents; i++)); do
name=$(printf "y%0254d" $i)
ln $scratchfile $stagedir/$name
su - "$qa_user" -c "mv $stagedir/$name $scratchdir/$name" 2>&1 | \
- _filter_scratch | sed -e 's/y[0-9]*/yXXX/g'
+ _filter_scratch | _filter_mv_output
test "${PIPESTATUS[0]}" -ne 0 && break
done
repquota -upn $SCRATCH_MNT >> $seqres.full
diff --git a/tests/generic/682.out b/tests/generic/682.out
index b747081172..db22d5f604 100644
--- a/tests/generic/682.out
+++ b/tests/generic/682.out
@@ -1,3 +1,3 @@
QA output created by 682
-mv: cannot move 'SCRATCH_MNT/staging/yXXX' to 'SCRATCH_MNT/dir/yXXX': Disk quota exceeded
+mv: cannot overwrite 'SCRATCH_MNT/dir/yXXX': Disk quota exceeded
Silence is golden