tests/pyvcp: filter the halcmd "Waiting for component" pacifier from result - #4290
Merged
Merged
Conversation
Contributor
|
I'm not sure this is the right place to "fix" this. Changing the output based on redirection may have some unexpected problems. It may be better to kill the line in the test. There already is a sed line to remove everything that is not 'mypanel'. Why not simply add a sed line to remove the line |
…result On a slow or busy machine, halcmd's loadusr -Wn prints "Waiting for component 'mypanel' to become ready..." to stderr when the component takes more than two seconds to become ready. Ubuntu's xvfb-run merges the wrapped command's stderr into its stdout, so on a loaded ubuntu CI runner the pacifier line lands in result and, because it contains the string 'mypanel', survives the sed filter and breaks the compare against expected. Drop the pacifier line in the sed expression that already sanitizes result. Fixes LinuxCNC#4287
grandixximo
force-pushed
the
halcmd-pacifier-tty
branch
from
July 30, 2026 09:06
3837927 to
cbd80a0
Compare
Contributor
Author
|
You're right, the test is the better place. The pacifier on stderr is a useful diagnostic in batch logs, and pyvcp turned out to be the only test that both runs halcmd under xvfb-run and exact-compares captured output. Reworked the PR to filter the line in test.sh; verified with the same repro (Ubuntu's xvfb-run, delayed component startup) that the compare now passes. |
BsAtHome
approved these changes
Jul 30, 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.
Fixes #4287.
Problem
The pyvcp test flakes on slow or busy CI:
The "Waiting for component..." pacifier is printed by halcmd's
loadusr -Wnto stderr after 2 s of waiting. It lands in the test'sresultfile anyway because Ubuntu 24.04'sxvfb-runexecutes the wrapped command with"$@" 2>&1, merging stderr into stdout (Debian's and upstream xorg's xvfb-run keep the streams separate). On a loaded ubuntu CI runner, pyvcp takes >2 s to become ready, the pacifier fires, and the merged line survives thesed '/mypanel/!d'filter because it contains the component name, breaking the compare againstexpected.I reproduced this byte-identically on a Debian host by extracting Ubuntu noble's
xvfb-run(xvfb_21.1.12-1ubuntu1.8_amd64.deb), delaying pyvcp startup with asleepwrapper, and saturating the CPU.Fix
Drop the pacifier line in the sed expression that already sanitizes
result, as suggested by @BsAtHome.Testing
resultidentical toexpected.