7 #-----------------------------------------------------------------------
8 # Copyright (c) 2000 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 rightful claim 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"
48 status=1 # failure is the default!
49 # get standard environment, filters and checks
56 umount $SCRATCH_MNT 2>/dev/null
59 trap "_cleanup; exit \$status" 0 1 2 3 15
64 echo "*** $* ***" >>$seqfull
74 s/Device: *[0-9][0-9]*,[0-9][0-9]*/Device: <DEVICE>/;
75 s/Inode: *[0-9][0-9]*/Inode: <INODE>/;
79 # real QA test starts here
87 $here/src/devzero -b 2048 -n 2 $tempfile.2 -c -v 44
96 file_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx_0 ---755 3 1 $tempfile
97 file_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx_1 ---755 3 1 $tempfile
98 file_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx_2 ---755 3 1 $tempfile
99 file_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx_3 ---755 3 1 $tempfile
100 file_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx_4 ---755 3 1 $tempfile
103 setuid -u-666 0 0 $tempfile
104 setgid --g666 0 0 $tempfile
105 setugid -ug666 0 0 $tempfile
106 block_device b--012 3 1 161 162
107 char_device c--345 3 1 177 178
109 symlink l--123 0 0 bigfile
110 : a file we actually read
111 bigfile ---666 3 0 $tempfile.2
118 _fail "failed to create test protofile"
123 echo "*** create FS version $1"
124 VERSION="-n version=$1"
127 umount $SCRATCH_DEV >/dev/null 2>&1
130 mkfs -t xfs -f $VERSION -p $protofile $SCRATCH_DEV >>$seqfull 2>&1 \
131 || _fail "mkfs failed"
134 _check_fs $SCRATCH_DEV
138 mount -t xfs $SCRATCH_DEV $SCRATCH_MNT >>$seqfull 2>&1 \
139 || _fail "mount failed"
142 (cd $SCRATCH_MNT ; find . | sort \
143 | xargs $here/src/lstat64 | _filter_stat)
144 diff -q $SCRATCH_MNT/bigfile $tempfile.2 \
145 || _fail "bigfile corrupted"
147 echo "*** unmount FS"
149 umount $SCRATCH_DEV >>$seqfull 2>&1 \
150 || _fail "umount failed"
153 _check_fs $SCRATCH_DEV