mirror of
https://github.com/kdave/btrfs-progs
synced 2024-12-24 15:12:47 +00:00
btrfs-progs: tests: add more checks for tools used in convert tests
Tools that may not be present in common installations should be checked in the tests. Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
1d5f84831c
commit
847ff667ce
@ -22,6 +22,10 @@ export TEST_DEV
|
||||
rm -f "$RESULTS"
|
||||
|
||||
check_kernel_support
|
||||
# anything expected by common.convert
|
||||
check_global_prereq getfacl
|
||||
check_global_prereq setfacl
|
||||
check_global_prereq md5sum
|
||||
|
||||
run_one_test() {
|
||||
local testdir
|
||||
|
@ -6,6 +6,7 @@ source "$TOP/tests/common.convert"
|
||||
setup_root_helper
|
||||
prepare_test_dev 512M
|
||||
check_prereq btrfs-convert
|
||||
check_global_prereq mke2fs
|
||||
|
||||
for feature in '' 'extref' 'skinny-metadata' 'no-holes'; do
|
||||
convert_test ext2 "$feature" "ext2 4k nodesize" 4096 mke2fs -b 4096
|
||||
|
@ -6,6 +6,7 @@ source "$TOP/tests/common.convert"
|
||||
setup_root_helper
|
||||
prepare_test_dev 512M
|
||||
check_prereq btrfs-convert
|
||||
check_global_prereq mke2fs
|
||||
|
||||
for feature in '' 'extref' 'skinny-metadata' 'no-holes'; do
|
||||
convert_test ext3 "$feature" "ext3 4k nodesize" 4096 mke2fs -j -b 4096
|
||||
|
@ -6,6 +6,7 @@ source "$TOP/tests/common.convert"
|
||||
setup_root_helper
|
||||
prepare_test_dev 512M
|
||||
check_prereq btrfs-convert
|
||||
check_global_prereq mke2fs
|
||||
|
||||
for feature in '' 'extref' 'skinny-metadata' 'no-holes'; do
|
||||
convert_test ext4 "$feature" "ext4 4k nodesize" 4096 mke2fs -t ext4 -b 4096
|
||||
|
@ -8,6 +8,7 @@ source "$TOP/tests/common.convert"
|
||||
setup_root_helper
|
||||
prepare_test_dev 512M
|
||||
check_prereq btrfs-convert
|
||||
check_global_prereq mke2fs
|
||||
|
||||
# simple wrapper for a convert test
|
||||
# $1: btrfs features, argument to -O
|
||||
|
@ -11,6 +11,7 @@ source "$TOP/tests/common.convert"
|
||||
setup_root_helper
|
||||
prepare_test_dev 512M
|
||||
check_prereq btrfs-convert
|
||||
check_global_prereq mke2fs
|
||||
|
||||
default_mke2fs="mke2fs -t ext4 -b 4096"
|
||||
convert_test_preamble '' 'large hole extent test' 16k "$default_mke2fs"
|
||||
|
@ -7,6 +7,7 @@ source "$TOP/tests/common.convert"
|
||||
setup_root_helper
|
||||
prepare_test_dev 512M
|
||||
check_prereq btrfs-convert
|
||||
check_global_prereq mke2fs
|
||||
|
||||
for bs in 1024 2048; do
|
||||
default_mke2fs="mke2fs -t ext4 -b $bs"
|
||||
|
@ -7,6 +7,7 @@ source "$TOP/tests/common.convert"
|
||||
setup_root_helper
|
||||
prepare_test_dev 512M
|
||||
check_prereq btrfs-convert
|
||||
check_global_prereq mke2fs
|
||||
|
||||
default_mke2fs="mke2fs -t ext4 -b 4096"
|
||||
convert_test_preamble '' 'readonly image test' 16k "$default_mke2fs"
|
||||
|
@ -7,6 +7,9 @@ source "$TOP/tests/common.convert"
|
||||
setup_root_helper
|
||||
prepare_test_dev 512M
|
||||
check_prereq btrfs-convert
|
||||
check_global_prereq mke2fs
|
||||
check_global_prereq lsattr
|
||||
check_global_prereq chattr
|
||||
|
||||
fail=0
|
||||
default_mke2fs="mke2fs -t ext4 -b 4096"
|
||||
|
@ -6,6 +6,7 @@ source "$TOP/tests/common.convert"
|
||||
setup_root_helper
|
||||
prepare_test_dev 512M
|
||||
check_prereq btrfs-convert
|
||||
check_global_prereq mkreiserfs
|
||||
|
||||
for feature in '' 'extref' 'skinny-metadata' 'no-holes'; do
|
||||
convert_test reiserfs "$feature" "reiserfs 4k nodesize" 4096 mkreiserfs -b 4096
|
||||
|
@ -7,6 +7,7 @@ source "$TOP/tests/common.convert"
|
||||
setup_root_helper
|
||||
prepare_test_dev 512M
|
||||
check_prereq btrfs-convert
|
||||
check_global_prereq mkreiserfs
|
||||
|
||||
# simple wrapper for a convert test
|
||||
# $1: btrfs features, argument to -O
|
||||
|
@ -11,6 +11,7 @@ source "$TOP/tests/common.convert"
|
||||
setup_root_helper
|
||||
prepare_test_dev 512M
|
||||
check_prereq btrfs-convert
|
||||
check_global_prereq mkreiserfs
|
||||
|
||||
default_mkfs="mkreiserfs -b 4096"
|
||||
convert_test_preamble '' 'large hole extent test' 16k "$default_mkfs"
|
||||
|
@ -7,6 +7,9 @@ source "$TOP/tests/common.convert"
|
||||
setup_root_helper
|
||||
prepare_test_dev 512M
|
||||
check_prereq btrfs-convert
|
||||
check_global_prereq mkreiserfs
|
||||
check_global_prereq chattr
|
||||
check_global_prereq lsattr
|
||||
|
||||
fail=0
|
||||
default_mkfs="mkreiserfs -b 4096"
|
||||
|
@ -13,6 +13,8 @@ setup_root_helper
|
||||
prepare_test_dev 512M
|
||||
check_prereq btrfs-convert
|
||||
check_global_prereq md5sum
|
||||
check_global_prereq mkreiserfs
|
||||
check_global_prereq perl
|
||||
|
||||
perl -e "print 'a'x8192;" > input
|
||||
perl -e "print 'b'x8192;" > input2
|
||||
|
Loading…
Reference in New Issue
Block a user