2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (c) 2002 Silicon Graphics, Inc. All Rights Reserved.
7 # Test out writes with O_APPEND flag sets.
10 seqres=$RESULT_DIR/$seq
11 echo "QA output created by $seq"
15 status=0 # success is the default!
16 trap "rm -rf $tmp.*; exit \$status" 0 1 2 3 15
18 # get standard environment, filters and checks
22 # real QA test starts here
29 _scratch_unmount >/dev/null 2>&1
32 _scratch_mkfs >/dev/null 2>&1 || _fail "mkfs failed"
39 sizes="1 20 300 40000 3000000 12345"
40 for size in $sizes ; do
41 $here/src/append_writer $size &
48 ls -lh $SCRATCH_MNT >> $seqres.full
49 echo "*** PIDs file" >> $seqres.full
50 cat $SCRATCH_MNT/pids >> $seqres.full
52 cat $SCRATCH_MNT/pids | while read pid size
54 echo "*** checking file with $size integers"
55 echo checking pid=$pid size=$size >> $seqres.full
56 $here/src/append_reader $SCRATCH_MNT/testfile.$pid
58 [ $status -ne 0 ] && \
59 echo "maybe corrupt O_APPEND to $SCRATCH_MOUNT/testfile.$pid!"
60 echo status: $status >> $seqres.full