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 _begin_fstest rw udf auto quick
12 status=0 # success is the default!
13 _register_cleanup "rm -rf $tmp.*"
15 # Import common functions.
18 # real QA test starts here
23 _scratch_unmount >/dev/null 2>&1
26 _scratch_mkfs >/dev/null 2>&1 || _fail "mkfs failed"
33 sizes="1 20 300 40000 3000000 12345"
34 for size in $sizes ; do
35 $here/src/append_writer $size &
42 ls -lh $SCRATCH_MNT >> $seqres.full
43 echo "*** PIDs file" >> $seqres.full
44 cat $SCRATCH_MNT/pids >> $seqres.full
46 cat $SCRATCH_MNT/pids | while read pid size
48 echo "*** checking file with $size integers"
49 echo checking pid=$pid size=$size >> $seqres.full
50 $here/src/append_reader $SCRATCH_MNT/testfile.$pid
52 [ $status -ne 0 ] && \
53 echo "maybe corrupt O_APPEND to $SCRATCH_MOUNT/testfile.$pid!"
54 echo status: $status >> $seqres.full