filter out parent output for mkfs
[xfstests-dev.git] / 069
1 #! /bin/sh
2 # FS QA Test No. 069
3 #
4 # Test out writes with O_APPEND flag sets.
5 #
6 #-----------------------------------------------------------------------
7 # Copyright (c) 2002 Silicon Graphics, Inc.  All Rights Reserved.
8 #-----------------------------------------------------------------------
9 #
10 # creator
11 owner=nathans@sgi.com
12
13 seq=`basename $0`
14 echo "QA output created by $seq"
15
16 here=`pwd`
17 tmp=/tmp/$$
18 status=0        # success is the default!
19 trap "rm -rf $tmp.*; exit \$status" 0 1 2 3 15
20
21 # get standard environment, filters and checks
22 . ./common.rc
23 . ./common.filter
24
25 # real QA test starts here
26 _supported_fs xfs udf nfs
27 _supported_os IRIX Linux
28
29 _require_scratch
30 rm -f $seq.full
31
32 umount $SCRATCH_DEV >/dev/null 2>&1
33
34 echo "*** mkfs"
35 _scratch_mkfs >/dev/null || _fail "mkfs failed"
36   
37 echo "*** mount FS"
38 _scratch_mount >/dev/null || _fail "mount failed"
39
40 cd $SCRATCH_MNT
41
42 sizes="1 20 300 40000 3000000 12345"
43 for size in $sizes ; do
44         $here/src/append_writer $size &
45         echo $! $size >> pids
46 done
47
48 cd $here
49
50 wait
51 ls -lh >> $seq.full
52 echo "*** PIDs file" >> $seq.full
53 cat $SCRATCH_MNT/pids >> $seq.full
54
55 cat $SCRATCH_MNT/pids | while read pid size
56 do
57         echo "*** checking file with $size integers"
58         echo checking pid=$pid size=$size >> $seq.full
59         $here/src/append_reader $SCRATCH_MNT/testfile.$pid
60         status=$?
61         [ $status -ne 0 ] && \
62                 echo "maybe corrupt O_APPEND to $SCRATCH_MOUNT/testfile.$pid!"
63         echo status: $status >> $seq.full
64 done
65
66 # success, all done
67 exit