btrfs/315: update 315.out to adapt mount cmd
PATCH 1/1 btrfs/315: update 315.out to adapt mount cmd
Mount error info changed since util-linux v2.40
(91ea38e libmount: report failed syscall name).
So add "mount" before "system call failed".
--- tests/btrfs/315.out | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tests/btrfs/315.out +0 -0
@@ -1,7 +1,7 @@ QA output created by 315 ---- seed_device_must_fail ---- mount: SCRATCH_MNT: WARNING: source write-protected, mounted read-
only.
-mount: TEST_DIR/315/tempfsid_mnt: system call failed: File exists. +mount: TEST_DIR/315/tempfsid_mnt: mount system call failed: File exists.
---- device_add_must_fail ----
wrote 9000/9000 bytes at offset 0
XXX Bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
Signature · 1 line
2.43.0
Quoted 19 lines · An Long
Mount error info changed since util-linux v2.40
(91ea38e libmount: report failed syscall name).
So add "mount" before "system call failed".Signed-off-by An Long <[email protected]>--- tests/btrfs/315.out | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)tests/btrfs/315.out +0
-0@@ -1,7 +1,7 @@ QA output created by 315 ---- seed_device_must_fail ---- mount: SCRATCH_MNT: WARNING: source write-protected, mounted read-only.
tests/btrfs/315.out
Quoted 2 lines
tests/btrfs/315.out +1
-1-mount: TEST_DIR/315/tempfsid_mnt: system call failed: File exists. +mount: TEST_DIR/315/tempfsid_mnt: mount system call failed: File
So this makes the test pass with util-linux v2.40+, but makes it fail with older versions.
The expectation that everyone is soon upgrading to v2.40 is unrealistic and some distros, especially enterprise ones, may take a long time to upgrade.
What we do in fstests is to create a filter function that converts the output, so that the test runs with any version of util-linux (or any other package).
Check common/filter, namely the _filter_error_mount() function.
Also, when modifying btrfs tests, please also CC [email protected].
Thanks.
Quoted 8 lines
exists.
----device_add_must_fail----
wrote 9000/9000 bytes at offset 0
XXX Bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
--
2.43.0
Quoted 18 lines · An Long
Mount error info changed since util-linux v2.40
(91ea38e libmount: report failed syscall name).
So add "mount" before "system call failed".Signed-off-by An Long <[email protected]>--- tests/btrfs/315.out | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)tests/btrfs/315.out +0
-0@@ -1,7 +1,7 @@ QA output created by 315 ---- seed_device_must_fail ---- mount: SCRATCH_MNT: WARNING: source write-protected, mounted read-only.
tests/btrfs/315.out
Quoted 2 lines
tests/btrfs/315.out +1
-1-mount: TEST_DIR/315/tempfsid_mnt: system call failed: File exists. +mount: TEST_DIR/315/tempfsid_mnt: mount system call failed: File
This change will bring failure to downstream distro. Please refer to _filter_error_mount (or other filters you like), add new filter to it to help this test passed on old and new util-linux.
Thanks,
Zorro
Quoted 8 lines
exists.
----device_add_must_fail----
wrote 9000/9000 bytes at offset 0
XXX Bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)Signature · 1 line
2.43.0
Quoted 11 lines · Zorro Lang
Quoted 9 lines · An Long
Mount error info changed since util-linux v2.40
(91ea38e libmount: report failed syscall name).
So add "mount" before "system call failed".Signed-off-by An Long <[email protected]>--- tests/btrfs/315.out | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 15 lines
tests/btrfs/315.out
Quoted 11 lines
tests/btrfs/315.out +0
-0@@ -1,7 +1,7 @@ QA output created by 315 ---- seed_device_must_fail ---- mount: SCRATCH_MNT: WARNING: source write-protected, mounted read-only.
tests/btrfs/315.out +1
-1-mount: TEST_DIR/315/tempfsid_mnt: system call failed: File exists. +mount: TEST_DIR/315/tempfsid_mnt: mount system call failed: FileThis change will bring failure to downstream distro. Please refer to
_filter_error_mount(or other filters you like), add new filter to it to help this test passed on old and new util-linux.
Isn't that what I said in my previous reply [1]?
[1] https://lore.kernel.org/fstests/CAL3q7H7fzCQE0qjZEgeAJ2jvBsJxbYN-S=XpWFu5KDoaXgqsZQ@mail.gmail.com/
Quoted 15 lines
Thanks,
ZorroQuoted 8 lines
exists.
----device_add_must_fail----
wrote 9000/9000 bytes at offset 0
XXX Bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
--
2.43.0
Quoted 28 lines · Filipe Manana
Quoted 11 lines · Zorro Lang
Quoted 9 lines · An Long
Mount error info changed since util-linux v2.40
(91ea38e libmount: report failed syscall name).
So add "mount" before "system call failed".Signed-off-by An Long <[email protected]>--- tests/btrfs/315.out | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)Quoted 15 lines
tests/btrfs/315.out
Quoted 11 lines
tests/btrfs/315.out +0
-0@@ -1,7 +1,7 @@ QA output created by 315 ---- seed_device_must_fail ---- mount: SCRATCH_MNT: WARNING: source write-protected, mounted read-only.
tests/btrfs/315.out +1
-1-mount: TEST_DIR/315/tempfsid_mnt: system call failed: File exists. +mount: TEST_DIR/315/tempfsid_mnt: mount system call failed: FileThis change will bring failure to downstream distro. Please refer to
_filter_error_mount(or other filters you like), add new filter to it to help this test passed on old and new util-linux.
Quoted 3 lines
Isn't that what I said in my previous reply [1]?
[1] https://lore.kernel.org/fstests/CAL3q7H7fzCQE0qjZEgeAJ2jvBsJxbYN-S=XpWFu5KDoaXgqsZQ@mail.gmail.com/
Oh, sorry I replied directly due to I thought my old change when I saw this patch.
commit e937e23d202173d112cfe7621d8b860f691ce42d
Author: Zorro Lang <[email protected]>
Date: Fri May 27 20:11:15 2022 +0800
common/filter: filter out extra mount error output
Sure, you're right, thanks for reviewing :)
Thanks,
Zorro
Quoted 17 lines
Quoted 16 lines
Thanks,
ZorroQuoted 8 lines
exists.
----device_add_must_fail----
wrote 9000/9000 bytes at offset 0
XXX Bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
--
2.43.0
Quoted 47 lines · Zorro Lang
Quoted 34 lines · Filipe Manana
Quoted 23 lines · Zorro Lang
Quoted 21 lines · An Long
Mount error info changed since util-linux v2.40
(91ea38e libmount: report failed syscall name).
So add "mount" before "system call failed".Signed-off-by An Long <[email protected]>---
tests/btrfs/315.out | 2 +-1 file changed, 1 insertion(+), 1 deletion(-)tests/btrfs/315.out +0
-0@@ -1,7 +1,7 @@QA output created by 315
----seed_device_must_fail----
mount:SCRATCH_MNT: WARNING: source write-protected, mounted read-
only.
-mount: TEST_DIR/315/tempfsid_mnt: system call failed: File exists.Quoted 8 lines
Quoted 2 lines
+mount: TEST_DIR/315/tempfsid_mnt: mount system call failed:
FileThis change will bring failure to downstream distro. Please refer to
_filter_error_mount(or other filters you like), add new filter to
it to help this test passed on old and new util-linux.Quoted 4 lines
Isn't that what I said in my previous reply [1]?
[1]
https://lore.kernel.org/fstests/CAL3q7H7fzCQE0qjZEgeAJ2jvBsJxbYN-S=XpWFu5KDoaXgqsZQ@mail.gmail.com/Oh, sorry I replied directly due to I thought my old change when I saw this patch.
commit
e937e23d202173d112cfe7621d8b860f691ce42d
Author: Zorro Lang <[email protected]>
Date: Fri May 27 20:11:15 2022 +0800
Quoted 25 lines
common/filter: filter out extra mount error output
Sure, you're right, thanks for reviewing :)
Thanks,
ZorroQuoted 17 lines
Quoted 16 lines
Thanks,
ZorroQuoted 8 lines
exists.
----device_add_must_fail----
wrote 9000/9000 bytes at offset 0
XXX Bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) --
2.43.0
Mount error info changed since util-linux v2.40
(91ea38e libmount: report failed syscall name).
So update _filter_mount_error() to match it.
--- tests/btrfs/315 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
tests/btrfs/315 +0 -0
@@ -39,7 +39,8 @@ _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"
+ grep -v dmesg | _filter_test_dir | sed -e
"s/mount(2)\|fsconfig//g" | \
+ sed -E "s/mount( system call failed:)/\1/"
}
seed_device_must_fail()
Signature · 1 line
2.43.0