phd: gate OS-specific tests, make others more OS-agnostic #799
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.
some smoketests instigated a graceful reboot by sending
reboot\n
to the serial console, but Windows guests are rewarded (via Cygwin) withas of #785 there is now a TestVm helper
graceful_reboot
that does this in whatever way the guest adapter desires, so use that instead.unfortunately
graceful_reboot
is only mostly right for Windows guests, so fix that here too:shutdown
immediately terminates the cmd.exe session, at which point the SAC redraws the previous screen, which happens to have all the sigils we look for to detect that Windows has freshly booted. we then log back into the imminently-shutdown Windows, shutdown takes effect, and PHD becomes fully desynchronized from the guest state.so, look for "BdsDxe: loading " as an outside-the-guest-OS sigil that tells us we're watching a fresh boot. this comes from OVMF, so a booted guest will have clobbered the message and not know to redraw it even if it seeks to recreate a previous display.
other tests depend on Linux-specific features like
efivarfs
ormount -o ro
, so skip them on non-Linux guests.validated this with both a Debian guest and a Windows Server 2022 guest - Debian was and still is good, the 2k22 guest fail fewer tests and not any that it didn't fail before