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

[PATCH v1 1/2] automation: call expect script with redirected standard error


  • To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: <victorm.lira@xxxxxxx>
  • Date: Tue, 2 Sep 2025 11:52:34 -0700
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0)
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=ZIy6GuThc4GKjoVg7TEXuAnD5k/i4XiSHVvQgeN4b9I=; b=aVcW/YkXdwT4iwAgCWNqNE45fkPh83xoIQ53AjMAhJAyYUKUG63HlyH5rvNbwTUVldLFgv/ncF38V4qMURDq1wZfbBpprhKig5ieKzki/x4/sFCx6YAS/byXlMBf4sbLY7adEg3HsgTONsk0WyEOoW8Z6+Em7NRxJ0nYvccGHAzADS9kMEQ9Alno2DPrySSK7kqWsgNtRRX7yVynZSRLgWI6gZXTWflEQdSov13QW4Sxut4DgwKjo+vb0Lh8be+YmYTyXnvkWBfEk+nAzKpiIUTqT2bxs94RDbJcFCAEoYuUDgOFoM1Vy5MB30qIjX24WipT8R2TZjk+++WTRFlHWA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=b2jN34h1tyZfN1GJ5wzrSi29ix+e+CY9Rr1oJxZde58sSR9WgmpEmzi1maSuJnpNcXROoKg83wKkR5Xnhv/xmyixfPwd54Pe05WhH6ojxYqussVuaBBZP9rBc5C0pN+dF1zKhRxwv/EQufDzKs91TjL7uT8C68r8FfxiG6Zm7w3XwJMYESmmXO1+jwtkq510ZMrCG0YAH5qMHTZIdEaM3ocdTUSp/qiU5l+aEPNLB088gdXfxUjzjI4xGWegpt2Iw6Nxi5oUDwEdhj5T+t/hUj2pKQFkW9PIcTM/ZO1xhg0zDEOlp2CVJz9cEHsOGrrDJMzPPyhGMwC0WoBhMpsfBA==
  • Cc: Victor Lira <victorm.lira@xxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, "Julien Grall" <julien@xxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, "Doug Goldstein" <cardoe@xxxxxxxxxx>
  • Delivery-date: Tue, 02 Sep 2025 18:53:16 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

From: Victor Lira <victorm.lira@xxxxxxx>

In the console expect script, "send_error" will send a message to standard
error. Current use of this script redirects only standard output into a
pipeline. This causes the error messages to sometimes appear hidden in the
middle of the test logs.

Redirect also standard error to clearly show when a test has timed out or hit
EOF.

Signed-off-by: Victor Lira <victorm.lira@xxxxxxx>
---
example of the problem:
 - https://gitlab.com/xen-project/people/luca.miccio/xen/-/jobs/11136585863#L615
 - timeout message on line 615 shown before end of log
note:
 - I couldn't check the change on cirrus-ci as I don't have access
---
Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
Cc: Anthony PERARD <anthony.perard@xxxxxxxxxx>
Cc: Michal Orzel <michal.orzel@xxxxxxx>
Cc: Jan Beulich <jbeulich@xxxxxxxx>
Cc: Julien Grall <julien@xxxxxxx>
Cc: "Roger Pau Monné" <roger.pau@xxxxxxxxxx>
Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>
Cc: Doug Goldstein <cardoe@xxxxxxxxxx>
Cc: xen-devel@xxxxxxxxxxxxxxxxxxxx
---
 .cirrus.yml                                       | 2 +-
 automation/scripts/include/xtf-runner             | 2 +-
 automation/scripts/qemu-alpine-x86_64.sh          | 2 +-
 automation/scripts/qemu-smoke-dom0-arm32.sh       | 2 +-
 automation/scripts/qemu-smoke-dom0-arm64.sh       | 2 +-
 automation/scripts/qemu-smoke-dom0less-arm32.sh   | 2 +-
 automation/scripts/qemu-smoke-dom0less-arm64.sh   | 2 +-
 automation/scripts/qemu-smoke-ppc64le.sh          | 2 +-
 automation/scripts/qemu-smoke-riscv64.sh          | 2 +-
 automation/scripts/qubes-x86-64.sh                | 2 +-
 automation/scripts/xilinx-smoke-dom0-x86_64.sh    | 2 +-
 automation/scripts/xilinx-smoke-dom0less-arm64.sh | 2 +-
 12 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/.cirrus.yml b/.cirrus.yml
