You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PHD: add Windows Server 2016 adapter & improve WS2016/2019 reliability (#646)
Add a Windows Server 2016 guest adapter to PHD. It's more or less identical to
the Windows Server 2019 adapter (but is still worth keeping separate since the
guests support different command-line tools and Powershell cmdlets out of the
box).
Tighten a few bolts to improve (but not perfect) test performance and
reliability for these guests:
- Rework the way shell commands are issued:
- `GuestOs`es now specify a serial console `CommandSequence` that the
framework should execute in order to run a shell command.
- Waiting for a string to appear in the serial console buffer no longer
consumes any characters from the buffer. Instead, callers must clear the
buffer manually.
With this change, it no longer matters that Windows guests don't re-echo
characters that are already on-screen, because the framework no longer
invalidates them until it knows they're no longer wanted.
Additionally improve the keystroke debounce logic:
- Only apply the debounce delay if the next character to be issued is the same
as the previous character. This allows the debounce timeout to be lengthened
considerably without tanking test performance (which is important to minimize
flakiness).
It might be worth investigating whether we could avoid this delay by doing
byte-by-byte "call and response" for characters we expect the guest to echo.
This may require a more substantial refactoring of the serial console code, so
I've just resorted to having a longer debounce for now.
- Change `TestVm::send_serial_bytes_async` to wait for the serial task to
acknowledge that it has sent all the requested bytes to the guest before
returning so that `TestVm` can time out waiting for characters to be echoed
without including the time spent waiting for them to be sent.
Tested with WS2016, WS2019, Alpine, and Debian 11 guests.
0 commit comments