From: Victor Lira <victorm.l...@amd.com>

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.l...@amd.com>
---
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.coop...@citrix.com>
Cc: Anthony PERARD <anthony.per...@vates.tech>
Cc: Michal Orzel <michal.or...@amd.com>
Cc: Jan Beulich <jbeul...@suse.com>
Cc: Julien Grall <jul...@xen.org>
Cc: "Roger Pau Monné" <roger....@citrix.com>
Cc: Stefano Stabellini <sstabell...@kernel.org>
Cc: Doug Goldstein <car...@cardoe.com>
Cc: xen-devel@lists.xenproject.org
---
 .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

Reply via email to