[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 2/2] CI: Check save/restore of PV domain as part of qemu-alpine-x86_64


  • To: Marek Marczykowski-Górecki <marmarek@xxxxxxxxxxxxxxxxxxxxxx>
  • From: Frediano Ziglio <freddy77@xxxxxxxxx>
  • Date: Tue, 4 Aug 2026 19:48:10 +0100
  • Arc-authentication-results: i=1; mx.google.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=7hHb7A/iv/3NbWaHGGYKFA8iWxf7Etm7iPDj2vr104Y=; fh=RLhUWlRjq6yfpKY+h1JZzBpOTuG/g/EB3etsFhEdDDk=; b=IEF0C5x9/Zz10gdP3AGbNue2dEXxOvNVI0CWxFy95hwG0xhgfyCku3fN0lwg0GxN9v QHgPcy827tpvkPC9mSTZnV7iYCFO1tjm07FSfZJlPzivdg9oHbuTqInMzTRzr7V/JbGG DqCboeKso0bYnxh9z7RRzu2kkye4eCA1iekK+kxuTDjofgcM+hAh5obewWCVtPmD4Rnb 4u8cBMQdIsDA5pFH0GRjYtYBQzgMqFvkof4grsXqWlkPaq7wLUlq9ODShUiRxuhuSjeg 23SF/epheUqTV7qqsOXbOAndN5HtN3pD0V/Kh1LgN1pztD/dAJ42cCJZoqKdUiSTPItT 0uGg==; darn=lists.xenproject.org
  • Arc-seal: i=1; a=rsa-sha256; t=1785869303; cv=none; d=google.com; s=arc-20260327; b=hrB4v5JwrlR1c80ACP0mDU4F2i+vYhy9zmseELS6dFRLXGu5e9NERT6alZDeMut/bq 4/Pm2mVwADRaAwFfhoSFFiGkz1GbZQot0CtJWmiv168ZC4cHicvJRk8irO9tRfOdlhn4 X65T8Xd04VNkOkkF/OOAa/MUM/uIivaLkdnSvZr7gmmuOU3IG2pgWQH6lJnf8ABBdlYj wRoyMX3VWccLySAVn5oInhYimQ/mP80ibWg11PO1yavWOpr0LluBvfiCUStX9poZLLo7 UYYQiI8NiVWTrDy7inh4ObKhMQtx5lkt/VhWD7eKC00gjohEbyYnLeiOav71cmhLBUIj 4Bgw==
  • Authentication-results: eu.smtp.expurgate.cloud; dkim=pass header.s=20251104 header.d=gmail.com header.i="@gmail.com" header.h="Content-Transfer-Encoding:Content-Type:Cc:To:Subject:Message-ID:Date:From:In-Reply-To:References:MIME-Version"
  • Cc: xen-devel@xxxxxxxxxxxxxxxxxxxx, Frediano Ziglio <frediano.ziglio@xxxxxxxxxx>, Doug Goldstein <cardoe@xxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • Delivery-date: Tue, 04 Aug 2026 18:48:39 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On Tue, 4 Aug 2026 at 18:57, Marek Marczykowski-Górecki
<marmarek@xxxxxxxxxxxxxxxxxxxxxx> wrote:
>
> On Tue, Aug 04, 2026 at 06:42:18PM +0100, Frediano Ziglio wrote:
> > 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@xxxxxxxxxx>
> > ---
> >  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.
>
> Why doing this interactively over serial, instead of adding to
> etc/local.d/xen.start and then printing test result at the end?
>

I'm using expect to interact with the console. expect is not available
inside the alpine root filesystem.
Some failure I had during migration is that the VM crashed. In the
script I interact with the console to check that the VM is still able
to run commands.

> > +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
> >
>
> --
> Best Regards,
> Marek Marczykowski-Górecki
> Invisible Things Lab



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.