8000 Add --version smoke tests to 27 untested packages by bryan-minimal · Pull Request #820 · gominimal/pkgs · GitHub
[go: up one dir, main page]

Skip to content

Add --version smoke tests to 27 untested packages - #820

Merged
bryan-minimal merged 1 commit into
mainfrom
standalone-smoketests-batch1
Oct 11, 2026
Merged

bryan-minimal merged 1 commit into
mainfrom
standalone-smoketests-batch1

Conversation

@bryan-minimal
@bryan-minimal bryan-minimal commented Oct 6, 2026 •
Copy link
Copy Markdown
Member

First batch from the standalone-test survey: 220 packages ship a binary but have no tests. This adds the cheapest useful test to 27 of them:

tests = {
  smoketest = standaloneTest "/usr/bin/xz --version",
},

Why it's not just cosmetic: a standalone test execs the binary with no shell, in a sandbox containing only the package's declared runtime closure. So a pass means the ELF runs and every DT_NEEDED library is declared in runtime_deps. Drafting this batch found 7 packages that fail it (below), which the missing runtime_deps checker currently passes.

Packages (27): acl, bison, bzip2 (--help; no exit-0 version flag), dav1d, expat (xmlwf -v), ffmpeg, flex, fribidi, gdbm, gh, gnutls, gperf, graphviz (dot -V), less, libpsl, lz4, m4, nginx (-v), openssl (version), pciutils, redis, ripgrep, sqlite, tmux (-V), wget, xxhash, xz.

Rebuild cost: none. tests is not in SpecHash (minimal crates/graph/src/spec_hasher.rs), so every artifact stays cached.

CI note: for the same reason, minimal-check will print standalone tests...Skip for these packages, because CI only runs tests for packages it rebuilt. Don't read a green check as proof the tests ran. Verified instead with min check --packages <all 27> in a fresh pkgbuild session against cached artifacts: 27/27 Pass, all other checks Pass. That ran on aarch64 only; amd64 is unverified.

Held back: 7 real missing-runtime-deps bugs (follow-up PR)

These fail the smoke test with exit 127 and run once base is added. The libraries were identified with ldd inside the test sandbox:

package links missing from runtime_deps
pcre2 (pcre2grep) libz, libbz2 zlib, bzip2
file libz, libzstd, liblzma zlib, zstd
zstd libz, liblzma, liblz4 zlib
nasm libz zlib
libidn2 (idn2) libunistring libunistring (fails even with base)
curl libz, libzstd, libunistring zstd
rsync libxxhash, libzstd, liblz4, … xxhash, zstd, lz4 (fails even with base)

Fixing these changes runtime_deps, which is hashed, and zstd/pcre2/file sit under the toolchain. So that PR is a rebuild and gets its own review.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Tests
    • Added smoke tests across a range of packaged command-line tools, including utilities for compression, media, networking, and development.
    • The checks run each tool’s version or help command to verify it starts successfully after installation.

Each package gets `smoketest = standaloneTest "<abs path> <version flag>"`.
A standalone test runs the binary with no shell against only the package's
declared runtime closure, so it checks that the binary execs and every
DT_NEEDED library is declared in runtime_deps.

Tests are not part of SpecHash (minimal crates/graph/src/spec_hasher.rs
hashes name/cmds/inputs/outputs/edges only), so this rebuilds nothing.
For the same reason pkgs CI will report `standalone tests...Skip` for
these packages. They were verified with `min check` in a pkgbuild session
against the cached artifacts: 27/27 Pass (aarch64).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@bryan-minimal
bryan-minimal requested a review from a team as a code owner October 6, 2026 01:39
@coderabbitai
coderabbitai Bot commented Oct 6, 2026 •
Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository: gominimal/pkgs/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Essentials
  • Run ID: 17272a9c-069d-456d-a745-ad9b53475a1a
📥 Commits

Reviewing files that changed from the base of the PR and between 0b7609d and 2e2ef34.

📒 Files selected for processing (27)
  • packages/acl/build.ncl
  • packages/bison/build.ncl
  • packages/bzip2/build.ncl
  • packages/dav1d/build.ncl
  • packages/expat/build.ncl
  • packages/ffmpeg/build.ncl
  • packages/flex/build.ncl
  • packages/fribidi/build.ncl
  • packages/gdbm/build.ncl
  • packages/gh/build.ncl
  • packages/gnutls/build.ncl
  • packages/gperf/build.ncl
  • packages/graphviz/build.ncl
  • packages/less/build.ncl
  • packages/libpsl/build.ncl
  • packages/lz4/build.ncl
  • packages/m4/build.ncl
  • packages/nginx/build.ncl
  • packages/openssl/build.ncl
  • packages/pciutils/build.ncl
  • packages/redis/build.ncl
  • packages/ripgrep/build.ncl
  • packages/sqlite/build.ncl
  • packages/tmux/build.ncl
  • packages/wget/build.ncl
  • packages/xxhash/build.ncl
  • packages/xz/build.ncl

Included review availability: This review used your included allowance. 2 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 4 reviews per hour.


📝 Walkthrough

Walkthrough

Twenty-six package build specifications now import standaloneTest and define smoke tests that invoke a package command-line tool with a version, help, or identification option.

Changes

Package smoke tests

Layer / File(s) Summary
Add standalone smoke tests
packages/*/build.ncl
The build specifications for ACL, Bison, bzip2, dav1d, Expat, FFmpeg, Flex, FriBidi, GDBM, GitHub CLI, GnuTLS, gperf, Graphviz, less, libpsl, LZ4, m4, nginx, OpenSSL, pciutils, Redis, ripgrep, SQLite, tmux, wget, xxhash, and xz import standaloneTest and run a command-line smoke test.

Priority: ➖ Normal

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Other

Merge Risk: ⚪ Minimal · up to 2e2ef

The reported aarch64 run passed all 27 smoke tests. No actionable merge blocker is established; amd64 remains unverified.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the addition of smoke tests across 27 previously untested packages. Most tests use a version flag; bzip2 uses --help.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this dif 8000 f. Analyzed 0 functions across 0…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

@norrietaylor norrietaylor left a comment
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verified all 27: each binary in cmds is a dedicated usr/bin/<bin> OutputBin on the PR head and is installed by the build.sh; each flag is an exit-0 path for that tool (ffmpeg -version, tmux -V, nginx -v, openssl version, dav1d/gperf/dot/xxhsum print to stderr but exit 0). bzip2 --help is correct: in 1.0.8 --version only prints the license and falls through to compressing stdin. Import ordering correct in all 27 (standaloneTest before subsetOf). The -27 lines are purely the rewritten import lines. No main-side changes to these files since merge-base.

Two notes for the record:

  • tests is not in SpecHash, so minimal-check prints standalone tests...Skip for these; the green CI run does not exercise them. Per the body the 27/27 pass was arm64 only. Low risk, all arch-agnostic flags.
  • Path style: this PR uses /usr/bin/<bin>; 53 of the ~63 existing standaloneTest users use /bin/<bin>. Both forms exist and pass on main. Cosmetic.

@bryan-minimal
bryan-minimal added this pull request to the merge queue Oct 9, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to no response for status checks Oct 10, 2026
@bryan-minimal
bryan-minimal added this pull request to the merge queue Oct 11, 2026
Merged via the queue into main with commit a9c39ec Oct 11, 2026
11 checks passed
@bryan-minimal
bryan-minimal deleted the standalone-smoketests-batch1 branch October 11, 2026 00:10
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.

2 participants

0