mirror of
https://github.com/kdave/btrfs-progs
synced 2025-01-29 17:02:43 +00:00
btrfs-progs: tests: Test fs on image files is correctly recognised
This ensures that 'btrfs filesystem show' can correctly identify a filesystem on a newly created local file. Signed-off-by: Nikolay Borisov <nborisov@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
fac44aba04
commit
ea4d99157c
15
tests/misc-tests/037-fi-show-on-new-file/test.sh
Executable file
15
tests/misc-tests/037-fi-show-on-new-file/test.sh
Executable file
@ -0,0 +1,15 @@
|
||||
#!/bin/bash
|
||||
# test for 'filesystem show' on fresh local file
|
||||
|
||||
source "$TEST_TOP/common"
|
||||
|
||||
check_prereq mkfs.btrfs
|
||||
check_prereq btrfs
|
||||
|
||||
IMAGE=$(mktemp -u btrfs-XXXXXX.img)
|
||||
|
||||
run_check truncate -s3g "$IMAGE"
|
||||
run_check $SUDO_HELPER "$TOP/mkfs.btrfs" -f "$IMAGE"
|
||||
run_check $SUDO_HELPER "$TOP/btrfs" filesystem show "$IMAGE"
|
||||
|
||||
rm -f "$IMAGE"
|
Loading…
Reference in New Issue
Block a user