3 # minimal test for the following syntax: btrfs send -p parent subvol1 subvol2
5 source "$TEST_TOP/common"
7 check_prereq mkfs.btrfs
13 run_check "$TOP/mkfs.btrfs" -f "$TEST_DEV"
14 run_check_mount_test_dev
17 cd "$TEST_MNT" || _fail "cannot chdir to TEST_MNT"
19 run_check $SUDO_HELPER "$TOP/btrfs" subvolume create subv-parent
20 run_check $SUDO_HELPER dd if=/dev/urandom of=subv-parent/file bs=1M count=10
21 run_check $SUDO_HELPER "$TOP/btrfs" subvolume snapshot -r subv-parent subv-snap1
22 run_check $SUDO_HELPER dd if=/dev/urandom of=subv-parent/file bs=1M count=10
23 run_check $SUDO_HELPER "$TOP/btrfs" subvolume snapshot -r subv-parent subv-snap2
24 run_check $SUDO_HELPER dd if=/dev/urandom of=subv-parent/file bs=1M count=10
25 run_check $SUDO_HELPER "$TOP/btrfs" subvolume snapshot -r subv-parent subv-snap3
27 run_check truncate -s0 "$here"/send.stream
28 run_check chmod a+w "$here"/send.stream
29 run_check $SUDO_HELPER "$TOP/btrfs" send -f "$here"/send.stream -p subv-snap1 subv-snap2 subv-snap3
31 cd "$here" || _fail "cannot chdir back to test directory"
34 run_check_umount_test_dev