xfs: Add test for too-small device with stripe geometry
[xfstests-dev.git] / tests / btrfs / 057
1 #! /bin/bash
2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (C) 2014 Fujitsu.  All rights reserved.
4 #
5 # FSQA Test No. btrfs/057
6 #
7 # Quota rescan stress test, we run fsstress and quota rescan concurrently
8 #
9 seq=`basename $0`
10 seqres=$RESULT_DIR/$seq
11 echo "QA output created by $seq"
12
13 here=`pwd`
14 tmp=/tmp/$$
15 status=1
16
17 _cleanup()
18 {
19         cd /
20         rm -f $tmp.*
21 }
22 trap "_cleanup; exit \$status" 0 1 2 3 15
23
24 # get standard environment, filters and checks
25 . ./common/rc
26 . ./common/filter
27
28 # real QA test starts here
29 _supported_fs btrfs
30 _require_scratch
31
32 rm -f $seqres.full
33
34 run_check _scratch_mkfs "-b 1g"
35
36 _scratch_mount
37
38 # -w ensures that the only ops are ones which cause write I/O
39 run_check $FSSTRESS_PROG -d $SCRATCH_MNT -w -p 5 -n 1000 \
40                 $FSSTRESS_AVOID >&/dev/null
41
42 _run_btrfs_util_prog subvolume snapshot $SCRATCH_MNT \
43         $SCRATCH_MNT/snap1
44
45 run_check $FSSTRESS_PROG -d $SCRATCH_MNT/snap1 -w -p 5 -n 1000 \
46        $FSSTRESS_AVOID >&/dev/null
47
48 _run_btrfs_util_prog quota enable $SCRATCH_MNT
49 _run_btrfs_util_prog quota rescan -w $SCRATCH_MNT
50
51 echo "Silence is golden"
52 # btrfs check will detect any qgroup number mismatch.
53
54 status=0
55 exit