btrfs-progs: typo review of strings and comments
[platform/upstream/btrfs-progs.git] / tests / misc-tests / 007-subvolume-sync / test.sh
1 #!/bin/bash
2 # test btrfs subvolume run normally with more than one subvolume
3 #
4 # - btrfs subvolume must not loop indefinitely
5 # - btrfs subvolume return 0 in normal case
6
7 source $TOP/tests/common
8
9 check_prereq mkfs.btrfs
10 check_prereq btrfs
11
12 setup_root_helper
13 prepare_test_dev
14
15 run_check $SUDO_HELPER $TOP/mkfs.btrfs -f "$TEST_DEV"
16 run_check_mount_test_dev
17
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
21 #
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"
27
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"
31
32 run_check_umount_test_dev