diff mbox series

[1/5] automation: include real-time view of the domU console log too

Message ID d2e566ab602df7a22c1974a0fc469e4b2653128f.1696557834.git-series.marmarek@invisiblethingslab.com (mailing list archive)
State New, archived
Headers show
Series automation: cleanup hardware based tests | expand

Commit Message

Marek Marczykowski-Górecki Oct. 6, 2023, 2:05 a.m. UTC
Passthrough domU console log to the serial console in real time, not
only after the test. First of all, this gives domU console also in case
of test failure. But also, allows correlation between domU and dom0 or
Xen messages.

To avoid ambiguity, add log prefix with 'sed'.

Signed-off-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
---
 automation/scripts/qubes-x86-64.sh | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)
diff mbox series

Patch

diff --git a/automation/scripts/qubes-x86-64.sh b/automation/scripts/qubes-x86-64.sh
index 5f6052eef041..1e84e40a4afc 100755
--- a/automation/scripts/qubes-x86-64.sh
+++ b/automation/scripts/qubes-x86-64.sh
@@ -33,8 +33,6 @@  echo \"${passed}\"
 until grep -q \"${passed}\" /var/log/xen/console/guest-domU.log; do
     sleep 1
 done
-# get domU console content into test log
-tail -n 100 /var/log/xen/console/guest-domU.log
 echo \"${passed}\"
 "
 if [ "${test_variant}" = "dom0pvh" ]; then
@@ -59,8 +57,6 @@  echo deep > /sys/power/mem_sleep
 echo mem > /sys/power/state
 # now wait for resume
 sleep 5
-# get domU console content into test log
-tail -n 100 /var/log/xen/console/guest-domU.log
 xl list
 xl dmesg | grep 'Finishing wakeup from ACPI S3 state' || exit 1
 # check if domU is still alive
@@ -121,7 +117,6 @@  echo \"${passed}\"
 until grep -q \"^domU Welcome to Alpine Linux\" /var/log/xen/console/guest-domU.log; do
     sleep 1
 done
-tail -n 100 /var/log/xen/console/guest-domU.log
 "
 fi
 
@@ -169,6 +164,8 @@  ifconfig eth0 up
 ifconfig xenbr0 up
 ifconfig xenbr0 192.168.0.1
 
+# get domU console content into test log
+tail -F /var/log/xen/console/guest-domU.log 2>/dev/null | sed -e \"s/^/(domU) /\" &
 xl create /etc/xen/domU.cfg
 ${dom0_check}
 " > etc/local.d/xen.start