Skip to contentSkip to conversation

Fix generic/127 to exit if any subtest fails

PATCH In review Matthew Wilcox 2 participants 2 messages Oct 19, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix generic/127 to exit if any subtest fails

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.

tests/generic/127 +6 -6
index dedd8bbf..d4b2cc38 100755
@@ -90,16 +90,16 @@ _supported_fs generic
 _supported_os Linux
 _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
Reviewed-by on v1 1/1
#1 lore raw
Quoted 6 lines · Matthew Wilcox

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.

Yayyyyyyy

--D

Quoted 29 lines
tests/generic/127 +6 -6
index dedd8bbf..d4b2cc38 100755
@@ -90,16 +90,16 @@ _supported_fs generic
 _supported_os Linux
 _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