Skip to contentSkip to conversation

automation: restore CR filtering

PATCH In review Stefano Stabellini 3 participants 3 messages Aug 21, 2024 – Aug 22, 2024 RISC-V

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 automation: restore CR filtering

After commit c36efb7fcea6 ("automation: use expect to run QEMU") we lost the \r filtering introduced by b576497e3b7d ("automation: remove CR characters from serial output"). This patch reintroduced it.

Fixes c36efb7fcea6 ("automation: use expect to run QEMU")

---
Changes in v2:
- fix the sed expression to account for multiple \r
- ensure Xen logs are visible too

---
 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/qemu-smoke-x86-64.sh         | 2 +-
 automation/scripts/qemu-xtf-dom0less-arm64.sh   | 2 +-
 9 files changed, 9 insertions(+), 9 deletions(-)
automation/scripts/qemu-alpine-x86_64.sh +1 -1
index 5359e0820b..42a89e86b0 100755
@@ -89,4 +89,4 @@ export QEMU_LOG="smoke.serial"
 export LOG_MSG="Domain-0"
 export PASSED="BusyBox"
 
-./automation/scripts/qemu-key.exp
+./automation/scripts/qemu-key.exp | sed 's/\r\+$//'
automation/scripts/qemu-smoke-dom0-arm32.sh +1 -1
index bbdcb39f1a..fd64b19358 100755
@@ -96,4 +96,4 @@ export QEMU_LOG="${serial_log}"
 export LOG_MSG="Domain-0"
 export PASSED="/ #"
 
-../automation/scripts/qemu-key.exp
+../automation/scripts/qemu-key.exp | sed 's/\r\+$//'
automation/scripts/qemu-smoke-dom0-arm64.sh +1 -1
index 0094bfc8e1..e0cea742b0 100755
@@ -109,4 +109,4 @@ export QEMU_LOG="smoke.serial"
 export LOG_MSG="Domain-0"
 export PASSED="BusyBox"
 
-./automation/scripts/qemu-key.exp
+./automation/scripts/qemu-key.exp | sed 's/\r\+$//'
automation/scripts/qemu-smoke-dom0less-arm32.sh +1 -1
index 68ffbabdb8..e824cb7c2a 100755
@@ -149,4 +149,4 @@ export QEMU_LOG="${serial_log}"
 export LOG_MSG="${dom0_prompt}"
 export PASSED="${passed}"
 
-../automation/scripts/qemu-key.exp
+../automation/scripts/qemu-key.exp | sed 's/\r\+$//'
automation/scripts/qemu-smoke-dom0less-arm64.sh +1 -1
index eb25c4af4b..f42ba5d196 100755
@@ -220,4 +220,4 @@ export QEMU_LOG="smoke.serial"
 export LOG_MSG="Welcome to Alpine Linux"
 export PASSED="${passed}"
 
-./automation/scripts/qemu-key.exp
+./automation/scripts/qemu-key.exp | sed 's/\r\+$//'
automation/scripts/qemu-smoke-ppc64le.sh +1 -1
index ccb4a576f4..594f92c19c 100755
@@ -25,4 +25,4 @@ export QEMU_CMD="qemu-system-ppc64 \
 export QEMU_LOG="${serial_log}"
 export PASSED="Hello, ppc64le!"
 
-./automation/scripts/qemu-key.exp
+./automation/scripts/qemu-key.exp | sed 's/\r\+$//'
automation/scripts/qemu-smoke-riscv64.sh +1 -1
index 0355c075b7..c2595f657f 100755
@@ -16,4 +16,4 @@ export QEMU_CMD="qemu-system-riscv64 \
 export QEMU_LOG="smoke.serial"
 export PASSED="All set up"
 
-./automation/scripts/qemu-key.exp
+./automation/scripts/qemu-key.exp | sed 's/\r\+$//'
automation/scripts/qemu-smoke-x86-64.sh +1 -1
index 37ac10e068..3440b1761d 100755
@@ -24,4 +24,4 @@ export QEMU_CMD="qemu-system-x86_64 -nographic -kernel binaries/xen \
 export QEMU_LOG="smoke.serial"
 export PASSED="Test result: SUCCESS"
 
-./automation/scripts/qemu-key.exp
+./automation/scripts/qemu-key.exp | sed 's/\r\+$//'
automation/scripts/qemu-xtf-dom0less-arm64.sh +1 -1
index 0666f6363e..4042fe5060 100755
@@ -65,4 +65,4 @@ export UBOOT_CMD="virtio scan; dhcp; tftpb 0x40000000 boot.scr; source 0x4000000
 export QEMU_LOG="smoke.serial"
 export PASSED="${passed}"
 
-./automation/scripts/qemu-key.exp
+./automation/scripts/qemu-key.exp | sed 's/\r\+$//'
Signature · 1 line
2.25.1
#1 lore raw
Quoted 10 lines · Stefano Stabellini

After commit c36efb7fcea6 ("automation: use expect to run QEMU") we lost the \r filtering introduced by b576497e3b7d ("automation: remove CR characters from serial output"). This patch reintroduced it.

