* [PATCH] btrfs-progs: misc-tests/029: exit manually after run_mayfail()
@ 2019-06-23 10:53 damenly.su
2019-07-01 15:41 ` David Sterba
0 siblings, 1 reply; 2+ messages in thread
From: damenly.su @ 2019-06-23 10:53 UTC (permalink / raw)
To: linux-btrfs; +Cc: Su Yue
From: Su Yue <Damenly_Su@gmx.com>
Since the commmit 8dd3e5dc2df5
("btrfs-progs: tests: fix misc-tests/029 to run on NFS") added the
compatibility of NFS, it called run_mayfail() in the last of the test.
However, run_mayfail() always return the original code. If the test
case is not running on NFS, the last `run_mayfail rmdir "$SUBVOL_MNT"`
will fail with return value 1 then the test fails:
================================================================
====== RUN MAYFAIL rmdir btrfs-progs/tests/misc-tests/029-send-p-different-mountpoints/subvol_mnt
rmdir: failed to remove 'btrfs-progs/tests/misc-tests/029-send-p-different-mountpoints/subvol_mnt': No such file or director
failed (ignored, ret=1): rmdir btrfs-progs/tests/misc-tests/029-send-p-different-mountpoints/subvol_mnt
test failed for case 029-send-p-different-mountpoints
=================================================================
Every instrument in this script handles its error well, so do exit 0
manually in the last.
Link: https://bugzilla.kernel.org/show_bug.cgi?id=202645
Fixes: 8dd3e5dc2df5 ("btrfs-progs: tests: fix misc-tests/029 to run on NFS")
Signed-off-by: Su Yue <Damenly_Su@gmx.com>
---
tests/misc-tests/029-send-p-different-mountpoints/test.sh | 3 +++
1 file changed, 3 insertions(+)
diff --git a/tests/misc-tests/029-send-p-different-mountpoints/test.sh b/tests/misc-tests/029-send-p-different-mountpoints/test.sh
index e092f8bba31e..d2b5e693f2d7 100755
--- a/tests/misc-tests/029-send-p-different-mountpoints/test.sh
+++ b/tests/misc-tests/029-send-p-different-mountpoints/test.sh
@@ -49,3 +49,6 @@ run_check_umount_test_dev "$TEST_MNT"
run_mayfail $SUDO_HELPER rmdir "$SUBVOL_MNT"
run_mayfail rmdir "$SUBVOL_MNT"
+# run_mayfail() may fail with nonzero value returned which causes failure
+# of this case. Do exit manually.
+exit 0
--
2.22.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] btrfs-progs: misc-tests/029: exit manually after run_mayfail()
2019-06-23 10:53 [PATCH] btrfs-progs: misc-tests/029: exit manually after run_mayfail() damenly.su
@ 2019-07-01 15:41 ` David Sterba
0 siblings, 0 replies; 2+ messages in thread
From: David Sterba @ 2019-07-01 15:41 UTC (permalink / raw)
To: damenly.su; +Cc: linux-btrfs, Su Yue
On Sun, Jun 23, 2019 at 06:53:24PM +0800, damenly.su@gmail.com wrote:
> From: Su Yue <Damenly_Su@gmx.com>
>
> Since the commmit 8dd3e5dc2df5
> ("btrfs-progs: tests: fix misc-tests/029 to run on NFS") added the
> compatibility of NFS, it called run_mayfail() in the last of the test.
>
> However, run_mayfail() always return the original code. If the test
> case is not running on NFS, the last `run_mayfail rmdir "$SUBVOL_MNT"`
> will fail with return value 1 then the test fails:
> ================================================================
> ====== RUN MAYFAIL rmdir btrfs-progs/tests/misc-tests/029-send-p-different-mountpoints/subvol_mnt
> rmdir: failed to remove 'btrfs-progs/tests/misc-tests/029-send-p-different-mountpoints/subvol_mnt': No such file or director
> failed (ignored, ret=1): rmdir btrfs-progs/tests/misc-tests/029-send-p-different-mountpoints/subvol_mnt
> test failed for case 029-send-p-different-mountpoints
> =================================================================
>
> Every instrument in this script handles its error well, so do exit 0
> manually in the last.
>
> Link: https://bugzilla.kernel.org/show_bug.cgi?id=202645
> Fixes: 8dd3e5dc2df5 ("btrfs-progs: tests: fix misc-tests/029 to run on NFS")
> Signed-off-by: Su Yue <Damenly_Su@gmx.com>
Applied, thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-07-01 15:40 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-23 10:53 [PATCH] btrfs-progs: misc-tests/029: exit manually after run_mayfail() damenly.su
2019-07-01 15:41 ` David Sterba
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).