2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (c) 2006 Silicon Graphics, Inc. All Rights Reserved.
7 # Run fsstress and ENSPC hitters in parallel, check fs consistency an the end
10 seqres=$RESULT_DIR/$seq
11 echo "QA output created by $seq"
15 status=1 # failure is the default!
16 trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
18 # get standard environment, filters and checks
21 # Disable all sync operations to get higher load
22 FSSTRESS_AVOID="$FSSTRESS_AVOID -ffsync=0 -fsync=0 -ffdatasync=0"
30 out=$SCRATCH_MNT/fsstress.$$
31 args=`_scale_fsstress_args -p128 -n999999999 -f setattr=1 $FSSTRESS_AVOID -d $out`
32 echo "fsstress $args" >> $seqres.full
33 $FSSTRESS_PROG $args > /dev/null 2>&1 &
35 echo "Run dd writers in parallel"
36 for ((i=0; i < num_iterations; i++))
38 # File will be opened with O_TRUNC each time
39 dd if=/dev/zero of=$SCRATCH_MNT/SPACE_CONSUMER bs=1M \
43 echo "Killing fsstress process..." >> $seqres.full
44 kill $pid >> $seqres.full 2>&1
48 # real QA test starts here
53 _scratch_mkfs_sized $((512 * 1024 * 1024)) >> $seqres.full 2>&1
57 _scratch_unmount 2>/dev/null
61 if ! _scratch_unmount; then
62 echo "failed to umount"