add test using github.com/u-root/cpu{vm,client}#3452
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3452 +/- ##
=======================================
Coverage 59.35% 59.35%
=======================================
Files 637 637
Lines 54120 54120
=======================================
Hits 32122 32122
Misses 21998 21998
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
377b318 to
3a0d9ac
Compare
AjanZhong
previously approved these changes
Sep 12, 2025
This is a simple test, which needs no shell, demonstrating how to use github.com/u-root/cpu vm and client packages. The vm package has four Linux kernel/initramfs pairs embedded in it, for amd64, arm, arm64, and riscv64; Plan 9 is planned. The test uses vm.Uroot to build a complete u-root image and merge it into the provided initramfs. The vm package will start the VM (see the test) with cpud running. The test then uses the client package to run commands in the guest, without needing a shell script. The cpu client returns 0 or non-zero status, for command success of failure. Note that, also, files can be read or written from outside the vm, with no special effort. This is shown in the first part of the tests, via dd. Signed-off-by: Ronald G Minnich <rminnich@gmail.com>
Seems this will not build right now for the released tinygo. Until your tinygo is at 1.24, do not try to build it. Signed-off-by: Ronald G. Minnich <rminnich@gmail.com>
13e5b5f to
bd62a4a
Compare
This test kexecs the kernel, then connects to it again via cpu to verify the kexec succeeded. No shell needed in the guest, and the kernel/initramfs need not be copied in; they are accessed via 9p, as in cpu. Signed-off-by: Ronald G Minnich <rminnich@gmail.com>
Member
Author
|
now includes a kexec test |
AjanZhong
approved these changes
Sep 15, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This is a simple test, which needs no shell,
demonstrating how to use github.com/u-root/cpu vm and client packages.
The vm package has four Linux kernel/initramfs pairs embedded in it, for amd64, arm, arm64, and riscv64; Plan 9 is planned.
The test uses vm.Uroot to build a complete u-root image and merge it into the provided initramfs.
The vm package will start the VM (see the test) with cpud running.
The test then uses the client package to run commands in the guest, without needing a shell script.
The cpu client returns 0 or non-zero status, for command success of failure.
Note that, also, files can be read or written from outside the vm, with no special effort. This is shown in the first part of the tests, via dd.