index 3163ab8f11..f295c8cb0a 100644
--- a/.cirrus.yml
+++ b/.cirrus.yml
@@ -166,7 +166,7 @@ task:
     export TEST_LOG="serial-${FREEBSD_BUILD}-${XTF_ARCH}.txt"
     export PASSED="Test result: SUCCESS"
     export TEST_TIMEOUT=120
-    ./automation/scripts/console.exp | sed 's/\r\+$//'
+    ./automation/scripts/console.exp |& sed 's/\r\+$//'

   always:
     serial_artifacts:
diff --git a/automation/scripts/include/xtf-runner 
b/automation/scripts/include/xtf-runner
index b7fea52dad..43ff2d4d88 100644
--- a/automation/scripts/include/xtf-runner
+++ b/automation/scripts/include/xtf-runner
@@ -114,7 +114,7 @@ function xtf_run_test()
 {
     rm -f ${TEST_LOG}
     export BOOT_MSG PASSED TEST_CMD TEST_LOG UBOOT_CMD
-    ./console.exp | sed 's/\r\+$//'
+    ./console.exp |& sed 's/\r\+$//'
 }

 # Setup environment and run an XTF test.
diff --git a/automation/scripts/qemu-alpine-x86_64.sh 
b/automation/scripts/qemu-alpine-x86_64.sh
index 746e70483d..c4666b9507 100755
--- a/automation/scripts/qemu-alpine-x86_64.sh
+++ b/automation/scripts/qemu-alpine-x86_64.sh
@@ -84,4 +84,4 @@ export BOOT_MSG="Latest ChangeSet: "
 export LOG_MSG="Domain-0"
 export PASSED="BusyBox"

-./automation/scripts/console.exp | sed 's/\r\+$//'
+./automation/scripts/console.exp |& sed 's/\r\+$//'
diff --git a/automation/scripts/qemu-smoke-dom0-arm32.sh 
b/automation/scripts/qemu-smoke-dom0-arm32.sh
index 4f50eabdef..36c47daa42 100755
--- a/automation/scripts/qemu-smoke-dom0-arm32.sh
+++ b/automation/scripts/qemu-smoke-dom0-arm32.sh
@@ -96,4 +96,4 @@ export BOOT_MSG="Latest ChangeSet: "
 export LOG_MSG="Domain-0"
 export PASSED="/ #"

-../automation/scripts/console.exp | sed 's/\r\+$//'
+../automation/scripts/console.exp |& sed 's/\r\+$//'
diff --git a/automation/scripts/qemu-smoke-dom0-arm64.sh 
b/automation/scripts/qemu-smoke-dom0-arm64.sh
index d6f6b74880..ee682015a0 100755
--- a/automation/scripts/qemu-smoke-dom0-arm64.sh
+++ b/automation/scripts/qemu-smoke-dom0-arm64.sh
@@ -106,4 +106,4 @@ export TEST_LOG="smoke.serial"
 export LOG_MSG="Domain-0"
 export PASSED="BusyBox"

-./automation/scripts/console.exp | sed 's/\r\+$//'
+./automation/scripts/console.exp |& sed 's/\r\+$//'
diff --git a/automation/scripts/qemu-smoke-dom0less-arm32.sh 
b/automation/scripts/qemu-smoke-dom0less-arm32.sh
index 0e2c5496db..e27636dc9e 100755
--- a/automation/scripts/qemu-smoke-dom0less-arm32.sh
+++ b/automation/scripts/qemu-smoke-dom0less-arm32.sh
@@ -149,4 +149,4 @@ export TEST_LOG="${serial_log}"
 export LOG_MSG="${dom0_prompt}"
 export PASSED="${passed}"

-../automation/scripts/console.exp | sed 's/\r\+$//'
+../automation/scripts/console.exp |& sed 's/\r\+$//'
diff --git a/automation/scripts/qemu-smoke-dom0less-arm64.sh 
b/automation/scripts/qemu-smoke-dom0less-arm64.sh
index e7a3e670d0..e660485f3a 100755
--- a/automation/scripts/qemu-smoke-dom0less-arm64.sh
+++ b/automation/scripts/qemu-smoke-dom0less-arm64.sh
@@ -218,4 +218,4 @@ export TEST_LOG="smoke.serial"
 export LOG_MSG="Welcome to Alpine Linux"
 export PASSED="${passed}"

