3 # test receiving stream that's not valid, simple cases
5 source $TOP/tests/common
7 check_prereq mkfs.btrfs
13 run_check $TOP/mkfs.btrfs -f $IMAGE
14 run_check_mount_test_dev
16 echo -n '' | run_mayfail $SUDO_HELPER "$TOP/btrfs" receive "$TEST_MNT" &&
17 _fail "unexpected: received empty stream"
19 echo -n '1' | run_mayfail $SUDO_HELPER "$TOP/btrfs" receive "$TEST_MNT" &&
20 _fail "unexpected: received stream with shrot and corrupted header"
22 echo -n '12345678901234567' | run_mayfail $SUDO_HELPER "$TOP/btrfs" receive "$TEST_MNT" &&
23 _fail "unexpected: received stream with corrupted header"
25 run_check_umount_test_dev