mirror of
https://github.com/kdave/btrfs-progs
synced 2024-12-23 14:45:19 +00:00
btrfs-progs: tests: unify test drivers
Remove unnecessary code, add exports to all common variables. Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
b5ab8d42b7
commit
e5f8099464
@ -2,8 +2,6 @@
|
||||
#
|
||||
# command line interface coverage tests
|
||||
|
||||
unset TOP
|
||||
unset LANG
|
||||
LANG=C
|
||||
SCRIPT_DIR=$(dirname $(readlink -f $0))
|
||||
TOP=$(readlink -f $SCRIPT_DIR/../)
|
||||
@ -17,6 +15,7 @@ export TOP
|
||||
export RESULTS
|
||||
export LANG
|
||||
export IMAGE
|
||||
export TEST_DEV
|
||||
|
||||
rm -f $RESULTS
|
||||
|
||||
|
@ -2,10 +2,7 @@
|
||||
#
|
||||
# convert ext2/3/4 images to btrfs images, and make sure the results are
|
||||
# clean.
|
||||
#
|
||||
|
||||
unset TOP
|
||||
unset LANG
|
||||
LANG=C
|
||||
SCRIPT_DIR=$(dirname $(readlink -f $0))
|
||||
TOP=$(readlink -f $SCRIPT_DIR/../)
|
||||
@ -16,10 +13,11 @@ IMAGE="$TOP/tests/test.img"
|
||||
source $TOP/tests/common
|
||||
source $TOP/tests/common.convert
|
||||
|
||||
# Allow child test to use $TOP and $RESULTS
|
||||
export TOP
|
||||
export RESULTS
|
||||
export LANG
|
||||
export IMAGE
|
||||
export TEST_DEV
|
||||
|
||||
rm -f $RESULTS
|
||||
|
||||
|
@ -1,25 +1,21 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# loop through all of our bad images and make sure fsck repairs them properly
|
||||
#
|
||||
# It's GPL, same as everything else in this tree.
|
||||
#
|
||||
|
||||
unset TOP
|
||||
unset LANG
|
||||
LANG=C
|
||||
SCRIPT_DIR=$(dirname $(readlink -f $0))
|
||||
TOP=$(readlink -f $SCRIPT_DIR/../)
|
||||
TEST_DEV=${TEST_DEV:-}
|
||||
RESULTS="$TOP/tests/fsck-tests-results.txt"
|
||||
IMAGE="$TOP/tests/test.img"
|
||||
|
||||
source $TOP/tests/common
|
||||
|
||||
# Allow child test to use $TOP and $RESULTS
|
||||
export TOP
|
||||
export RESULTS
|
||||
# For custom script needs to verify recovery
|
||||
export LANG
|
||||
export IMAGE
|
||||
export TEST_DEV
|
||||
|
||||
rm -f $RESULTS
|
||||
|
||||
|
@ -2,8 +2,6 @@
|
||||
#
|
||||
# misc tests on fuzzed or crafted images
|
||||
|
||||
unset TOP
|
||||
unset LANG
|
||||
LANG=C
|
||||
SCRIPT_DIR=$(dirname $(readlink -f $0))
|
||||
TOP=$(readlink -f $SCRIPT_DIR/../)
|
||||
@ -17,6 +15,7 @@ export TOP
|
||||
export RESULTS
|
||||
export LANG
|
||||
export IMAGE
|
||||
export TEST_DEV
|
||||
|
||||
rm -f $RESULTS
|
||||
|
||||
|
@ -2,8 +2,6 @@
|
||||
#
|
||||
# Misc tests
|
||||
|
||||
unset TOP
|
||||
unset LANG
|
||||
LANG=C
|
||||
SCRIPT_DIR=$(dirname $(readlink -f $0))
|
||||
TOP=$(readlink -f $SCRIPT_DIR/../)
|
||||
@ -13,12 +11,10 @@ IMAGE="$TOP/tests/test.img"
|
||||
|
||||
source $TOP/tests/common
|
||||
|
||||
# Allow child test to use $TOP and $RESULTS
|
||||
export TOP
|
||||
export RESULTS
|
||||
# For custom script needs to verify recovery
|
||||
export LANG
|
||||
# For tests that only use a loop device
|
||||
export TEST_DEV
|
||||
export IMAGE
|
||||
|
||||
rm -f $RESULTS
|
||||
|
@ -2,8 +2,6 @@
|
||||
#
|
||||
# mkfs.btrfs tests
|
||||
|
||||
unset TOP
|
||||
unset LANG
|
||||
LANG=C
|
||||
SCRIPT_DIR=$(dirname $(readlink -f $0))
|
||||
TOP=$(readlink -f $SCRIPT_DIR/../)
|
||||
@ -13,13 +11,11 @@ IMAGE="$TOP/tests/test.img"
|
||||
|
||||
source $TOP/tests/common
|
||||
|
||||
# Allow child test to use $TOP and $RESULTS
|
||||
export TOP
|
||||
export RESULTS
|
||||
# For custom script needs to verify recovery
|
||||
export LANG
|
||||
# For tests that only use a loop device
|
||||
export IMAGE
|
||||
export TEST_DEV
|
||||
|
||||
rm -f $RESULTS
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user