-./automation/scripts/console.exp | sed 's/\r\+$//'
+./automation/scripts/console.exp |& sed 's/\r\+$//'
diff --git a/automation/scripts/qemu-smoke-ppc64le.sh 
b/automation/scripts/qemu-smoke-ppc64le.sh
index 617096ad1f..119c3ed4d5 100755
--- a/automation/scripts/qemu-smoke-ppc64le.sh
+++ b/automation/scripts/qemu-smoke-ppc64le.sh
@@ -24,4 +24,4 @@ export TEST_CMD="qemu-system-ppc64 \
 export TEST_LOG="${serial_log}"
 export PASSED="Hello, ppc64le!"

-./automation/scripts/console.exp | sed 's/\r\+$//'
+./automation/scripts/console.exp |& sed 's/\r\+$//'
diff --git a/automation/scripts/qemu-smoke-riscv64.sh 
b/automation/scripts/qemu-smoke-riscv64.sh
index 25f9e4190e..c0b1082a08 100755
--- a/automation/scripts/qemu-smoke-riscv64.sh
+++ b/automation/scripts/qemu-smoke-riscv64.sh
@@ -16,4 +16,4 @@ export TEST_CMD="qemu-system-riscv64 \
 export TEST_LOG="smoke.serial"
 export PASSED="All set up"

-./automation/scripts/console.exp | sed 's/\r\+$//'
+./automation/scripts/console.exp |& sed 's/\r\+$//'
diff --git a/automation/scripts/qubes-x86-64.sh 
b/automation/scripts/qubes-x86-64.sh
index b49a44c5b1..bd939dc948 100755
--- a/automation/scripts/qubes-x86-64.sh
+++ b/automation/scripts/qubes-x86-64.sh
@@ -292,7 +292,7 @@ export LOG_MSG="\nWelcome to Alpine Linux"
 export TEST_CMD="ssh $CONTROLLER console"
 export TEST_LOG="smoke.serial"
 export TEST_TIMEOUT="$timeout"
-./automation/scripts/console.exp | sed 's/\r\+$//'
+./automation/scripts/console.exp |& sed 's/\r\+$//'
 TEST_RESULT=$?

 if [ -n "$retrieve_xml" ]; then
diff --git a/automation/scripts/xilinx-smoke-dom0-x86_64.sh 
b/automation/scripts/xilinx-smoke-dom0-x86_64.sh
index 0ad8f658e3..96f534f3aa 100755
--- a/automation/scripts/xilinx-smoke-dom0-x86_64.sh
+++ b/automation/scripts/xilinx-smoke-dom0-x86_64.sh
@@ -173,7 +173,7 @@ export BOOT_MSG="Latest ChangeSet: "
 export TEST_CMD="cat ${SERIAL_DEV}"
 export TEST_LOG="smoke.serial"

-./automation/scripts/console.exp | sed 's/\r\+$//'
+./automation/scripts/console.exp |& sed 's/\r\+$//'
 TEST_RESULT=$?
 sh "/scratch/gitlab-runner/${TEST_BOARD}.sh" 2
 exit ${TEST_RESULT}
diff --git a/automation/scripts/xilinx-smoke-dom0less-arm64.sh 
b/automation/scripts/xilinx-smoke-dom0less-arm64.sh
index 1d7162f1b3..a6da7a830c 100755
--- a/automation/scripts/xilinx-smoke-dom0less-arm64.sh
+++ b/automation/scripts/xilinx-smoke-dom0less-arm64.sh
@@ -137,7 +137,7 @@ export LOG_MSG="Welcome to Alpine Linux"
 export TEST_CMD="cat ${SERIAL_DEV}"
 export TEST_LOG="smoke.serial"

-./automation/scripts/console.exp | sed 's/\r\+$//'
+./automation/scripts/console.exp |& sed 's/\r\+$//'
 TEST_RESULT=$?
 sh "/scratch/gitlab-runner/zcu102.sh" 2
 exit ${TEST_RESULT}
--
2.50.GIT



 


Rackspace

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