@@ -478,6 +478,14 @@ _filter_stat()
sed -e "s/\<cannot stat\>/cannot statx/"
}
+# touch v9.0+ modified part of the message printed on error. Filter the
+# generic part out, but preserve the strerror() part, which is
+# actually useful for debugging and usually stable.
+_filter_touch()
+{
+ sed -e "s/.* '\(.*\)':\(.*\)/touch: '\1':\2/"
+}
+
_filter_lostfound()
{
sed -e '/^lost+found$/d'
@@ -44,6 +44,11 @@ jp_file2=$(echo -e "japanese_\xe3\x82\xb1\xe3\x82\x99.txt")
blob_file1=$(echo -e "corac\xcc\xa7\xc3")
blob_file2=$(echo -e "coraƧ\xc3")
+filter_touch()
+{
+ _filter_touch | _filter_scratch
+}
+
# Test helpers
basic_create_lookup()
{
@@ -456,8 +461,8 @@ test_strict_mode_invalid_filename()
# These creation commands should fail, since we are on strict
# mode.
- touch "${basedir}/${blob_file1}" 2>&1 | _filter_scratch
- touch "${basedir}/${blob_file2}" 2>&1 | _filter_scratch
+ touch "${basedir}/${blob_file1}" 2>&1 | filter_touch
+ touch "${basedir}/${blob_file2}" 2>&1 | filter_touch
}
#############
@@ -12,5 +12,5 @@ user.foo="bar"
# file: SCRATCH_MNT/xattrs/x/f1
user.foo="bar"
-touch: setting times of 'SCRATCH_MNT/strict/corac'$'\314\247\303': Invalid argument
-touch: setting times of 'SCRATCH_MNT/strict/cora'$'\303\247\303': Invalid argument
+touch: 'SCRATCH_MNT/strict/corac'$'\314\247\303': Invalid argument
+touch: 'SCRATCH_MNT/strict/cora'$'\303\247\303': Invalid argument