]> www.infradead.org Git - users/hch/xfstests-dev.git/commitdiff
btrfs/315: update filter to match mount cmd
authorAn Long <lan@suse.com>
Fri, 11 Oct 2024 06:12:16 +0000 (14:12 +0800)
committerZorro Lang <zlang@kernel.org>
Sat, 12 Oct 2024 14:06:30 +0000 (22:06 +0800)
Mount error info changed since util-linux v2.40
(91ea38e libmount: report failed syscall name).
So update _filter_mount_error() to match it.

Signed-off-by: An Long <lan@suse.com>
Reviewed-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: Zorro Lang <zlang@redhat.com>
Signed-off-by: Zorro Lang <zlang@kernel.org>
tests/btrfs/315

index 5852afadd86a7d672e9690b03822ab933c5895a2..e6589abec08ce8e29e50fb84a7d2ac6c5ea10d15 100755 (executable)
@@ -39,7 +39,12 @@ _filter_mount_error()
        # mount: <mnt-point>: fsconfig system call failed: File exists.
        # dmesg(1) may have more information after failed mount system call.
 
-       grep -v dmesg | _filter_test_dir | sed -e "s/mount(2)\|fsconfig//g"
+       # For util-linux v2.4 and later:
+       # mount: <mountpoint>: mount system call failed: File exists.
+
+       grep -v dmesg | _filter_test_dir | \
+               sed -e "s/mount(2)\|fsconfig//g" \
+                   -e "s/mount\( system call failed:\)/\1/"
 }
 
 seed_device_must_fail()