Repository navigation
test(ci): check that a linked TINY binary carries no float or solver symbols (#4043) - #4390
Merged
Merged
Conversation
…symbols (#4043) P9's stated open half, and `test_no_float_per_pixel.py` says so in as many words: What this does NOT claim: that a linked TINY binary contains no float symbols. That is a link-time property needing `bash bloat` on a real target, and it remains P9's open half. Built Blink for ATtiny85 -- 512 B of SRAM, so `FL_IS_AVR_ATTINY_TINY_MEMORY` holds, `FL_PLATFORM_HAS_TINY_MEMORY` is 1 and `FL_COLOR_PROFILE_RUNTIME` is 0 -- and read its symbol table. Neither avr-gcc's soft-float helpers nor any colour-pipeline solver symbol is present. This checks that. The soft-float list is the useful part. An ATtiny has no FPU, so float arithmetic surviving to link arrives as a call to `__addsf3` and friends; their absence is a real observation rather than a restatement of the source-level rule the sibling test already covers. Skipped rather than built, following `test_elf.py`: the build wants the AVR toolchain and ~40 s, which does not belong in a suite that now runs on every pull request. `bash compile attiny85 --examples Blink` produces the ELF and this reads it. Also asserts the build contains `FastLED` and `CPixelLEDController` first -- that is how an absence test goes wrong, with nothing present so nothing forbidden present either. Verified by adding a known-present symbol to each forbidden list, which fails the matching case. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01MLhWkMfzLjrnLTDMBE6Fj9
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe pull request adds a test module that inspects the ATtiny85 ELF with ChangesATtiny85 link checks
Estimated code review effort: 3 (Moderate) | ~20 minutes Change: Other ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This was referenced Sep 12, 2026
zackees
added a commit
that referenced
this pull request
Sep 12, 2026
…#4043) (#4401) P9 asks for the TINY tier's link-time property -- no float, no solver symbols -- to be verified by symbol-level inspection. The test for it has existed since #4390 and has never executed a single assertion. It reads an ATtiny85 ELF and skips when the build is absent, following `test_elf.py`. Nothing ever built an ATtiny85 before it ran: `pytest ci/tests` collects it in a job with no AVR build, so it skips there, and the two attiny85 workflows never invoke it. A deliverable asserted by a test that always skips is not asserted. `check_attiny85.yml` already builds attiny85 Blink to check its size, and that job is where the ELF is. The test now runs there, immediately after the Blink build and before the Apa102 one, with FL_REQUIRE_TINY_ELF=1. That variable is the point of the change as much as the wiring is. Without it the first thing to move the ELF would return this file to passing vacuously and nothing would say so -- the same failure being fixed, reintroduced. With it set, a missing build fails and names what it searched. Only the unmodified job: the sibling compiles with FASTLED_NO_FORCE_INLINE, whose link-time symbol set is a separate question this does not answer. Every other board using the template is unaffected -- the step is guarded on board and on empty extra_args, and attiny85 has one such caller. The hardcoded ELF path is gone too. `ci/compiled_size.py` documents two fbuild layouts and two build roots; the test pinned one spelling of one of them, so the other produced a silent skip. It now globs both roots and takes the newest match, the rule `ci/bloat.py` settled on in #4386. Verified locally, all four states: ELF present passes with and without the variable; ELF absent skips without it and fails with it; and the alternate `<env>/release` layout is found where the old path was not. Known limit, stated rather than implied: both attiny85 workflows trigger on push to master, not on pull_request, so this catches a regression one merge after it lands rather than blocking it. Making it a PR gate means paying for an AVR build on every PR, which is a cost decision for the maintainer, not something to slip in here. Claude-Session: https://claude.ai/code/session_01MLhWkMfzLjrnLTDMBE6Fj9 Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
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.
Closes P9's (#4043) stated open half. Part of #4034.
ci/tests/test_no_float_per_pixel.pychecks the source-level precondition and is explicit that it does not check what P9 actually promises:Measured
Built Blink for ATtiny85 — 512 B of SRAM, so
FL_IS_AVR_ATTINY_TINY_MEMORYholds,FL_PLATFORM_HAS_TINY_MEMORYis 1 andFL_COLOR_PROFILE_RUNTIMEis 0 — and read its symbol table withavr-nm:__addsf3,__mulsf3,__fixsfsi, …)nnls,gamut,oklab,bradford,white_allocation,device_solve,colorimetric)CPixelLEDController<...>::showThe soft-float list is what makes this worth having. An ATtiny has no FPU, so any float arithmetic that survives to link time arrives as a call to one of those helpers — their absence is an observation about the linked image, not a restatement of the source rule the sibling test already covers.
Why it skips rather than builds
Following
test_elf.py, which does the same for its UNO build. The ATtiny build wants the AVR toolchain and ~40 s, andci/testsnow runs on every pull request (#4360), so building there would be the wrong trade.bash compile attiny85 --examples Blinkproduces the ELF and this reads it.The vacuity guard
An absence test fails by having nothing present, so nothing forbidden present either.
test_the_build_actually_contains_fastledruns first and assertsFastLEDandCPixelLEDControllerare in the table.Verified by mutation: adding a known-present symbol to each forbidden list fails the matching case and only that case.
bash lintclean;bash test --py --cleanclean.Test-only; no
src/change.🤖 Generated with Claude Code
https://claude.ai/code/session_01MLhWkMfzLjrnLTDMBE6Fj9
Summary by CodeRabbit