New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
script_run: base serial buffer size on command length #2429
Conversation
3123dd2
to
48c546c
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #2429 +/- ##
==========================================
+ Coverage 95.12% 95.19% +0.07%
==========================================
Files 155 156 +1
Lines 15474 15701 +227
==========================================
+ Hits 14719 14946 +227
Misses 755 755 ☔ View full report in Codecov by Sentry. |
48c546c
to
2933539
Compare
I don't think the failures have anything to do with the PR (okurz's other PR is failing on the same things). |
If you use script_run at a serial console to run a command more than 4096 characters long, the wait_serial that waits until the whole command has made it across the serial connection will fail, because it uses the default buffer size (4096), so it will never see the full command. This means there'll be a 90 second timeout before the command is actually run, and a red frame in the results. This solves the problem by always sizing the buffer to the length of the command, plus 128 extra bytes (for the marker string, and some more for safety). Issue: https://progress.opensuse.org/issues/153304 Signed-off-by: Adam Williamson <awilliam@redhat.com>
2933539
to
2542836
Compare
Yes, sorry about that. @b10n1k was experimenting with more CI checks. I have reverted the according commits for now and will rebase here @Mergifyio rebase |
If you use script_run at a serial console to run a command more than 4096 characters long, the wait_serial that waits until the whole command has made it across the serial connection will fail, because it uses the default buffer size (4096), so it will never see the full command. This means there'll be a 90 second timeout before the command is actually run, and a red frame in the results.
This solves the problem by always sizing the buffer to the length of the command, plus 128 extra bytes (for the marker string, and some more for safety).
Issue: https://progress.opensuse.org/issues/153304