diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2022-07-01 18:13:30 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@gmail.com> | 2022-07-01 20:08:07 -0400 |
commit | ea2f5854a8e8bc520820face57d965436f4d8554 (patch) | |
tree | ab5b3a9d1a2c6cb6f95ebb2f7deac04dce3bc081 | |
parent | bbb6c92273d1e74fde15afed3204807c9cfaffb1 (diff) |
Tests can now specify architecture with config-arch
This will overide -a, if also specified on the command line. This also
updates bcachefs/32bit.ktest, which can now boot with the correct root
image.
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
-rw-r--r-- | lib/libktest.sh | 10 | ||||
-rw-r--r-- | lib/parse-test.sh | 8 | ||||
-rw-r--r-- | tests/bcachefs/32bit.ktest | 8 |
3 files changed, 21 insertions, 5 deletions
diff --git a/lib/libktest.sh b/lib/libktest.sh index d60f768..25f4468 100644 --- a/lib/libktest.sh +++ b/lib/libktest.sh @@ -84,10 +84,8 @@ parse_ktest_arg() esac } -parse_args_post() +checkdep_arch() { - parse_arch "$ktest_arch" - checkdep $QEMU_BIN $QEMU_PACKAGE if [[ -z $ktest_root_image ]]; then @@ -101,6 +99,12 @@ parse_args_post() exit 1 fi fi +} + +parse_args_post() +{ + parse_arch "$ktest_arch" + checkdep_arch ktest_out=$(readlink -f "$ktest_out") ktest_kernel_binary="$ktest_out/kernel.$ktest_arch" diff --git a/lib/parse-test.sh b/lib/parse-test.sh index 161d81f..c6be06b 100644 --- a/lib/parse-test.sh +++ b/lib/parse-test.sh @@ -153,6 +153,12 @@ parse_test_deps() ktest_timeout=$n } + config-arch() + { + parse_arch "$1" + checkdep_arch + } + pushd "$(dirname "$TESTPROG")" > /dev/null . $(basename "$TESTPROG") popd > /dev/null @@ -273,7 +279,7 @@ parse_test_deps() # Mark tests not run: local testname=$(basename -s .ktest "$ktest_test") - mkdir -p $ktest_out/out + mkdir -p "$ktest_out/out" for t in $ktest_tests; do t=$(echo "$t"|tr / .) diff --git a/tests/bcachefs/32bit.ktest b/tests/bcachefs/32bit.ktest index fb1f179..86c1058 100644 --- a/tests/bcachefs/32bit.ktest +++ b/tests/bcachefs/32bit.ktest @@ -4,7 +4,13 @@ # going to be able to run much with this kernel - this is really just for # checking if it builds +config-arch x86 + require-lib bcachefs-test-libs.sh -require-kernel-config 64BIT=n config-timeout 30 + +test_boot() +{ + true +} |