From d4d500d341a352c882169a67b1a0c8119ed4257e Mon Sep 17 00:00:00 2001 From: Zhao Lei Date: Mon, 31 Aug 2015 13:04:36 +0800 Subject: btrfs-progs: tests: Introduce init_env to initialize common env variant For example, $TEST_DIR is common used in severial tests, and have duplicated code for initialize. These duplicated code not only benifits harddisk vendor, but have inconsistent details, as: convert-tests.sh: lack of mkdir fsck-tests/012-leaf-corruption/test.sh: unnecessary mkdir fsck-tests/013-extent-tree-rebuild/test.sh: unnecessary init misc-tests/XXX ... And severial error message: _fail "unable to create mount point on $TEST_MNT" _fail "failed to create mount point" ... This patch move initizlizaton of $TEST_DIR to common init_env(), to avoid above problem, and init_env() can be used to add more things in future. Signed-off-by: Zhao Lei Signed-off-by: David Sterba --- tests/misc-tests/003-zero-log/test.sh | 5 ----- 1 file changed, 5 deletions(-) (limited to 'tests/misc-tests/003-zero-log') diff --git a/tests/misc-tests/003-zero-log/test.sh b/tests/misc-tests/003-zero-log/test.sh index edab5dbc..b650930e 100755 --- a/tests/misc-tests/003-zero-log/test.sh +++ b/tests/misc-tests/003-zero-log/test.sh @@ -8,11 +8,6 @@ check_prereq mkfs.btrfs check_prereq btrfs prepare_test_dev -if [ -z $TEST_MNT ];then - echo " [NOTRUN] extent tree rebuild, need TEST_MNT variant" - exit 0 -fi - get_log_root() { local image -- cgit v1.2.3