]> git.apps.os.sepia.ceph.com Git - xfstests-dev.git/commitdiff
fuzzy: always stop the scrub fsstress loop on error
authorDarrick J. Wong <djwong@kernel.org>
Mon, 3 Feb 2025 22:00:30 +0000 (14:00 -0800)
committerZorro Lang <zlang@kernel.org>
Tue, 18 Feb 2025 04:42:39 +0000 (12:42 +0800)
Always abort the non-remount scrub fsstress loop in
__stress_scrub_fsstress_loop if fsstress returns a nonzero exit code.

Cc: <fstests@vger.kernel.org> # v2023.01.15
Fixes: 20df87599f66d0 ("fuzzy: make scrub stress loop control more robust")
Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Zorro Lang <zlang@kernel.org>
common/fuzzy

index 486dcb02315fa62945dcde2dd7e3af50743c5b35..5a62965c2e4ce22d2209579caa9c526973019c02 100644 (file)
@@ -1012,6 +1012,7 @@ __stress_scrub_fsstress_loop() {
        local remount_period="$3"
        local stress_tgt="$4"
        local focus=()
+       local res
 
        case "$stress_tgt" in
        "parent")
@@ -1143,7 +1144,9 @@ __stress_scrub_fsstress_loop() {
                # Need to recheck running conditions if we cleared anything
                __stress_scrub_clean_scratch && continue
                _run_fsstress $args >> $seqres.full
-               echo "fsstress exits with $? at $(date)" >> $seqres.full
+               res=$?
+               echo "$mode fsstress exits with $res at $(date)" >> $seqres.full
+               [ "$res" -ne 0 ] && break;
        done
        rm -f "$runningfile"
 }