generic/127: to exit if any subtest fails
authorMatthew Wilcox <willy@infradead.org>
Mon, 19 Oct 2020 12:58:39 +0000 (13:58 +0100)
committerEryu Guan <guaneryu@gmail.com>
Tue, 20 Oct 2020 05:34:26 +0000 (13:34 +0800)
If one of the subtests of generic/127 fails, we proceed with the
rest of the tests, potentially overwriting useful data.  This makes
it stop as soon as any of the subtests fails.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
tests/generic/127

index 07f2323dcd8f34da5aa0c048cd8f1c63ec3b9501..de8cc1ab2811282c956e9bfa6ccdc8a1ce22551f 100755 (executable)
@@ -89,16 +89,16 @@ _fsx_std_mmap()
 _supported_fs generic
 _require_test
 
-_fsx_lite_nommap
-_fsx_lite_mmap
+_fsx_lite_nommap || exit
+_fsx_lite_mmap || exit
 
-_fsx_std_nommap
-_fsx_std_mmap
+_fsx_std_nommap || exit
+_fsx_std_mmap || exit
 
 #flush cache after write
 FSX_ARGS="-f $FSX_ARGS"
-_fsx_std_nommap
-_fsx_std_mmap
+_fsx_std_nommap || exit
+_fsx_std_mmap || exit
 
 status=0
 _cleanup