* [PATCH] selftests/liveupdate: Preserve VM workspaces with run-vmtests.sh -k
@ 2026-10-29 9:05 George Guo
2026-10-29 9:14 ` sashiko-bot
0 siblings, 1 reply; 2+ messages in thread
From: George Guo @ 2026-10-29 9:05 UTC (permalink / raw)
To: pasha.tatashin, rppt, pratyush, shuah
Cc: guodongtai, kexec, linux-kselftest, linux-kernel
From: George Guo <guodongtai@kylinos.cn>
run-vmtests.sh -k keeps the test output logs, but vmtest.sh still
removes its workspace and qemu.serial, losing the guest output needed
to debug failures.
Forward -k to vmtest.sh when keeping logs and update the help texts to
match.
Signed-off-by: George Guo <guodongtai@kylinos.cn>
---
tools/testing/selftests/liveupdate/run-vmtests.sh | 7 +++++--
tools/testing/selftests/liveupdate/vmtest.sh | 2 +-
2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/tools/testing/selftests/liveupdate/run-vmtests.sh b/tools/testing/selftests/liveupdate/run-vmtests.sh
index d656ce58c5a7..6f592aec0f85 100755
--- a/tools/testing/selftests/liveupdate/run-vmtests.sh
+++ b/tools/testing/selftests/liveupdate/run-vmtests.sh
@@ -26,7 +26,7 @@ function usage() {
cat <<EOF
$0 [-k] [-o output_dir] [-h]
Options:
- -k) keep logs
+ -k) keep logs and VM workspaces, including guest serial logs
-o) specify output directory
-h) display this help
EOF
@@ -48,6 +48,8 @@ function fail() {
}
function main() {
+ local -a vmtest_args=()
+
while getopts 'hko:' opt; do
case $opt in
k) keep_logs=1 ;;
@@ -59,6 +61,7 @@ function main() {
done
if [ -n "$keep_logs" ]; then
+ vmtest_args+=(-k)
if [ -z "$output_dir" ]; then
output_dir="$SCRIPT_DIR/results_$(date +%Y%m%d_%H%M%S)"
fi;
@@ -74,7 +77,7 @@ function main() {
printf " -> %-8s %-24s ... " "$arch" "$test_name"
- "$TEST_RUNNER" -t "$arch" -T "$test_name" &> "$log"
+ "$TEST_RUNNER" "${vmtest_args[@]}" -t "$arch" -T "$test_name" &> "$log"
exit_code=$?
case $exit_code in
diff --git a/tools/testing/selftests/liveupdate/vmtest.sh b/tools/testing/selftests/liveupdate/vmtest.sh
index 69beda6c961d..bd7032c4b122 100755
--- a/tools/testing/selftests/liveupdate/vmtest.sh
+++ b/tools/testing/selftests/liveupdate/vmtest.sh
@@ -40,7 +40,7 @@ Options:
-t) run test for target_arch (aarch64, x86_64)
-T) test name to run (default: luo_kexec_simple)
-w) custom workspace directory (default: creates temp dir)
- -k) keep workspace directory after successful test
+ -k) keep workspace directory
-h) display this help
EOF
}
base-commit: 9a6a70aefe77f6fb9ff2b3037dcf87f6dff65c8c
--
2.53.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-10-29 9:14 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-29 9:05 [PATCH] selftests/liveupdate: Preserve VM workspaces with run-vmtests.sh -k George Guo
2026-10-29 9:14 ` sashiko-bot
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.