Description
make unittest runs tests across pkg/unikontainers, pkg/network, internal/metrics, and hypervisor/unikernel packages, but coverage profiles are discarded. The .gitignore explicitly ignores *.out files, and there is no Makefile target to generate or inspect coverage reports.
Proposed Work
- Add
make coverage that runs go test -coverprofile=coverage.out -covermode=atomic across all unit-test packages.
- Add
make coverage-html to generate a browsable report.
- Update
.github/workflows/unit_test.yml to upload coverage.out as a build artifact.
Why This Matters
As urunc adds support for more unikernel frameworks and hypervisors, coverage reporting helps contributors identify which VM lifecycle paths (network setup, initrd construction, monitor spawning) lack test coverage before merging.
Acceptance Criteria
Non-Priorities
- Setting coverage thresholds or gating PRs (can be discussed in follow-up).
- Refactoring existing tests.
I can open a PR starting with the Makefile targets.
Description
make unittestruns tests acrosspkg/unikontainers,pkg/network,internal/metrics, and hypervisor/unikernel packages, but coverage profiles are discarded. The.gitignoreexplicitly ignores*.outfiles, and there is no Makefile target to generate or inspect coverage reports.Proposed Work
make coveragethat runsgo test -coverprofile=coverage.out -covermode=atomicacross all unit-test packages.make coverage-htmlto generate a browsable report..github/workflows/unit_test.ymlto uploadcoverage.outas a build artifact.Why This Matters
As
uruncadds support for more unikernel frameworks and hypervisors, coverage reporting helps contributors identify which VM lifecycle paths (network setup,initrdconstruction, monitor spawning) lack test coverage before merging.Acceptance Criteria
make coveragepasses on bothamd64andarm64.Non-Priorities
I can open a PR starting with the Makefile targets.