7 #-----------------------------------------------------------------------
8 # Copyright (c) 2000-2002 Silicon Graphics, Inc. All Rights Reserved.
10 # This program is free software; you can redistribute it and/or modify it
11 # under the terms of version 2 of the GNU General Public License as
12 # published by the Free Software Foundation.
14 # This program is distributed in the hope that it would be useful, but
15 # WITHOUT ANY WARRANTY; without even the implied warranty of
16 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18 # Further, this software is distributed without any warranty that it is
19 # free of the rightfullclaim of any third person regarding infringement
20 # or the like. Any license provided herein, whether implied or
21 # otherwise, applies only to this software file. Patent licenses, if
22 # any, provided herein do not apply to combinations of this program with
23 # other software, or any other product whatsoever.
25 # You should have received a copy of the GNU General Public License along
26 # with this program; if not, write the Free Software Foundation, Inc., 59
27 # Temple Place - Suite 330, Boston MA 02111-1307, USA.
29 # Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
30 # Mountain View, CA 94043, or:
34 # For further information regarding this notice, see:
36 # http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/
37 #-----------------------------------------------------------------------
43 echo "QA output created by $seq"
47 umount $SCRATCH_MNT/test2 > /dev/null 2>&1
48 umount $SCRATCH_MNT/test > /dev/null 2>&1
53 echo "--- mounts at end (after cleanup)" >> $seq.full
60 status=1 # failure is the default!
61 trap "_cleanup ; exit \$status" 0 1 2 3 15
63 # get standard environment, filters and checks
70 echo "--- $*" >> $seq.full
73 # real QA test starts here
80 echo "(dev=$SCRATCH_DEV, mount=$SCRATCH_MNT)" >> $seq.full
83 echo "--- mounts" >> $seq.full
86 _log "Create ext2 fs on scratch"
87 mkfs -t ext2 $SCRATCH_DEV >> $seq.full 2>&1 \
88 || _fail "!!! failed to mkfs ext2"
90 _log "Mount ext2 fs on scratch"
91 mount -t ext2 $SCRATCH_DEV $SCRATCH_MNT >> $seq.full 2>&1 \
92 || _fail "!!! failed to mount"
94 _log "Create xfs fs in file on scratch"
95 /sbin/mkfs.xfs -f $MKFS_OPTIONS -dfile,name=$SCRATCH_MNT/test.xfs,size=20m \
97 || _fail "!!! failed to mkfs xfs"
99 _log "Make mount points"
100 mkdir $SCRATCH_MNT/test $SCRATCH_MNT/test2 >> $seq.full 2>&1 \
101 || _fail "!!! failed to make mount points"
103 _log "Mount xfs via loop"
104 mount -t xfs -o loop $SCRATCH_MNT/test.xfs $SCRATCH_MNT/test >> $seq.full 2>&1 \
105 || _fail "!!! failed to loop mount xfs"
108 src/fsstress -d $SCRATCH_MNT/test -n 1000 $FSSTRESS_AVOID >> $seq.full 2>&1 \
109 || _fail "!!! stress failed"
112 rm -rf $SCRATCH_MNT/test/* >> $seq.full 2>&1 \
113 || _fail "!!! clean failed"
115 _log "create file for ext2 fs"
116 dd if=/dev/zero of=$SCRATCH_MNT/test/test.ext2 bs=1024 count=10240 >> $seq.full 2>&1 \
117 || _fail "!!! create file failed"
119 _log "Create ext2 fs in file on looped xfs"
120 echo y | mkfs -t ext2 $SCRATCH_MNT/test/test.ext2 >> $seq.full 2>&1 \
121 || _fail "!!! failed to mkfs ext2 on xfs"
123 _log "Mount ext2 on xfs via loop"
124 mount -t ext2 -o loop $SCRATCH_MNT/test/test.ext2 $SCRATCH_MNT/test2 >> $seq.full 2>&1 \
125 || _fail "!!! failed to loop mount xfs"
127 _log "stress ext2 on xfs via loop"
128 src/fsstress -d $SCRATCH_MNT/test2 -n 1000 $FSSTRESS_AVOID >> $seq.full 2>&1 \
129 || _fail "!!! stress ext2 failed"
132 rm -rf $SCRATCH_MNT/test/* >> $seq.full 2>&1 \
133 || _fail "!!! clean failed"
135 _log "umount ext2 on xfs"
136 umount $SCRATCH_MNT/test2 >> $seq.full 2>&1 \
137 || _fail "!!! umount ext2 failed"
140 umount $SCRATCH_MNT/test >> $seq.full 2>&1 \
141 || _fail "!!! umount xfs failed"
143 echo "--- mounts at end (before cleanup)" >> $seq.full