6 #-----------------------------------------------------------------------
7 # Copyright (c) 2000-2004 Silicon Graphics, Inc. All Rights Reserved.
9 # This program is free software; you can redistribute it and/or
10 # modify it under the terms of the GNU General Public License as
11 # published by the Free Software Foundation.
13 # This program is distributed in the hope that it would be useful,
14 # but WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 # GNU General Public License for more details.
18 # You should have received a copy of the GNU General Public License
19 # along with this program; if not, write the Free Software Foundation,
20 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
22 #-----------------------------------------------------------------------
26 seqres=$RESULT_DIR/$seq
27 seqres=$RESULT_DIR/$seq
28 seqres=$RESULT_DIR/$seq
29 echo "QA output created by $seq"
33 seqfull="$seqres.full"
34 status=1 # failure is the default!
35 # get standard environment, filters and checks
42 umount $SCRATCH_MNT 2>/dev/null
45 trap "_cleanup; exit \$status" 0 1 2 3 15
50 echo "*** $* ***" >>$seqfull
60 s/Device: *[0-9][0-9]*,[0-9][0-9]*/Device: <DEVICE>/;
61 s/Inode: *[0-9][0-9]*/Inode: <INODE>/;
62 s/Size: *[0-9][0-9]* *Filetype: Dir/Size: <DSIZE> Filetype: Dir/;
66 # real QA test starts here
68 _supported_os IRIX Linux
76 $here/src/devzero -b 2048 -n 2 -c -v 44 $tempfile.2
85 file_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx_0 ---755 3 1 $tempfile
86 file_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx_1 ---755 3 1 $tempfile
87 file_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx_2 ---755 3 1 $tempfile
88 file_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx_3 ---755 3 1 $tempfile
89 file_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx_4 ---755 3 1 $tempfile
92 setuid -u-666 0 0 $tempfile
93 setgid --g666 0 0 $tempfile
94 setugid -ug666 0 0 $tempfile
95 block_device b--012 3 1 161 162
96 char_device c--345 3 1 177 178
98 symlink l--123 0 0 bigfile
99 : a file we actually read
100 bigfile ---666 3 0 $tempfile.2
107 _fail "failed to create test protofile"
112 echo "*** create FS version $1"
113 VERSION="-n version=$1"
116 umount $SCRATCH_DEV >/dev/null 2>&1
119 _scratch_mkfs_xfs $VERSION -p $protofile >>$seqfull 2>&1 \
120 || _fail "mkfs failed"
127 _scratch_mount >>$seqfull 2>&1 \
128 || _fail "mount failed"
131 (cd $SCRATCH_MNT ; find . | LC_COLLATE=POSIX sort \
132 | grep -v ".use_space" \
133 | xargs $here/src/lstat64 | _filter_stat)
134 diff -q $SCRATCH_MNT/bigfile $tempfile.2 \
135 || _fail "bigfile corrupted"
137 echo "*** unmount FS"
139 umount $SCRATCH_DEV >>$seqfull 2>&1 \
140 || _fail "umount failed"