mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: George Guo <dongtai.guo@linux.dev>
To: pasha.tatashin@soleen.com, rppt@kernel.org, pratyush@kernel.org,
	shuah@kernel.org
Cc: guodongtai@kylinos.cn, kexec@lists.infradead.org,
	linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] selftests/liveupdate: Preserve VM workspaces with run-vmtests.sh -k
Date: Thu, 29 Oct 2026 18:05:42 +0900	[thread overview]
Message-ID: <20261029090542.13283-1-dongtai.guo@linux.dev> (raw)

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


                 reply	other threads:[~2026-10-29  9:06 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261029090542.13283-1-dongtai.guo@linux.dev \
    --to=dongtai.guo@linux.dev \
    --cc=guodongtai@kylinos.cn \
    --cc=kexec@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=pasha.tatashin@soleen.com \
    --cc=pratyush@kernel.org \
    --cc=rppt@kernel.org \
    --cc=shuah@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®