6 #-----------------------------------------------------------------------
7 # Copyright (c) 2000-2002 Silicon Graphics, Inc. All Rights Reserved.
8 #-----------------------------------------------------------------------
14 echo "QA output created by $seq"
19 umount $SCRATCH_MNT/test2 > /dev/null 2>&1
20 umount $SCRATCH_MNT/test > /dev/null 2>&1
25 echo "--- mounts at end (after cleanup)" >> $seq.full
32 status=1 # failure is the default!
33 trap "_cleanup ; exit \$status" 0 1 2 3 15
35 # get standard environment, filters and checks
39 # real QA test starts here
46 echo "--- $*" >> $seq.full
56 echo "(dev=$SCRATCH_DEV, mount=$SCRATCH_MNT)" >> $seq.full
59 echo "--- mounts" >> $seq.full
62 _log "Create ext2 fs on scratch"
63 mkfs -t ext2 $SCRATCH_DEV >> $seq.full 2>&1 \
64 || _fail "!!! failed to mkfs ext2"
66 _log "Mount ext2 fs on scratch"
67 mount -t ext2 $SCRATCH_DEV $SCRATCH_MNT >> $seq.full 2>&1 \
68 || _fail "!!! failed to mount"
70 _log "Create xfs fs in file on scratch"
71 /sbin/mkfs.xfs -f $MKFS_OPTIONS -dfile,name=$SCRATCH_MNT/test.xfs,size=40m \
73 || _fail "!!! failed to mkfs xfs"
75 _log "Make mount points"
76 mkdir $SCRATCH_MNT/test $SCRATCH_MNT/test2 >> $seq.full 2>&1 \
77 || _fail "!!! failed to make mount points"
79 _log "Mount xfs via loop"
80 mount -t xfs -o loop $SCRATCH_MNT/test.xfs $SCRATCH_MNT/test >> $seq.full 2>&1 \
81 || _fail "!!! failed to loop mount xfs"
84 $FSSTRESS_PROG -d $SCRATCH_MNT/test -n 1000 $FSSTRESS_AVOID >> $seq.full 2>&1 \
85 || _fail "!!! stress failed"
88 rm -rf $SCRATCH_MNT/test/* >> $seq.full 2>&1 \
89 || _fail "!!! clean failed"
91 _log "create file for ext2 fs"
92 dd if=/dev/zero of=$SCRATCH_MNT/test/test.ext2 bs=1024 count=10240 >> $seq.full 2>&1 \
93 || _fail "!!! create file failed"
95 _log "Create ext2 fs in file on looped xfs"
96 echo y | mkfs -t ext2 $SCRATCH_MNT/test/test.ext2 >> $seq.full 2>&1 \
97 || _fail "!!! failed to mkfs ext2 on xfs"
99 _log "Mount ext2 on xfs via loop"
100 mount -t ext2 -o loop $SCRATCH_MNT/test/test.ext2 $SCRATCH_MNT/test2 >> $seq.full 2>&1 \
101 || _fail "!!! failed to loop mount xfs"
103 _log "stress ext2 on xfs via loop"
104 $FSSTRESS_PROG -d $SCRATCH_MNT/test2 -n 1000 $FSSTRESS_AVOID >> $seq.full 2>&1 \
105 || _fail "!!! stress ext2 failed"
108 rm -rf $SCRATCH_MNT/test/* >> $seq.full 2>&1 \
109 || _fail "!!! clean failed"
111 _log "umount ext2 on xfs"
112 umount $SCRATCH_MNT/test2 >> $seq.full 2>&1 \
113 || _fail "!!! umount ext2 failed"
116 umount $SCRATCH_MNT/test >> $seq.full 2>&1 \
117 || _fail "!!! umount xfs failed"
119 echo "--- mounts at end (before cleanup)" >> $seq.full