oxidecomputer / oxidecomputer/propolis
want PHD `lshw_lifecycle_test` to, uh, actually involve `lshw(1)` in some way
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 270
- Forks
- 42
- Avg merge
- 4d 5h
- Merged PRs (30d)
- 6
Description
as seen in https://github.com/oxidecomputer/propolis/pull/1032#issuecomment-3856368461 and #1035, it turns out that when the guest image is Alpine, this test does the following:
localhost:~# stty -F `tty` cols 9999
localhost:~# sudo lspci -vvx
-ash: sudo: not found
localhost:~# sudo lshw -notime
-ash: sudo: not found
which is uh, not great.
the assertion that lshw returns the same output after stopping the VM and then starting it again does (trivially) pass, which is good except for the fact that it prevented us from noticing that this test was not actually testing anything. if the guest's devices were to have been totally scrambled between the stop and the subsequent start, sudo lspci -vvx and sudo lshw -notime would nonetheless still output -ash: sudo: not found.
since we are logging in as root anyway, i am pretty sure we can just remove the sudo and it will be fine. i am not sure OTTOMH whether we login as root on non-Alpine guests, if one were to run the PHD tests against a different Linux image, but that also doesn't really happen so whatever.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Locate the PHD lshw_lifecycle_test and inspect how it logs into the Alpine guest and runs lspci and lshw. Run the test with the Alpine image, then verify that the commands execute successfully and that the lshw output comparison still covers the stop-and-start lifecycle.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- linux, rust
- Domain
- operating-systems, testing-qa
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 55/100