2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (c) 2000-2004 Silicon Graphics, Inc. All Rights Reserved.
7 # Exercises unwritten extent reads and writes, looking
8 # for data corruption (zeroes read) near the end of file.
11 _begin_fstest ioctl rw auto
13 # Import common functions.
18 _filter_test_dir | sed -e 's/[0-9][0-9]* bytes/NUM bytes/g'
21 pgsize=`$here/src/feature -s`
23 # -i == number of iterations
24 # -l == bytes to leak on each iteration
25 # -b == read/write block size
26 # -s == preallocation size
28 # real QA test starts here
30 _require_xfs_io_command "falloc"
34 echo "*** First case - I/O blocksize same as pagesize"
35 $here/src/resvtest -i 20 -b $pgsize "$TEST_DIR/resv" | _filter_resv
37 [ $res -eq 137 ] && _notrun "resvtest -i 20 -b $pgsize was SIGKILLed (OOM?)"
38 [ $res -eq 0 ] && echo done
39 rm -f "$TEST_DIR/mumble"
42 echo "*** Second case - 512 byte I/O blocksize"
43 $here/src/resvtest -i 40 -b 512 "$TEST_DIR/resv" | _filter_resv
45 [ $res -eq 137 ] && _notrun "resvtest -i 40 -b 512 was SIGKILLed (OOM?)"
46 [ $res -eq 0 ] && echo done
47 rm -f "$TEST_DIR/grumble"