summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitmodules12
-rw-r--r--lib/parse-test.sh20
-rwxr-xr-xlib/testrunner16
-rw-r--r--lib/util.sh44
-rw-r--r--tests/bcachefs/bcachefs-test-libs.sh1
m---------tests/bcachefs/bcachefs-tools0
m---------tests/bcachefs/linuxquota-code0
-rw-r--r--tests/bcachefs/xfstests.ktest13
m---------tests/blktests0
-rw-r--r--tests/blktests.ktest8
-rw-r--r--tests/test-libs.sh3
m---------tests/xfstests0
-rw-r--r--tests/xfstests.sh20
13 files changed, 52 insertions, 85 deletions
diff --git a/.gitmodules b/.gitmodules
index db3d23a..fc71b90 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -1,15 +1,3 @@
[submodule "debootstrap"]
path = debootstrap
url = https://salsa.debian.org/installer-team/debootstrap.git/
-[submodule "tests/bcachefs/bcachefs-tools"]
- path = tests/bcachefs/bcachefs-tools
- url = https://evilpiepirate.org/git/bcachefs-tools.git
-[submodule "tests/bcachefs/linuxquota-code"]
- path = tests/bcachefs/linuxquota-code
- url = https://evilpiepirate.org/git/linuxquota.git
-[submodule "tests/blktests"]
- path = tests/blktests
- url = https://github.com/osandov/blktests.git
-[submodule "tests/xfstests"]
- path = tests/xfstests
- url = https://evilpiepirate.org/git/xfstests.git
diff --git a/lib/parse-test.sh b/lib/parse-test.sh
index 38034a2..7db560b 100644
--- a/lib/parse-test.sh
+++ b/lib/parse-test.sh
@@ -23,6 +23,21 @@ parse_test_deps()
popd > /dev/null
}
+ require-git()
+ {
+ local req="$1"
+ local dir=$(basename $req)
+ dir=${dir%%.git}
+
+ if [[ $# -ge 2 ]]; then
+ dir=$2
+ fi
+
+ if [[ ! -d $dir ]]; then
+ git clone $req $dir
+ fi
+ }
+
do-build-deb()
{
local path=$(readlink -e "$1")
@@ -60,6 +75,11 @@ parse_test_deps()
require-make()
{
+ if [[ ! -d "$1" ]]; then
+ echo "require-make: $1 not found"
+ exit 1
+ fi
+
local req=$(readlink -e "$1")
ktest_make_install+=("$req")
diff --git a/lib/testrunner b/lib/testrunner
index d177227..03e84ef 100755
--- a/lib/testrunner
+++ b/lib/testrunner
@@ -91,14 +91,16 @@ fi
j=$(($(grep -c '^processor' /proc/cpuinfo) * 2))
for i in "${ktest_make_install[@]}"; do
- if [ "$(basename $i)" = "linuxquota-code" ]; then
- pushd "/host/$i"
- ./autogen.sh
- ./configure
- popd
+ pushd "/host/$i" > /dev/null
+ if [[ -f autogen.sh && ! -f configure ]]; then
+ run_quiet "autogen $(basename $i)" ./autogen.sh
fi
-
- run_quiet "building $(basename $i)" make -j $j -C "/host/$i" install
+ if [[ -f configure && ! -f Makefile ]]; then
+ run_quiet "configure $(basename $i)" ./configure
+ fi
+ run_quiet "building $(basename $i)" make -j $j
+ run_quiet "installing $(basename $i)" make -j $j install
+ popd > /dev/null
done
get_stratch_devs()
diff --git a/lib/util.sh b/lib/util.sh
index b4d40be..7fc1073 100644
--- a/lib/util.sh
+++ b/lib/util.sh
@@ -164,50 +164,6 @@ parse_arch()
# fi
}
-#debian_arch()
-#{
-# local -A map=([x86]=i386 [x86_64]=amd64)
-#
-# if [[ ${map[$1]+_} ]]; then
-# echo ${map[$1]}
-# else
-# echo $1
-# fi
-#}
-#
-#kernel_arch()
-#{
-# local -A map=([x86_64]=x86)
-#
-# if [[ ${map[$1]+_} ]]; then
-# echo ${map[$1]}
-# else
-# echo $1
-# fi
-#}
-#
-#qemu_arch()
-#{
-# local -A map=([x86_64]=x86 [powerpc]=ppc)
-#
-# if [[ ${map[$1]+_} ]]; then
-# echo ${map[$1]}
-# else
-# echo $1
-# fi
-#}
-#
-#arch_to_triple()
-#{
-# local -A map=([x86]=x86_64 [sparc]=sparc64)
-#
-# if [[ ${map[$1]+_} ]]; then
-# echo ${map[$1]}-linux-gnu
-# else
-# echo $1-linux-gnu
-# fi
-#}
-
join_by()
{
local IFS="$1"
diff --git a/tests/bcachefs/bcachefs-test-libs.sh b/tests/bcachefs/bcachefs-test-libs.sh
index 2320dde..d8f4b5c 100644
--- a/tests/bcachefs/bcachefs-test-libs.sh
+++ b/tests/bcachefs/bcachefs-test-libs.sh
@@ -4,6 +4,7 @@
#
require-lib ../test-libs.sh
+require-git http://evilpiepirate.org/git/bcachefs-tools.git
require-make bcachefs-tools
require-kernel-config BCACHEFS_FS
diff --git a/tests/bcachefs/bcachefs-tools b/tests/bcachefs/bcachefs-tools
deleted file mode 160000
-Subproject d7bfc55d236363c7f9d2edee7437202497e462b
diff --git a/tests/bcachefs/linuxquota-code b/tests/bcachefs/linuxquota-code
deleted file mode 160000
-Subproject 00bac487b0f105a875819faaa6bc0e450b80650
diff --git a/tests/bcachefs/xfstests.ktest b/tests/bcachefs/xfstests.ktest
index 98195b1..3ff6244 100644
--- a/tests/bcachefs/xfstests.ktest
+++ b/tests/bcachefs/xfstests.ktest
@@ -1,15 +1,20 @@
#!/bin/bash
-require-lib ../xfstests.sh
require-lib bcachefs-test-libs.sh
+require-git http://evilpiepirate.org/git/linuxquota.git
+require-make linuxquota
+
+require-git http://evilpiepirate.org/git/xfstests.git ../xfstests
+
+require-lib ../xfstests.sh
+
require-kernel-config BCACHEFS_POSIX_ACL
require-kernel-config BCACHEFS_QUOTA=y
require-kernel-config QUOTA
-require-make linuxquota-code
-
-config-mem 2G
+config-mem 4G
+config-cpus 24
run_tests()
{
diff --git a/tests/blktests b/tests/blktests
deleted file mode 160000
-Subproject 1607b87e67afa359e63b46613ce75acebfaf822
diff --git a/tests/blktests.ktest b/tests/blktests.ktest
index 69c3237..b1e8d42 100644
--- a/tests/blktests.ktest
+++ b/tests/blktests.ktest
@@ -2,6 +2,9 @@
# blktests wrapper:
+require-git https://github.com/osandov/blktests.git
+require-make blktests
+
require-lib test-libs.sh
require-kernel-config FAULT_INJECTION,FAULT_INJECTION_DEBUG_FS,FAIL_MAKE_REQUEST
@@ -22,11 +25,6 @@ config-scratch-devs 4G
config-timeout $(stress_timeout)
-hook_make_blktests()
-{
- make -C "$ktest_dir/tests/blktests"
-}
-
list_tests()
{
(cd "$ktest_dir/tests/blktests/tests"; echo */???)
diff --git a/tests/test-libs.sh b/tests/test-libs.sh
index 5b88d24..7b533c2 100644
--- a/tests/test-libs.sh
+++ b/tests/test-libs.sh
@@ -12,8 +12,9 @@ config-mem 2G
setup_tracing()
{
echo > /sys/kernel/debug/tracing/trace
- echo 1 > /sys/kernel/debug/tracing/buffer_size_kb
+ echo 4096 > /sys/kernel/debug/tracing/buffer_size_kb
echo $@ > /sys/kernel/debug/tracing/set_event
+ echo trace_printk > /sys/kernel/debug/tracing/trace_options
echo 1 > /proc/sys/kernel/ftrace_dump_on_oops
echo 1 > /sys/kernel/debug/tracing/options/overwrite
echo 1 > /sys/kernel/debug/tracing/tracing_on
diff --git a/tests/xfstests b/tests/xfstests
deleted file mode 160000
-Subproject 18ac4efa77bb38f8c4b82da417d5de8fd4bbf52
diff --git a/tests/xfstests.sh b/tests/xfstests.sh
index 2cd9940..4d9c842 100644
--- a/tests/xfstests.sh
+++ b/tests/xfstests.sh
@@ -2,6 +2,9 @@
require-lib test-libs.sh
+require-git https://git.kernel.org/pub/scm/fs/xfs/xfstests-dev.git xfstests
+require-make xfstests
+
require-kernel-config FAULT_INJECTION,FAULT_INJECTION_DEBUG_FS,FAIL_MAKE_REQUEST
require-kernel-config MD,BLK_DEV_DM,DM_FLAKEY,DM_SNAPSHOT,DM_LOG_WRITES
require-kernel-config DM_THIN_PROVISIONING
@@ -16,18 +19,6 @@ config-scratch-devs 14G
config-timeout 7200
-hook_make_xfstests()
-{
- useradd -m fsgqa || true
- useradd -g fsgqa 123456-fsgqa || true
-
- mkdir -p /mnt/test /mnt/scratch
-
- rm -f /ktest/tests/xfstests/results/generic/*
-
- make -C /ktest/tests/xfstests
-}
-
list_tests()
{
(cd "/ktest/tests/xfstests/tests"; echo generic/???)
@@ -48,6 +39,11 @@ RESULT_BASE=/ktest-out/xfstests-results
LOGGER_PROG=true
EOF
+ useradd -m fsgqa || true
+ useradd -g fsgqa 123456-fsgqa || true
+
+ mkdir -p /mnt/test /mnt/scratch
+
wipefs -af /dev/sdb
mkfs.$FSTYP -q /dev/sdb