|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [xen stable-4.20] CI: fix waiting for final test message
commit 563af5983b1eb928e318635f51714cbf93cf86dd
Author: Marek Marczykowski-Górecki <marmarek@xxxxxxxxxxxxxxxxxxxxxx>
AuthorDate: Fri Apr 11 22:32:14 2025 +0200
Commit: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
CommitDate: Wed May 7 15:28:02 2025 +0100
CI: fix waiting for final test message
Expect normally discards initial part of its buffer after matching the
patter, before looking for the next one. If both PASSED and LOG_MSG
happen to be in the buffer at the same time, depending on their order,
only one will be matched and the waiting for the other will timeout.
Example expect -d output of this happening (parts eclipsed for brevity):
expect: does "\r\r\r\nWelcome to Alpine Linux
3.18\r\r\r\n...\r\r\r\r\n(domU) + echo 'pci test passed'\r\r\r\r\n(domU) pci
test passed\r\r\r\r..." (spawn_id exp4) match regular expression "pci test
passed"? Gate "pci test passed"? gate=yes re=yes
...
Gate keeper glob pattern for '\nWelcome to Alpine Linux' is '
Welcome to Alpine Linux'. Activating booster.
expect: does "'\r\r\r\r\n(domU) pci test passed\r\r\r\r\n(domU) [ ok
]\r\r\r\r\n(domU) [ ok ]\r\r\r\r\n(domU) \r\r\r\r\r\n(domU) domU Welcome to
Alpine Linux 3.18\r\r\r\r\n(domU) \rKernel 6.6.56 on an x86_64
(/dev/hvc0)\r\r\r\r\n(domU) \r\r\r\r\r\n" (spawn_id exp4) match regular
expression "\nWelcome to Alpine Linux"? Gate "\nWelcome to Alpine Linux"?
gate=no
Fix this by using -notransfer flag to keep matched part in the buffer.
Signed-off-by: Marek Marczykowski-Górecki <marmarek@xxxxxxxxxxxxxxxxxxxxxx>
Acked-by: Andrew Cooper <andrew.cooper3@xxxxxxxxx>
(cherry picked from commit 1e12cbd6af2c92e61a1363ef208f71da1eae47ab)
CI: fix waiting for final test message (again)
The previous attempt has correct diagnosis, but added -notransfer flag
in a wrong place - it should be used in the first (outer) match out of
two, not the second (inner) one.
Fixes: 1e12cbd6af2c ("CI: fix waiting for final test message")
Signed-off-by: Marek Marczykowski-Górecki <marmarek@xxxxxxxxxxxxxxxxxxxxxx>
Acked-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
(cherry picked from commit 79de6507c59021484e7c0b359f45035eab891e88)
---
automation/scripts/console.exp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/automation/scripts/console.exp b/automation/scripts/console.exp
index c27f893dfb..2414f37fd2 100755
--- a/automation/scripts/console.exp
+++ b/automation/scripts/console.exp
@@ -47,11 +47,11 @@ if {[info exists env(BOOT_MSG)]} {
if {[info exists env(LOG_MSG)]} {
expect {
- -re "$env(PASSED)" {
+ -notransfer -re "$env(PASSED)" {
expect -re "$env(LOG_MSG)"
exit 0
}
- -re "$env(LOG_MSG)" {
+ -notransfer -re "$env(LOG_MSG)" {
expect -re "$env(PASSED)"
exit 0
}
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.20
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |