Skip to content

feat(cli): add test-command verb + README screenshot of a real run#67

Merged
ErenAri merged 1 commit into
mainfrom
feat/test-command-verb
Jun 29, 2026
Merged

feat(cli): add test-command verb + README screenshot of a real run#67
ErenAri merged 1 commit into
mainfrom
feat/test-command-verb

Conversation

@ErenAri

@ErenAri ErenAri commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Follow-up to #65/#66. Two things:

1. test-command as an explicit verb

Command/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.json

Shorter flags (--cmd, --bin, --expect-exit); routes through the same
command-mode config as test --command via a shared executeTestConfig. Verdict
is the loader's exit code; the bundled validator is not used.

2. README screenshot from a real run

Shipping the libbpf loader as --bin 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 — demonstrating the real userspace loader path, not a validator
load + smoke test.

screenshot

Tests cover the new verb's parsing/validation and dispatch. go test ./...,
go vet, golangci-lint all clean.

🤖 Generated with Claude Code

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>
@ErenAri ErenAri merged commit 88971fe into main Jun 29, 2026
8 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant