PHD: make lshw_lifecycle_test actually do that on Alpine
#1037
+2
−2
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.
That PHD test
lshw_lifecycle_test, which starts a VM, runslspciand
lshw, stops, and restarts the VM, and asserts that the output ofthose commands on the original and subsequent VM are the same. This is
intended to demonstrate that guest devices are not arbitrarily scrambled
after restarting the guest, which is important.
Fortunately for us, when running PHD tests with Alpine Linux as the
guest OS (as we do on CI), the output of those commands on the initial
and subsequent guests are, in fact, the same.
Unfortunately, however, the output is:
Which, as you can see, does in fact successfully demonstrate that both
guests are seeing the same PCIe devices and such. :)
Yeah.
That sucks lol.
This commit fixes that by removing the
sudo, which doth not exist onAlpine Linux without having installed it. We don't actually need
sudoon Alpine, since we log in as root anyway, which is the correct and
proper thing to do on linux.
This should be fine when running the tests with other Linuces as the
guest OS, since the very first thing the
GuestOsimplementation forUbuntu 22.04, does is to immediately
sudo bashto become rootimmediately, and the Debian 11 one also does the morally correct
thing and logs in as root.
Fixes #1036