Conversation
Copilot
AI
changed the title
[WIP] Fix procd smoke misreading echoed FETCH_OK message
Fix OpenWrt procd smoke: anchor sentinel matching and escape [owrt] in expect puts
Jul 10, 2026
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The OpenWrt procd smoke expect driver matched bare
"FETCH_OK"/"FETCH_FAIL"/"NETUP_DONE"substrings, so the serial console's echo of the sent command line (... && echo FETCH_OK || echo FETCH_FAIL) satisfied the success branch before the guest printed the real result — a faileduclient-fetchwent unnoticed and the script continued to the missing/tmp/guest-smoke.sh. The eventual timeout branch then died withinvalid command name "owrt"because unescaped[owrt]inputstriggers Tcl command substitution, masking the true failure point (CI runs27677458092,27816136090).Changes (
test/openwrt/run.sh)"FETCH_OK","FETCH_FAIL", and"NETUP_DONE"glob matches replaced with-re {[\r\n]MARKER[\r\n]}. In the echoed command line the markers are preceded by a space, so only the real guest output (\r\n-delimited) matches — the fetch-failure branch now fires immediately with exit 3.[owrt]literals in Tclputs: all 5 occurrences changed to\[owrt\]so timeout/error messages print correctly instead of raising a Tcl error.expect { -re {[\r\n]FETCH_OK[\r\n]} {} -re {[\r\n]FETCH_FAIL[\r\n]} { puts "\n\[owrt\] cannot reach host HTTP server"; exit 3 } timeout { puts "\n\[owrt\] fetch timeout"; exit 3 } }Verified against simulated serial output (command echo followed by
FETCH_FAIL, plus theRTNETLINK answers: Network unreachablenoise beforeNETUP_DONEseen in the failing runs): the fail path now exits through the fetch-failure branch, and the success path still matches the standalone marker lines.