feat(cli): add test-command verb + README screenshot of a real run#67
Merged
Conversation
Make command/binary validation discoverable as its own verb (what a reviewer
scans for), in addition to `test --command`:
bpfcompat test-command --cmd '<loader>' --bin ./my-loader \
--artifact probe.bpf.o --matrix ... --out report.json
`test-command` uses shorter flags (--cmd/--bin/--expect-exit) and routes through
the same command-mode config as `test --command` (shared executeTestConfig).
Verdict is the loader's exit code; the bundled validator is not used.
Add a README screenshot from an actual run: shipping the libbpf loader against
the known-tricky kernel library, the loader's exit code fails ubuntu-20.04-5.4
(ring buffer needs >= 5.8, exit 2) and passes ubuntu-22.04-5.15 (exit 0), with
libbpf load/attach skipped — i.e. the real userspace loader path.
Tests cover the new verb's flag parsing/validation and dispatch.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
Follow-up to #65/#66. Two things:
1.
test-commandas an explicit verbCommand/binary validation now has a dedicated, discoverable verb (what a
reviewer scans for) alongside
test --command:bpfcompat test-command --cmd '$BPFCOMPAT_BIN --self-test' --bin ./my-loader \ --matrix matrices/quirk-library.yaml --out report.jsonShorter flags (
--cmd,--bin,--expect-exit); routes through the samecommand-mode config as
test --commandvia a sharedexecuteTestConfig. Verdictis the loader's exit code; the bundled validator is not used.
2. README screenshot from a real run
Shipping the libbpf loader as
--binagainst the known-tricky kernel library,the loader's exit code fails
ubuntu-20.04-5.4(ring buffer needs ≥ 5.8 →exit 2) and passes
ubuntu-22.04-5.15(exit 0), with libbpf load/attachskipped — demonstrating the real userspace loader path, not a validator
load + smoke test.
Tests cover the new verb's parsing/validation and dispatch.
go test ./...,go vet,golangci-lintall clean.🤖 Generated with Claude Code