xfs: fix blocktrash fuzzers
[xfstests-dev.git] / tests / xfs / 091
index ae6233707b8589d76486c34e4a20cc4a25603473..7adbdc9efb4264b2e94c07bef130bdf99f2b7eb4 100755 (executable)
@@ -92,13 +92,14 @@ done
 
 # Try to append to files; this should fail
 echo "+ mount image"
-_scratch_mount
-
-echo "+ modify files"
-for x in `seq 1 64`; do
-       $XFS_IO_PROG -f -c "pwrite -S 0x62 0 ${blksz}" "${TESTFILE}.${x}" >> $seqres.full
-done
-umount "${SCRATCH_MNT}"
+if _try_scratch_mount >> $seqres.full 2>&1; then
+
+       echo "+ modify files"
+       for x in `seq 1 64`; do
+               $XFS_IO_PROG -f -c "pwrite -S 0x62 0 ${blksz}" "${TESTFILE}.${x}" >> $seqres.full
+       done
+       umount "${SCRATCH_MNT}"
+fi
 
 echo "+ repair fs"
 _scratch_xfs_repair >> $seqres.full 2>&1