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
35 _require_scratch_shutdown
36 _require_command "$KILLALL_PROG" killall
40 _scratch_mkfs > $seqres.full 2>&1
41 _require_metadata_journaling $SCRATCH_DEV
44 SLEEP_TIME=$((30 * $TIME_FACTOR))
45 PROCS=$((2 * LOAD_FACTOR))
47 load_dir=$SCRATCH_MNT/test
49 # let this run for a while
50 $FSSTRESS_PROG $FSSTRESS_AVOID -n10000000 -p $PROCS -d $load_dir >> $seqres.full 2>&1 &
52 $KILLALL_PROG -q $FSSTRESS_PROG
57 # now mount again, run the load again, this time with a shutdown.
59 $XFS_FSR_PROG -v $load_dir >> $seqres.full 2>&1
60 $FSSTRESS_PROG -n10000000 -p $PROCS -d $load_dir >> $seqres.full 2>&1 &
64 # now shutdown and unmount
67 $KILLALL_PROG -q $FSSTRESS_PROG
70 # for some reason fsstress processes manage to live on beyond the wait?
74 # now recover, check the filesystem for consistency
81 for d in $load_dir/*; do
82 rm -rf $d > /dev/null 2>&1 &
87 echo "No output is good. Failures are loud."