Skip to content

End to end smoke tests and generated fixtures with source manifests - #123

Merged
indy2kro merged 5 commits into
mainfrom
ci/smoke-tests
Oct 7, 2026
Merged

indy2kro merged 5 commits into
mainfrom
ci/smoke-tests

Conversation

@indy2kro

@indy2kro indy2kro commented Oct 7, 2026

Copy link
Copy Markdown
Owner

End to end smoke tests for bin/isotool, and more real-world fixtures with an expectation that does not come from this library.

Smoke tests (tests/smoke/run.sh, composer run smoke)

These run as separate processes on Linux, Windows and macOS for every PHP version. On Windows they also run a second time through bin\isotool.bat. They check what the in-process PHPUnit CLI tests can't:

  • Golden outputs: every fixture through -l --ndjson, -j, info --files, and --volume=primary|joliet|udf -l, compared with tests/smoke/expected/ (line endings ignored). --strict and --find must succeed.
  • Source manifests: every generated fixture is extracted (all three trees where present) and compared with fixtures/manifests/. Those hold the SHA-256 of the source files each image was built from, so the expectation is independent of this library. The El Torito default boot image is checked the same way.
  • Process-level behaviour:
    • standard input (-f -) gives the same listing as the file
    • --cat is binary safe and returns the same bytes as extraction
    • image and extraction paths with spaces and non-ASCII characters work
  • Damaged images: truncated, random bytes and empty images must exit with 0 or 3 and an ERROR: line, and never print a PHP warning or crash.
  • Error paths: every documented exit code, with the error on stderr and nothing on stdout.

UPDATE=1 tests/smoke/run.sh regenerates the expected outputs. A full run takes about 85 s locally on Windows.

New fixtures (fixtures/build-fixtures.sh, Docker)

Image Covers Writer
rr_joliet.iso Rock Ridge + Joliet: 300-file directory, empty file/dir, binary file, 10-level tree, spaces, symbols, accents, dotfile, symlink xorriso
rr_relocated.iso Rock Ridge directories deeper than 8 levels (rr_moved, CL/RE/PL) genisoimage
eltorito.iso BIOS no-emulation entry + EFI entry in a second section xorriso
udf201.iso Pure UDF 2.01, no ISO 9660 mkudffs + Linux UDF driver
udf_bridge.iso UDF 1.02 + Joliet + Rock Ridge, same content in three trees genisoimage
pycdlib_udf260.iso UDF 2.60 + Joliet + Rock Ridge pycdlib, an independent implementation

All 22 manifest comparisons pass, along with the boot image. The fixtures add about 9 MB to the repository, and tests/smoke/expected/ adds about 37k lines (mostly the 300-file listings in several formats).

Limit: a real UDF 2.50+ image with a metadata partition could not be produced. mkudffs writes 2.50 only for write-once media, which use a virtual allocation table, and the Linux driver can't write those. That feature is still covered only by the synthetic PHPUnit images, as fixtures/README.md notes.

Verification

  • tests/smoke/run.sh: 321 checks pass with php bin/isotool and with bin/isotool.bat on Windows.
  • composer run check: 614 tests (the fuzz test also covers the new fixtures), plus shellcheck and actionlint, all clean.

🤖 Generated with Claude Code

Rock Ridge + Joliet (300 file directory, unusual names), relocated Rock Ridge directories, El Torito BIOS + EFI, pure UDF 2.01 (Linux driver), genisoimage UDF bridge and pycdlib UDF 2.60, built in Docker by fixtures/build-fixtures.sh. manifests/ holds the SHA-256 of the source files of each image.
Every fixture through every action with expected outputs, extraction checked against the source manifests, exit codes, standard input, binary safe --cat, odd paths and damaged images.
@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 0 complexity · 0 duplication

Metric Results
Complexity 0
Duplication 0

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

2.0.0 was already released at 931ca0a: CHANGELOG.md describes what it contained, the work since then is 2.1.0, and UPGRADE-2.1.md lists its breaking changes.
@codecov

codecov Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.47%. Comparing base (0210b7e) to head (1f43a42).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@             Coverage Diff              @@
##               main     #123      +/-   ##
============================================
+ Coverage     97.42%   97.47%   +0.05%     
  Complexity      888      888              
============================================
  Files            25       25              
  Lines          1904     1904              
============================================
+ Hits           1855     1856       +1     
+ Misses           49       48       -1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

@indy2kro
indy2kro merged commit 28cb41f into main Oct 7, 2026
11 of 14 checks passed
@indy2kro
indy2kro deleted the ci/smoke-tests branch October 7, 2026 19:33
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