generic/042: set size to 38M for f2fs
[xfstests-dev.git] / tests / generic / 042
index 6c62eb63ba826c13cd679b92ac1ee3d6ae3a6daa..ee0e4b400c71a3affaf74b565e2476db1542ac87 100755 (executable)
@@ -41,10 +41,16 @@ _crashtest()
        img=$SCRATCH_MNT/$seq.img
        mnt=$SCRATCH_MNT/$seq.mnt
        file=$mnt/file
+       size=25M
+
+       # 25M is too small for f2fs.
+       if [ $FSTYP == "f2fs" ]; then
+               size=38M
+       fi
 
        # Create an fs on a small, initialized image. The pattern is written to
        # the image to detect stale data exposure.
-       $XFS_IO_PROG -f -c "truncate 0" -c "pwrite -S 0xCD 0 25M" $img \
+       $XFS_IO_PROG -f -c "truncate 0" -c "pwrite -S 0xCD 0 $size" $img \
                >> $seqres.full 2>&1
        _mkfs_dev $img >> $seqres.full 2>&1
 
@@ -56,7 +62,7 @@ _crashtest()
        # write, run the test command and shutdown the fs
        $XFS_IO_PROG -f -c "pwrite -S 1 0 64k" -c "$cmd 60k 4k" $file | \
                _filter_xfs_io
-       ./src/godown -f $mnt
+       $here/src/godown -f $mnt
 
        $UMOUNT_PROG $mnt
        _mount $img $mnt
@@ -73,7 +79,6 @@ _crashtest()
 
 # Modify as appropriate.
 _supported_fs generic
-_supported_os Linux
 _require_scratch
 _require_scratch_shutdown
 _require_xfs_io_command "falloc"