2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (c) 2016 Fujitsu. All Rights Reserved.
7 # Run write(2) and fallocate(2) in parallel and the total needed data space
8 # for these operations don't exceed whole fs free data space, to see whether
9 # we will get any unexpected ENOSPC error.
12 seqres=$RESULT_DIR/$seq
13 echo "QA output created by $seq"
17 status=1 # failure is the default!
18 trap "_cleanup; exit \$status" 0 1 2 3 15
26 # get standard environment, filters and checks
30 # remove previous $seqres.full before test
33 # Modify as appropriate.
36 _require_xfs_io_command "falloc"
38 _scratch_mkfs_sized $((256 * 1024 * 1024)) >> $seqres.full 2>&1
41 testfile1=$SCRATCH_MNT/testfile1
42 testfile2=$SCRATCH_MNT/testfile2
44 echo "Silence is golden"
45 for ((i=0; i<100; i++)); do
46 $XFS_IO_PROG -fc "pwrite 0 80M" $testfile1 >/dev/null
51 for ((i=0; i<100; i++)); do
52 $XFS_IO_PROG -fc "falloc 0 80M" $testfile2 >/dev/null