common/rc: add _scratch_{u}mount_idmapped() helpers
[xfstests-dev.git] / tests / shared / 032
index 40d278981c356edf56d5cf7d5ef48af2cf8cde45..360087ee1fb980ed92e6f5d03c52a186fa1d2f9e 100755 (executable)
@@ -55,6 +55,8 @@ do
        [ $fs = ext3 ] && preargs="-F"
        [ $fs = ext4 ] && preargs="-F"
        [ $fs = ext4dev ] && preargs="-F"
+       # jffs2 mkfs requires '-r $directory' and '-o $image'
+       [ $fs = jffs2 ] && preargs="-r /proc/fs -o"
 
        # overwite the first few Kb - should blow away superblocks
        $here/src/devzero -n 20 $SCRATCH_DEV >/dev/null
@@ -66,8 +68,11 @@ do
 
        if [ $? -eq 0 ] ; then
                # next, ensure we don't overwrite it
+               # jffs2 mkfs doesn't check overwrite case
+               [ $fs = jffs2 ] && continue
+
                echo "=== Attempting $FSTYP overwrite of $fs..." >>$seqres.full
-               ${MKFS_PROG}.$FSTYP $SCRATCH_DEV >>$seqres.full 2>&1
+               ${MKFS_PROG} -t $FSTYP $SCRATCH_DEV >>$seqres.full 2>&1
 
                [ $? -eq 0 ] && echo "Failed - overwrote fs type ${fs}!"
        else