2 # FS QA Test No. xfs/306
4 # Basic log recovery stress test - do lots of stuff, shut down in the middle of
5 # it and check that recovery runs to completion and everything can be
6 # successfully removed afterwards..
8 #-----------------------------------------------------------------------
9 # Copyright (c) 2013 Red Hat, Inc. All Rights Reserved.
11 # This program is free software; you can redistribute it and/or
12 # modify it under the terms of the GNU General Public License as
13 # published by the Free Software Foundation.
15 # This program is distributed in the hope that it would be useful,
16 # but WITHOUT ANY WARRANTY; without even the implied warranty of
17 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 # GNU General Public License for more details.
20 # You should have received a copy of the GNU General Public License
21 # along with this program; if not, write the Free Software Foundation,
22 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
24 #-----------------------------------------------------------------------
28 seqres=$RESULT_DIR/$seq
29 echo "QA output created by $seq"
33 status=1 # failure is the default!
35 # get standard environment, filters and checks
42 umount $SCRATCH_MNT 2>/dev/null
45 trap "_cleanup; exit \$status" 0 1 2 3 15
47 # real QA test starts here
55 _scratch_mkfs > $seqres.full 2>&1
58 SLEEP_TIME=$((30 * $TIME_FACTOR))
59 PROCS=$((2 * LOAD_FACTOR))
61 load_dir=$SCRATCH_MNT/test
63 # let this run for a while
64 $FSSTRESS_PROG -n10000000 -p $PROCS -d $load_dir >> $seqres.full 2>&1 &
66 killall -q $FSSTRESS_PROG
71 # now mount again, run the load again, this time with a shutdown.
73 $XFS_FSR_PROG -v $load_dir >> $seqres.full 2>&1
74 $FSSTRESS_PROG -n10000000 -p $PROCS -d $load_dir >> $seqres.full 2>&1 &
78 # now shutdown and unmount
80 $here/src/godown $load_dir
81 killall -q $FSSTRESS_PROG
84 # for some reason fsstress processes manage to live on beyond the wait?
88 # now recover, check the filesystem for consistency
95 for d in $load_dir/*; do
96 rm -rf $d > /dev/null 2>&1 &
101 echo "No output is good. Failures are loud."