From: Darrick J. Wong Date: Mon, 3 Feb 2025 22:00:30 +0000 (-0800) Subject: fuzzy: stop __stress_scrub_fsx_loop if fsx fails X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=b816737426bf21117d6a9dd9b362c199dc03619c;p=users%2Fhch%2Fxfstests-dev.git fuzzy: stop __stress_scrub_fsx_loop if fsx fails Stop the fsx scrub stress loop if fsx returns a nonzero error code. Cc: # v2023.01.15 Fixes: a2056ca8917bc8 ("fuzzy: enhance scrub stress testing to use fsx") Signed-off-by: "Darrick J. Wong" Reviewed-by: Dave Chinner Signed-off-by: Zorro Lang --- diff --git a/common/fuzzy b/common/fuzzy index aa6c7a863..16ec71729 100644 --- a/common/fuzzy +++ b/common/fuzzy @@ -942,6 +942,7 @@ __stress_scrub_fsx_loop() { local remount_period="$3" local stress_tgt="$4" # ignored local focus=(-q -X) # quiet, validate file contents + local res # As of November 2022, 2 million fsx ops should be enough to keep # any filesystem busy for a couple of hours. @@ -993,7 +994,9 @@ __stress_scrub_fsx_loop() { # Need to recheck running conditions if we cleared anything __stress_scrub_clean_scratch && continue $here/ltp/fsx $args >> $seqres.full - echo "fsx exits with $? at $(date)" >> $seqres.full + res=$? + echo "fsx exits with $res at $(date)" >> $seqres.full + test "$res" -ne 0 && break done rm -f "$runningfile" }