2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (C) 2016 SUSE Linux Products GmbH. All Rights Reserved.
5 # FS QA Test No. btrfs/121
7 # Test that an invalid parent qgroup does not cause snapshot create to
8 # force the FS readonly.
10 # This issue is fixed by the following btrfs patch:
11 # [PATCH] btrfs: handle non-fatal errors in btrfs_qgroup_inherit()
12 # http://thread.gmane.org/gmane.comp.file-systems.btrfs/54755
15 seqres=$RESULT_DIR/$seq
16 echo "QA output created by $seq"
20 status=1 # failure is the default!
21 trap "_cleanup; exit \$status" 0 1 2 3 15
29 # get standard environment, filters and checks
33 # remove previous $seqres.full before test
36 # real QA test starts here
43 _scratch_mkfs >/dev/null
45 _run_btrfs_util_prog quota enable $SCRATCH_MNT
46 # The qgroup '1/10' does not exist and should be silently ignored
47 _run_btrfs_util_prog subvolume snapshot -i 1/10 $SCRATCH_MNT $SCRATCH_MNT/snap1
49 echo "Silence is golden"