fstests: move test group info to test files
[xfstests-dev.git] / tests / generic / 102
1 #! /bin/bash
2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (c) 2015 Fujitsu.  All Rights Reserved.
4 #
5 # FS QA Test No. 102
6 #
7 # TEST busy loop of write and delete in a filesystem.
8 # Sometimes writes will failed on NO_SPACE when disk almost full
9 # in btrfs. It is long-term problem since very beginning for btrfs
10 #
11 # This issue was fixed by the patchset named:
12 #
13 # btrfs: Fix no_space on dd and rm loop < from zhaolei@cn.fujitsu.com >
14 #
15 . ./common/preamble
16 _begin_fstest auto rw
17
18 # Import common functions.
19 . ./common/filter
20
21 # real QA test starts here
22 _supported_fs generic
23 _require_scratch
24
25 dev_size=$((1024 * 1024 * 1024))     # 1GB filesystem
26 _scratch_mkfs_sized $dev_size >>$seqres.full 2>&1
27 _scratch_mount
28
29 for ((i = 0; i < 10; i++)); do
30         echo "loop $i" >>$seqres.full
31
32         $XFS_IO_PROG -f -c "pwrite -b 1m 0 800m" "$SCRATCH_MNT"/file | \
33 _filter_xfs_io | _filter_scratch
34
35         rm -f "$SCRATCH_MNT"/file
36 done
37
38 status=0
39 exit