Tests after 276 were failing because the background fsstress
hadn't quit prior to exit, devices couldn't be unmounted, etc.
Just use the same trick as generic/068 does, and use
a tmpfile to control whether the background loop keeps
running.
Also, no need to umount scratch at cleanup time, the scripts
do that for us.
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Jan Schmidt list.xfs@jan-o-sch.net
Signed-off-by: Rich Johnston <rjohnston@sgi.com>
_cleanup()
{
- if [ $noise_pid -ne 0 ]; then
- echo "background noise kill $noise_pid" >>$seqres.full
- kill $noise_pid
- noise_pid=0
- wait
- fi
- echo "*** unmount"
- umount $SCRATCH_MNT 2>/dev/null
+ rm $tmp.running
+ wait
rm -f $tmp.*
}
trap "_cleanup; exit \$status" 0 1 2 3 15
if [ $do_bg_noise -ne 0 ]; then
# make background noise while backrefs are being walked
- while /bin/true; do
+ while [ -f "$tmp.running" ]; do
echo background fsstress >>$seqres.full
run_check $FSSTRESS_PROG -d $SCRATCH_MNT/bgnoise -n 999
echo background rm >>$seqres.full
numprocs=1
do_bg_noise=1
+touch $tmp.running
+
workout $filesize $nfiles $numprocs $snap_name $do_bg_noise
echo "*** done"
QA output created by 276
*** test backref walking
*** done
-*** unmount