2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (c) 2000-2004 Silicon Graphics, Inc. All Rights Reserved.
10 seqres=$RESULT_DIR/$seq
11 echo "QA output created by $seq"
15 seqfull="$seqres.full"
16 status=1 # failure is the default!
17 # get standard environment, filters and checks
24 _scratch_unmount 2>/dev/null
27 trap "_cleanup; exit \$status" 0 1 2 3 15
32 echo "*** $* ***" >>$seqfull
42 s/Device: *[0-9][0-9]*,[0-9][0-9]*/Device: <DEVICE>/;
43 s/Inode: *[0-9][0-9]*/Inode: <INODE>/;
44 s/Size: *[0-9][0-9]* *Filetype: Dir/Size: <DSIZE> Filetype: Dir/;
48 # real QA test starts here
58 $here/src/devzero -b 2048 -n 2 -c -v 44 $tempfile.2
67 file_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx_0 ---755 3 1 $tempfile
68 file_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx_1 ---755 3 1 $tempfile
69 file_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx_2 ---755 3 1 $tempfile
70 file_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx_3 ---755 3 1 $tempfile
71 file_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx_4 ---755 3 1 $tempfile
74 setuid -u-666 0 0 $tempfile
75 setgid --g666 0 0 $tempfile
76 setugid -ug666 0 0 $tempfile
77 block_device b--012 3 1 161 162
78 char_device c--345 3 1 177 178
80 symlink l--123 0 0 bigfile
81 : a file we actually read
82 bigfile ---666 3 0 $tempfile.2
89 _fail "failed to create test protofile"
94 echo "*** create FS version $1"
95 VERSION="-n version=$1"
98 _scratch_unmount >/dev/null 2>&1
101 _scratch_mkfs_xfs $VERSION -p $protofile >>$seqfull 2>&1 \
102 || _fail "mkfs failed"
109 _try_scratch_mount >>$seqfull 2>&1 \
110 || _fail "mount failed"
113 (cd $SCRATCH_MNT ; find . | LC_COLLATE=POSIX sort \
114 | grep -v ".use_space" \
115 | xargs $here/src/lstat64 | _filter_stat)
116 diff -q $SCRATCH_MNT/bigfile $tempfile.2 \
117 || _fail "bigfile corrupted"
119 echo "*** unmount FS"
121 _scratch_unmount >>$seqfull 2>&1 \
122 || _fail "umount failed"