From ea4d99157c84130ba23c4e7e2b9b39d96256ac0f Mon Sep 17 00:00:00 2001 From: Nikolay Borisov Date: Thu, 16 May 2019 16:12:50 +0300 Subject: [PATCH] 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 Signed-off-by: David Sterba --- tests/misc-tests/037-fi-show-on-new-file/test.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100755 tests/misc-tests/037-fi-show-on-new-file/test.sh diff --git a/tests/misc-tests/037-fi-show-on-new-file/test.sh b/tests/misc-tests/037-fi-show-on-new-file/test.sh new file mode 100755 index 00000000..2a04583c --- /dev/null +++ b/tests/misc-tests/037-fi-show-on-new-file/test.sh @@ -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"