btrfs: test incremental send after removing a directory and all its files
[xfstests-dev.git] / tests / btrfs / 115
1 #! /bin/bash
2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (c) 2015 NETGEAR, Inc.  All Rights Reserved.
4 #
5 # FS QA Test No. btrfs/115
6 #
7 # btrfs quota scan/disable sanity test
8 # Make sure that disabling quotas during a quota rescan doesn't crash
9 #
10 seq=`basename $0`
11 seqres=$RESULT_DIR/$seq
12 echo "QA output created by $seq"
13
14 here=`pwd`
15 tmp=/tmp/$$
16 status=1        # failure is the default!
17 trap "_cleanup; exit \$status" 0 1 2 3 15
18
19 _cleanup()
20 {
21         cd /
22         rm -f $tmp.*
23 }
24
25 # get standard environment, filters and checks
26 . ./common/rc
27 . ./common/filter
28
29 # remove previous $seqres.full before test
30 rm -f $seqres.full
31
32 # real QA test starts here
33 _supported_fs btrfs
34 _require_scratch
35
36 _scratch_mkfs >>$seqres.full 2>&1
37 _scratch_mount
38
39 for i in `seq 0 1 450000`; do
40         echo -n > $SCRATCH_MNT/file.$i
41 done
42 echo 3 > /proc/sys/vm/drop_caches
43 $BTRFS_UTIL_PROG quota enable $SCRATCH_MNT
44 $BTRFS_UTIL_PROG quota disable $SCRATCH_MNT
45
46
47 echo "Silence is golden"
48 status=0
49 exit