2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (c) 2013 Fusion IO. All Rights Reserved.
5 # FS QA Test No. btrfs/009
7 # Regression test to make sure we can't delete the default subvol
10 _begin_fstest auto quick subvol
12 # Import common functions.
15 # real QA test starts here
19 _scratch_mkfs > /dev/null 2>&1
22 $BTRFS_UTIL_PROG subvolume create $SCRATCH_MNT/newvol >> $seqres.full 2>&1 \
23 || _fail "couldn't create subvol"
24 subvolid=$(_btrfs_get_subvolid $SCRATCH_MNT newvol)
25 $BTRFS_UTIL_PROG subvolume set-default $subvolid $SCRATCH_MNT >> $seqres.full 2>&1 \
26 || _fail "couldn't set default"
27 $BTRFS_UTIL_PROG subvolume delete $SCRATCH_MNT/newvol >> $seqres.full 2>&1
29 _try_scratch_mount || _fail "mount should have succeeded"
31 echo "Silence is golden"