[PATCH 09/18] selftests/liveupdate: Run tests in subdirectories from run-vmtests.sh
From: David Matlack
Date: Tue Dec 01 2026 - 19:40:41 EST
Make run-vmtests.sh also run every test defined by a
<dir>/<test>.vmtest.sh file, so that tests in subdirectories can be
added without changing the list of tests in run-vmtests.sh.
Replace slashes in test names with underscores when naming log files,
since such test names include the subdirectory.
Signed-off-by: David Matlack <dmatlack@xxxxxxxxxx>
---
tools/testing/selftests/liveupdate/run-vmtests.sh | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/tools/testing/selftests/liveupdate/run-vmtests.sh b/tools/testing/selftests/liveupdate/run-vmtests.sh
index c3d828cfd63b..2460ac955511 100755
--- a/tools/testing/selftests/liveupdate/run-vmtests.sh
+++ b/tools/testing/selftests/liveupdate/run-vmtests.sh
@@ -22,6 +22,13 @@ TEST_NAMES=(
"luo_stress_sessions"
)
+# Tests in subdirectories are described by <dir>/<name>.vmtest.sh
+for test_def in "$SCRIPT_DIR"/*/*.vmtest.sh; do
+ [ -f "$test_def" ] || continue
+ test_def=${test_def#"$SCRIPT_DIR/"}
+ TEST_NAMES+=("${test_def%.vmtest.sh}")
+done
+
function usage() {
cat <<EOF
$0 [-k] [-o output_dir] [-h]
@@ -73,7 +80,7 @@ function main() {
for arch in "${TARGETS[@]}"; do
for test_name in "${TEST_NAMES[@]}"; do
- log="$output_dir/${arch}_${test_name}.log"
+ log="$output_dir/${arch}_${test_name//\//_}.log"
printf " -> %-8s %-24s ... " "$arch" "$test_name"
--
2.56.1.911.g883d8bcb20-goog