From: Frediano Ziglio <freddy77@gmail.com>
To: xen-devel@lists.xenproject.org
Cc: "Frediano Ziglio" <frediano.ziglio@citrix.com>,
"Doug Goldstein" <cardoe@cardoe.com>,
"Stefano Stabellini" <sstabellini@kernel.org>,
"Jan Beulich" <jbeulich@suse.com>,
"Andrew Cooper" <andrew.cooper3@citrix.com>,
"Marek Marczykowski-Górecki" <marmarek@invisiblethingslab.com>
Subject: [PATCH 2/2] CI: Check save/restore of PV domain as part of qemu-alpine-x86_64
Date: Tue, 4 Aug 2026 18:42:18 +0100 [thread overview]
Message-ID: <20260804174219.835096-3-frediano.ziglio@citrix.com> (raw)
In-Reply-To: <20260804174219.835096-1-frediano.ziglio@citrix.com>
Make sure that save/restore continue to work.
The check save and restore twice to check for corrupted status.
Also a command is launched in the guest to make sure that the
machine is not crashed but working.
Signed-off-by: Frediano Ziglio <frediano.ziglio@citrix.com>
---
automation/scripts/console.exp | 8 +++++
automation/scripts/qemu-alpine-x86_64.sh | 40 ++++++++++++++++++++++--
2 files changed, 46 insertions(+), 2 deletions(-)
diff --git a/automation/scripts/console.exp b/automation/scripts/console.exp
index e27886bbef..ff58ed29b8 100755
--- a/automation/scripts/console.exp
+++ b/automation/scripts/console.exp
@@ -58,6 +58,14 @@ if {[info exists env(WAKEUP_CMD)]} {
system "$env(WAKEUP_CMD)"
}
+if {[info exists env(EXPECT_TEXTS)]} {
+ set lines [split "$env(EXPECT_TEXTS)" "\n"]
+ foreach {exp snd} $lines {
+ expect -re "$exp"
+ send "$snd\n"
+ }
+}
+
if {[info exists env(LOG_MSG)]} {
expect {
-notransfer -re "$env(PASSED)" {
diff --git a/automation/scripts/qemu-alpine-x86_64.sh b/automation/scripts/qemu-alpine-x86_64.sh
index 60f5cc49fc..409a601c34 100755
--- a/automation/scripts/qemu-alpine-x86_64.sh
+++ b/automation/scripts/qemu-alpine-x86_64.sh
@@ -48,6 +48,28 @@ xl -vvv create -c /root/domU.cfg
" > etc/local.d/xen.start
chmod +x etc/local.d/xen.start
+
+# Script to test save and restore.
+# It saves and restores domU domain twice to check if the domain was corrupted
+# during the first sequence.
+# At the end open the console to check if the domain is working.
+cat > root/save_restore_test << "EOF"
+#!/bin/sh
+set -ex
+xl list | grep -q domU
+rm -f save.dat
+xl save "$(xl list | awk '$1=="domU" { print $2 }')" save.dat /root/domU.cfg
+xl restore /root/domU.cfg save.dat
+xl list | grep -q domU
+rm -f save.dat
+xl save "$(xl list | awk '$1=="domU" { print $2 }')" save.dat /root/domU.cfg
+xl restore /root/domU.cfg save.dat
+xl list | grep -q domU
+rm -f save.dat
+xl console "$(xl list | awk '$1=="domU" { print $2 }')"
+EOF
+chmod +x root/save_restore_test
+
find . | cpio -R 0:0 -H newc -o | gzip >> ../dom0-rootfs.cpio.gz
cd ../..
@@ -70,9 +92,23 @@ export TEST_CMD="qemu-system-x86_64 \
-device virtio-net-pci,netdev=n0 \
-netdev user,id=n0,tftp=binaries,bootfile=/pxelinux.0"
+# Sequence of expect/send strings:
+# 1. wait domain start and close console;
+# 2. wait login prompt and login as root
+# 3. wait login and launch save/restore test;
+# 4. wait restore from domain console and send a command.
+gs=$'\x1d'
+export EXPECT_TEXTS="BusyBox
+$gs $gs
+login:
+root
+login on
+/root/save_restore_test
+Restarting tasks
+dmesg | grep suspending | tr o 0"
+
export TEST_LOG="smoke.serial"
export BOOT_MSG="Latest ChangeSet: "
-export LOG_MSG="Domain-0"
-export PASSED="BusyBox"
+export PASSED="suspending xenst0re"
./automation/scripts/console.exp |& sed 's/\r\+$//'
--
2.43.0
next prev parent reply other threads:[~2026-08-04 17:43 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-04 17:42 [PATCH 0/2] CI: Check save/restore, minor style update Frediano Ziglio
2026-08-04 17:42 ` [PATCH 1/2] CI: Simplify directories creation Frediano Ziglio
2026-08-04 19:29 ` Anthony PERARD
2026-08-04 21:40 ` Frediano Ziglio
2026-08-04 17:42 ` Frediano Ziglio [this message]
2026-08-04 17:57 ` [PATCH 2/2] CI: Check save/restore of PV domain as part of qemu-alpine-x86_64 Marek Marczykowski-Górecki
2026-08-04 18:48 ` Frediano Ziglio
2026-08-04 18:55 ` Andrew Cooper
2026-08-04 19:17 ` Marek Marczykowski-Górecki
2026-08-04 21:58 ` Frediano Ziglio
2026-08-04 22:43 ` Marek Marczykowski-Górecki
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=20260804174219.835096-3-frediano.ziglio@citrix.com \
--to=freddy77@gmail.com \
--cc=andrew.cooper3@citrix.com \
--cc=cardoe@cardoe.com \
--cc=frediano.ziglio@citrix.com \
--cc=jbeulich@suse.com \
--cc=marmarek@invisiblethingslab.com \
--cc=sstabellini@kernel.org \
--cc=xen-devel@lists.xenproject.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 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.