2017-10-05 14:25:21 +00:00
|
|
|
#!/bin/bash
|
|
|
|
# check that the toplevel subvolume is not listed as regular or deleted
|
|
|
|
|
2018-02-08 06:34:19 +00:00
|
|
|
source "$TEST_TOP/common"
|
2017-10-05 14:25:21 +00:00
|
|
|
|
|
|
|
check_prereq mkfs.btrfs
|
|
|
|
check_prereq btrfs
|
|
|
|
|
2023-04-11 23:51:28 +00:00
|
|
|
setup_root_helper
|
2017-10-05 14:25:21 +00:00
|
|
|
prepare_test_dev
|
|
|
|
|
2019-06-05 17:09:38 +00:00
|
|
|
run_check_mkfs_test_dev
|
2017-10-05 14:25:21 +00:00
|
|
|
run_check_mount_test_dev
|
|
|
|
run_check_stdout $SUDO_HELPER "$TOP/btrfs" subvolume list "$TEST_MNT" |
|
|
|
|
grep -i -q "id 5" && _fail "found toplevel among regular"
|
|
|
|
run_check_stdout $SUDO_HELPER "$TOP/btrfs" subvolume list -d "$TEST_MNT" |
|
|
|
|
grep -i -q "id 5.*DELETED" && _fail "found toplevel among deleted"
|
|
|
|
|
|
|
|
run_check_umount_test_dev
|