2 # test btrfs subvolume run normally with more than one subvolume
4 # - btrfs subvolume must not loop indefinitely
5 # - btrfs subvolume return 0 in normal case
7 source $TOP/tests/common
9 check_prereq mkfs.btrfs
15 run_check $SUDO_HELPER $TOP/mkfs.btrfs -f "$TEST_DEV"
16 run_check_mount_test_dev
18 # to check following thing in both 1 and multiple subvolume case:
19 # 1: is subvolume sync loop indefinitely
20 # 2: is return value right
22 run_check $SUDO_HELPER $TOP/btrfs subvolume create "$TEST_MNT"/mysubvol1
23 run_check $SUDO_HELPER $TOP/btrfs subvolume create "$TEST_MNT"/mysubvol2
24 run_check $SUDO_HELPER $TOP/btrfs subvolume delete "$TEST_MNT"/mysubvol1
25 run_check $SUDO_HELPER $TOP/btrfs subvolume delete "$TEST_MNT"/mysubvol2
26 run_check $SUDO_HELPER $TOP/btrfs subvolume sync "$TEST_MNT"
28 run_check $SUDO_HELPER $TOP/btrfs subvolume create "$TEST_MNT"/mysubvol
29 run_check $SUDO_HELPER $TOP/btrfs subvolume delete "$TEST_MNT"/mysubvol
30 run_check $SUDO_HELPER $TOP/btrfs subvolume sync "$TEST_MNT"
32 run_check_umount_test_dev