blob: 4a151049c81c48e6897c5ada2520ef92995129d3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
#! /bin/bash
# SPDX-License-Identifier: GPL-2.0
# Copyright (c) 2013 Fusion IO. All Rights Reserved.
#
# FS QA Test No. btrfs/009
#
# Regression test to make sure we can't delete the default subvol
#
. ./common/preamble
_begin_fstest auto quick subvol
. ./common/filter
_supported_fs btrfs
_require_scratch
_scratch_mkfs > /dev/null 2>&1
_scratch_mount
$BTRFS_UTIL_PROG subvolume create $SCRATCH_MNT/newvol >> $seqres.full 2>&1 \
|| _fail "couldn't create subvol"
subvolid=$(_btrfs_get_subvolid $SCRATCH_MNT newvol)
$BTRFS_UTIL_PROG subvolume set-default $subvolid $SCRATCH_MNT >> $seqres.full 2>&1 \
|| _fail "couldn't set default"
$BTRFS_UTIL_PROG subvolume delete $SCRATCH_MNT/newvol >> $seqres.full 2>&1
_scratch_unmount
_try_scratch_mount || _fail "mount should have succeeded"
echo "Silence is golden"
status=0 ; exit
|