. ./common/preamble
_begin_fstest auto metadata quick
+_cleanup()
+{
+ [ -n "$link_pids" ] && kill $link_pids
+ [ -n "$open_pid" ] && kill $open_pid
+ wait
+ cd /
+ rm -f $tmp.*
+}
+
# Import common functions.
. ./common/filter
sleep 5
kill $! >/dev/null 2>&1
-kill $open_pid $link_pids >/dev/null 2>&1
-wait $open_pid $link_pids
-
# all done, no oops/hang expected, _check_filesystems checks SCRATCH_DEV after test
status=0
exit
# for each operation and runs for $LOOP_TIME seconds, and check filesystem
# consistency after each iteration
for i in `seq 1 $LOOP_CNT`; do
- rm -f $stop
+ touch $stop
for j in `seq 1 $PROC_CNT`; do
- while [ ! -e $stop ]; do
+ while [ -e $stop ]; do
do_write
done &
- while [ ! -e $stop ]; do
+ while [ -e $stop ]; do
do_append
done &
- while [ ! -e $stop ]; do
+ while [ -e $stop ]; do
do_writeback
done &
done
sleep $LOOP_TIME
- touch $stop
+ rm -f $stop
wait
_scratch_unmount
test "$nr_hotplug_cpus" -gt 0 || _notrun "CPU hotplugging not supported"
stress_dir="$TEST_DIR/$seq"
-rm -r -f "$stress_dir"
-mkdir -p "$stress_dir"
echo "Silence is golden."
nr_ops=$((2500 * TIME_FACTOR))
fsstress_args+=(-n $nr_ops)
for ((i = 0; i < 10; i++)); do
- _run_fsstress_bg -w "${fsstress_args[@]}"
- _wait_for_fsstress
+ rm -rf "$stress_dir"
+ mkdir -p "$stress_dir"
+ _run_fsstress "${fsstress_args[@]}"
_test_cycle_mount
done
rm -f $sentinel_file
+wait
# success, all done
status=0
# clean out the competing fsstress allocations, then everything else
rm -rf $SCRATCH_MNT/fsstress
rm -rf $SCRATCH_MNT/dir*
+wait
_scratch_unmount
$XFS_IO_PROG -c "pwrite -S 0x56 $((2 * blksz)) $((2 * blksz))" \
-c 'fsync' $SCRATCH_MNT/file >> $seqres.full
rm -f $sentryfile
+wait
cat "$tracefile" >> $seqres.full
grep -q iomap_invalid "$tracefile"