diff mbox series

Fix generic/127 to exit if any subtest fails

Message ID 20201019125839.GQ20115@casper.infradead.org (mailing list archive)
State New, archived
Headers show
Series Fix generic/127 to exit if any subtest fails | expand

Commit Message

Matthew Wilcox Oct. 19, 2020, 12:58 p.m. UTC
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>

Comments

Darrick J. Wong Oct. 19, 2020, 4:04 p.m. UTC | #1
On Mon, Oct 19, 2020 at 01:58:39PM +0100, Matthew Wilcox wrote:
> 
> 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>

Yayyyyyyy
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>

--D

> 
> diff --git a/tests/generic/127 b/tests/generic/127
> index dedd8bbf..d4b2cc38 100755
> --- a/tests/generic/127
> +++ b/tests/generic/127
> @@ -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
>
diff mbox series

Patch

diff --git a/tests/generic/127 b/tests/generic/127
index dedd8bbf..d4b2cc38 100755
--- a/tests/generic/127
+++ b/tests/generic/127
@@ -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