mirror of
https://github.com/kdave/btrfs-progs
synced 2025-02-02 10:51:43 +00:00
btrfs-progs: tests: cli/003 verify that the path is not an image
Add a test case which ensures that when resize is tried on an image instead of a directory appropriate warning is produced and the command fails. Signed-off-by: Nikolay Borisov <nborisov@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
07b06ead7e
commit
b39d02a0c0
@ -54,4 +54,11 @@ for sep in '' '--'; do
|
||||
run_check $SUDO_HELPER "$TOP/btrfs" filesystem resize $sep 1:max "$TEST_MNT"
|
||||
done
|
||||
|
||||
# Test passing a file instead of a directory
|
||||
run_mustfail_stdout "should fail for image" \
|
||||
"$TOP/btrfs" filesystem resize 1:-128M "$TEST_DEV" |
|
||||
_log_stdout |
|
||||
grep -q "ERROR: resize works on mounted filesystems and accepts only" ||
|
||||
_fail "no expected error message in the output 2"
|
||||
|
||||
run_check_umount_test_dev
|
||||
|
Loading…
Reference in New Issue
Block a user