2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (c) 2013 Red Hat, Inc. All Rights Reserved.
7 # Basic log recovery stress test - do lots of stuff, shut down in the middle of
8 # it and check that recovery runs to completion and everything can be
9 # successfully removed afterwards..
12 seqres=$RESULT_DIR/$seq
13 echo "QA output created by $seq"
17 status=1 # failure is the default!
19 # get standard environment, filters and checks
26 _scratch_unmount 2>/dev/null
29 trap "_cleanup; exit \$status" 0 1 2 3 15
31 # real QA test starts here
36 _require_scratch_shutdown
37 _require_command "$KILLALL_PROG" killall
41 _scratch_mkfs > $seqres.full 2>&1
42 _require_metadata_journaling $SCRATCH_DEV
45 SLEEP_TIME=$((30 * $TIME_FACTOR))
46 PROCS=$((2 * LOAD_FACTOR))
48 load_dir=$SCRATCH_MNT/test
50 # let this run for a while
51 $FSSTRESS_PROG $FSSTRESS_AVOID -n10000000 -p $PROCS -d $load_dir >> $seqres.full 2>&1 &
53 $KILLALL_PROG -q $FSSTRESS_PROG
58 # now mount again, run the load again, this time with a shutdown.
60 $XFS_FSR_PROG -v $load_dir >> $seqres.full 2>&1
61 $FSSTRESS_PROG -n10000000 -p $PROCS -d $load_dir >> $seqres.full 2>&1 &
65 # now shutdown and unmount
68 $KILLALL_PROG -q $FSSTRESS_PROG
71 # for some reason fsstress processes manage to live on beyond the wait?
75 # now recover, check the filesystem for consistency
82 for d in $load_dir/*; do
83 rm -rf $d > /dev/null 2>&1 &
88 echo "No output is good. Failures are loud."