Message ID | bb85eb7d443b2da482b6087d8946f0efafa15f87.camel@suse.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | btrfs/315: update 315.out to adapt mount cmd | expand |
On Wed, Sep 18, 2024 at 6:08 PM An Long <lan@suse.com> wrote: > > 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 <lan@suse.com> > --- > tests/btrfs/315.out | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/tests/btrfs/315.out b/tests/btrfs/315.out > index 3ea7a35a..a19ae8d5 100644 > --- a/tests/btrfs/315.out > +++ b/tests/btrfs/315.out > @@ -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 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 linux-btrfs@vger.kernel.org. Thanks. > 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 > >
On Thu, Sep 19, 2024 at 01:07:53AM +0800, An Long wrote: > 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 <lan@suse.com> > --- > tests/btrfs/315.out | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/tests/btrfs/315.out b/tests/btrfs/315.out > index 3ea7a35a..a19ae8d5 100644 > --- a/tests/btrfs/315.out > +++ b/tests/btrfs/315.out > @@ -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 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 > 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 > >
On Thu, Sep 19, 2024 at 1:02 PM Zorro Lang <zlang@redhat.com> wrote: > > On Thu, Sep 19, 2024 at 01:07:53AM +0800, An Long wrote: > > 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 <lan@suse.com> > > --- > > tests/btrfs/315.out | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/tests/btrfs/315.out b/tests/btrfs/315.out > > index 3ea7a35a..a19ae8d5 100644 > > --- a/tests/btrfs/315.out > > +++ b/tests/btrfs/315.out > > @@ -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 > > 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. Isn't that what I said in my previous reply [1]? [1] https://lore.kernel.org/fstests/CAL3q7H7fzCQE0qjZEgeAJ2jvBsJxbYN-S=XpWFu5KDoaXgqsZQ@mail.gmail.com/ > > Thanks, > Zorro > > > > 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 > > > > > >
On Fri, Sep 20, 2024 at 11:12:12AM +0100, Filipe Manana wrote: > On Thu, Sep 19, 2024 at 1:02 PM Zorro Lang <zlang@redhat.com> wrote: > > > > On Thu, Sep 19, 2024 at 01:07:53AM +0800, An Long wrote: > > > 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 <lan@suse.com> > > > --- > > > tests/btrfs/315.out | 2 +- > > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > > > diff --git a/tests/btrfs/315.out b/tests/btrfs/315.out > > > index 3ea7a35a..a19ae8d5 100644 > > > --- a/tests/btrfs/315.out > > > +++ b/tests/btrfs/315.out > > > @@ -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 > > > > 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. > > 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 <zlang@kernel.org> 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 > > > > > Thanks, > > Zorro > > > > > > > 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 > > > > > > > > > > >
On Fri, 2024-09-20 at 22:28 +0800, Zorro Lang wrote: > On Fri, Sep 20, 2024 at 11:12:12AM +0100, Filipe Manana wrote: > > On Thu, Sep 19, 2024 at 1:02 PM Zorro Lang <zlang@redhat.com> > > wrote: > > > > > > On Thu, Sep 19, 2024 at 01:07:53AM +0800, An Long wrote: > > > > 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 <lan@suse.com> > > > > --- > > > > tests/btrfs/315.out | 2 +- > > > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > > > > > diff --git a/tests/btrfs/315.out b/tests/btrfs/315.out > > > > index 3ea7a35a..a19ae8d5 100644 > > > > --- a/tests/btrfs/315.out > > > > +++ b/tests/btrfs/315.out > > > > @@ -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 > > > > > > 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. > > > > 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 <zlang@kernel.org> > 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 > > > > > > > > > Thanks, > > > Zorro > > > > > > > > > > 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. Signed-off-by: An Long <lan@suse.com> --- tests/btrfs/315 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/btrfs/315 b/tests/btrfs/315 index 5852afad..da5d0ce4 100755 --- a/tests/btrfs/315 +++ b/tests/btrfs/315 @@ -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()
diff --git a/tests/btrfs/315.out b/tests/btrfs/315.out index 3ea7a35a..a19ae8d5 100644 --- a/tests/btrfs/315.out +++ b/tests/btrfs/315.out @@ -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 ----
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 <lan@suse.com> --- tests/btrfs/315.out | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) wrote 9000/9000 bytes at offset 0 XXX Bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)