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
28 _scratch_unmount >/dev/null 2>&1
31 _scratch_mkfs >/dev/null 2>&1 || _fail "mkfs failed"
38 sizes="1 20 300 40000 3000000 12345"
39 for size in $sizes ; do
40 $here/src/append_writer $size &
47 ls -lh $SCRATCH_MNT >> $seqres.full
48 echo "*** PIDs file" >> $seqres.full
49 cat $SCRATCH_MNT/pids >> $seqres.full
51 cat $SCRATCH_MNT/pids | while read pid size
53 echo "*** checking file with $size integers"
54 echo checking pid=$pid size=$size >> $seqres.full
55 $here/src/append_reader $SCRATCH_MNT/testfile.$pid
57 [ $status -ne 0 ] && \
58 echo "maybe corrupt O_APPEND to $SCRATCH_MOUNT/testfile.$pid!"
59 echo status: $status >> $seqres.full