fix(hal-go): use temp file to capture str-receiver output in string e2e test#80
Merged
sittner merged 2 commits intomodusoft-2.9from Feb 27, 2026
Merged
Conversation
loadusr spawns components as separate processes, so their stdout is not captured by halrun's 2>&1 redirect. Fix by: - str-receiver/main.go: accept optional output file arg; write RECEIVED:<msg> to that file instead of fmt.Printf to stdout - run_tests.sh Test 10: create temp file, pass to str-receiver via loadusr, check file contents after halrun completes Co-authored-by: sittner <1475582+sittner@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix string end-to-end test stdout capture
fix(hal-go): use temp file to capture str-receiver output in string e2e test
Feb 27, 2026
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.
loadusrspawns userspace components as separate processes;halrun's2>&1redirect only captures halcmd's own output, sofmt.Printf(...)instr-receiverwas never visible in$OUTPUT, causing Test 10 to always fail.Changes
str-receiver/main.go: Accept an optional output file path asos.Args[1]. On message receipt, writeRECEIVED:<msg>to that file instead of printing to stdout. Backwards-compatible — runs fine without the argument.run_tests.shTest 10: Create a temp file beforehalrun, pass its path tostr-receivervialoadusr, then inspect the file afterhalrunexits rather than grepping captured stdout.Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
linuxcnc.org/usr/bin/go go mod tidy -e(dns block)/usr/bin/go go get -v ./...(dns block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
This pull request was created from Copilot chat.
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.