Fixes c36efb7fcea6 ("automation: use expect to run QEMU")

---
Changes in v2:
- fix the sed expression to account for multiple \r
- ensure Xen logs are visible too

I forgot to add:
https://gitlab.com/xen-project/people/sstabellini/xen/-/pipelines/1421979833

Quoted 105 lines
---
 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/qemu-smoke-x86-64.sh         | 2 +-
 automation/scripts/qemu-xtf-dom0less-arm64.sh   | 2 +-
 9 files changed, 9 insertions(+), 9 deletions(-)
automation/scripts/qemu-alpine-x86_64.sh +1 -1
index 5359e0820b..42a89e86b0 100755
@@ -89,4 +89,4 @@ export QEMU_LOG="smoke.serial"
 export LOG_MSG="Domain-0"
 export PASSED="BusyBox"
 
-./automation/scripts/qemu-key.exp
+./automation/scripts/qemu-key.exp | sed 's/\r\+$//'
automation/scripts/qemu-smoke-dom0-arm32.sh +1 -1
index bbdcb39f1a..fd64b19358 100755
@@ -96,4 +96,4 @@ export QEMU_LOG="${serial_log}"
 export LOG_MSG="Domain-0"
 export PASSED="/ #"
 
-../automation/scripts/qemu-key.exp
+../automation/scripts/qemu-key.exp | sed 's/\r\+$//'
automation/scripts/qemu-smoke-dom0-arm64.sh +1 -1
index 0094bfc8e1..e0cea742b0 100755
@@ -109,4 +109,4 @@ export QEMU_LOG="smoke.serial"
 export LOG_MSG="Domain-0"
 export PASSED="BusyBox"
 
-./automation/scripts/qemu-key.exp
+./automation/scripts/qemu-key.exp | sed 's/\r\+$//'
automation/scripts/qemu-smoke-dom0less-arm32.sh +1 -1
index 68ffbabdb8..e824cb7c2a 100755
@@ -149,4 +149,4 @@ export QEMU_LOG="${serial_log}"
 export LOG_MSG="${dom0_prompt}"
 export PASSED="${passed}"
 
-../automation/scripts/qemu-key.exp
+../automation/scripts/qemu-key.exp | sed 's/\r\+$//'
automation/scripts/qemu-smoke-dom0less-arm64.sh +1 -1
index eb25c4af4b..f42ba5d196 100755
@@ -220,4 +220,4 @@ export QEMU_LOG="smoke.serial"
 export LOG_MSG="Welcome to Alpine Linux"
 export PASSED="${passed}"
 
-./automation/scripts/qemu-key.exp
+./automation/scripts/qemu-key.exp | sed 's/\r\+$//'
automation/scripts/qemu-smoke-ppc64le.sh +1 -1
index ccb4a576f4..594f92c19c 100755
@@ -25,4 +25,4 @@ export QEMU_CMD="qemu-system-ppc64 \
 export QEMU_LOG="${serial_log}"
 export PASSED="Hello, ppc64le!"
 
-./automation/scripts/qemu-key.exp
+./automation/scripts/qemu-key.exp | sed 's/\r\+$//'
automation/scripts/qemu-smoke-riscv64.sh +1 -1
index 0355c075b7..c2595f657f 100755
@@ -16,4 +16,4 @@ export QEMU_CMD="qemu-system-riscv64 \
 export QEMU_LOG="smoke.serial"
 export PASSED="All set up"
 
-./automation/scripts/qemu-key.exp
+./automation/scripts/qemu-key.exp | sed 's/\r\+$//'
automation/scripts/qemu-smoke-x86-64.sh +1 -1
index 37ac10e068..3440b1761d 100755
@@ -24,4 +24,4 @@ export QEMU_CMD="qemu-system-x86_64 -nographic -kernel binaries/xen \
 export QEMU_LOG="smoke.serial"
 export PASSED="Test result: SUCCESS"
 
-./automation/scripts/qemu-key.exp
+./automation/scripts/qemu-key.exp | sed 's/\r\+$//'
automation/scripts/qemu-xtf-dom0less-arm64.sh +1 -1
index 0666f6363e..4042fe5060 100755
@@ -65,4 +65,4 @@ export UBOOT_CMD="virtio scan; dhcp; tftpb 0x40000000 boot.scr; source 0x4000000
 export QEMU_LOG="smoke.serial"
 export PASSED="${passed}"
 
-./automation/scripts/qemu-key.exp
+./automation/scripts/qemu-key.exp | sed 's/\r\+$//'
Signature · 1 line
2.25.1
Reviewed-by on v2 1/1
#2 lore raw
In reply to Stefano Stabellini
Quoted 8 lines · Stefano Stabellini

After commit c36efb7fcea6 ("automation: use expect to run QEMU") we lost the \r filtering introduced by b576497e3b7d ("automation: remove CR characters from serial output"). This patch reintroduced it.

Fixes c36efb7fcea6 ("automation: use expect to run QEMU")

~Michal