6 #-----------------------------------------------------------------------
7 # Copyright (c) 2000-2004 Silicon Graphics, Inc. All Rights Reserved.
8 # This program is free software; you can redistribute it and/or modify
9 # it under the terms of the GNU General Public License as published by
10 # the Free Software Foundation; either version 2 of the License, or
11 # (at your option) any later version.
13 # This program is distributed in the hope that it will 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 to the Free Software
20 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
23 # Contact information: Silicon Graphics, Inc., 1500 Crittenden Lane,
24 # Mountain View, CA 94043, USA, or: http://www.sgi.com
25 #-----------------------------------------------------------------------
31 echo "QA output created by $seq"
36 status=1 # failure is the default!
37 # get standard environment, filters and checks
44 umount $SCRATCH_MNT 2>/dev/null
47 trap "_cleanup; exit \$status" 0 1 2 3 15
52 echo "*** $* ***" >>$seqfull
62 s/Device: *[0-9][0-9]*,[0-9][0-9]*/Device: <DEVICE>/;
63 s/Inode: *[0-9][0-9]*/Inode: <INODE>/;
64 s/Size: *[0-9][0-9]* *Filetype: Dir/Size: <DSIZE> Filetype: Dir/;
68 # real QA test starts here
70 _supported_os IRIX Linux
78 $here/src/devzero -b 2048 -n 2 -c -v 44 $tempfile.2
87 file_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx_0 ---755 3 1 $tempfile
88 file_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx_1 ---755 3 1 $tempfile
89 file_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx_2 ---755 3 1 $tempfile
90 file_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx_3 ---755 3 1 $tempfile
91 file_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx_4 ---755 3 1 $tempfile
94 setuid -u-666 0 0 $tempfile
95 setgid --g666 0 0 $tempfile
96 setugid -ug666 0 0 $tempfile
97 block_device b--012 3 1 161 162
98 char_device c--345 3 1 177 178
100 symlink l--123 0 0 bigfile
101 : a file we actually read
102 bigfile ---666 3 0 $tempfile.2
109 _fail "failed to create test protofile"
114 echo "*** create FS version $1"
115 VERSION="-n version=$1"
118 umount $SCRATCH_DEV >/dev/null 2>&1
121 _scratch_mkfs_xfs $VERSION -p $protofile >>$seqfull 2>&1 \
122 || _fail "mkfs failed"
129 _scratch_mount >>$seqfull 2>&1 \
130 || _fail "mount failed"
133 (cd $SCRATCH_MNT ; find . | sort \
134 | xargs $here/src/lstat64 | _filter_stat)
135 diff -q $SCRATCH_MNT/bigfile $tempfile.2 \
136 || _fail "bigfile corrupted"
138 echo "*** unmount FS"
140 umount $SCRATCH_DEV >>$seqfull 2>&1 \
141 || _fail "umount failed"