mirror of
https://github.com/versity/scoutfs.git
synced 2026-05-01 02:15:44 +00:00
mv overwrite error format changes in el10
This is somewhat cumbersome, we want to see the error message, but the format changes enough to make this messy. We opt to change the golden to the new format, which only shows one of the arguments in its error output: the thing that cannot be overwritten. We then add a filter that rewrites the old output format with sed patterns to be exactly like the new format, so this will work everywhere again, without changing or adding filters to obscure error messages. Signed-off-by: Auke Kok <auke.kok@versity.com>
This commit is contained in:
@@ -47,7 +47,7 @@ four
|
||||
--- dir within dir
|
||||
--- overwrite file
|
||||
--- can't overwrite non-empty dir
|
||||
mv: cannot move '/mnt/test/test/basic-posix-consistency/dir/c/clobber' to '/mnt/test/test/basic-posix-consistency/dir/a/dir': Directory not empty
|
||||
mv: cannot overwrite '/mnt/test/test/basic-posix-consistency/dir/a/dir': Directory not empty
|
||||
--- can overwrite empty dir
|
||||
--- can rename into root
|
||||
== path resoluion
|
||||
|
||||
@@ -138,7 +138,9 @@ echo "--- can't overwrite non-empty dir"
|
||||
mkdir "$T_D0/dir/a/dir"
|
||||
touch "$T_D0/dir/a/dir/nope"
|
||||
mkdir "$T_D1/dir/c/clobber"
|
||||
mv -T "$T_D1/dir/c/clobber" "$T_D1/dir/a/dir" 2>&1 | t_filter_fs
|
||||
mv -T "$T_D1/dir/c/clobber" "$T_D1/dir/a/dir" 2>&1 | \
|
||||
sed "s@mv: cannot move '.*' to '\(.*\)': Directory not empty@mv: cannot overwrite '\1': Directory not empty@g" | \
|
||||
t_filter_fs
|
||||
find "$T_D0/dir" -ls 2>&1 | t_filter_fs > "$T_TMP.0"
|
||||
find "$T_D1/dir" -ls 2>&1 | t_filter_fs > "$T_TMP.1"
|
||||
diff -u "$T_TMP.0" "$T_TMP.1"
|
||||
|
||||
Reference in New Issue
Block a user