PHD: use stty to widen the effective terminal for Linux guests #818
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.
All of PHD's supported Linux guests' serial console drivers assume by default that they are writing to an 80-character-wide terminal. This breaks calls to
run_shell_commands
that are longer than 80 characters, because guests will insert extra spaces and carriage returns to deal with terminal wrapping. Suppress this by adding anstty
command to these guests' login sequences that tells them the terminal is 10,000 characters wide. Add a framework test to validate this.The new test also works (with no additional changes) for Windows Server
2022. It won't currently work with Server 2016 or 2019, which use the 80x24 terminal backend, so skip this test on these OSes (and add an affordance that allows a test to ask the framework for the default guest OS adapter without actually setting up any VM configuration).
With this change, the boot order tests'
run_long_command
function is obsolete, so remove it.Finally, tweak
phd_skip!
so that it can take an arbitrary token sequence as an argument instead of only taking a string literal. This allows the use offormat!
in a skip macro.Tested by running this test with all supported guest OS flavors, running the boot order tests on Alpine and Debian 11, and running a full PHD test suite against Debian 11.
Related to #773 (but doesn't totally fix it, since earlier Windows Server versions still need some work).