adbd regression test does not check the Makefile gate #46

Open
opened 2026-11-06 08:35:48 -07:00 by noah · 1 comment
Owner

Symptom

luckfox-sdk-patches/tests/test-adbd-no-tcp.sh (sp/adbd-tcp-off) does not test the adbd gate that the Makefile runs:

  • step 4 hashes Makefile, adbd-current.sh and android-tools-patches/* itself and never reads the Makefile's ADBD_INPUTS;
  • step 2 replays the android-tools steps with strict checks instead of running the rule, so it cannot see the rule failures in the related issue.

Evidence

A mutant of board patch 0015 whose ADBD_INPUTS hashes only the Makefile (patch set and gate script dropped) still prints RESULT PASS with exit 0. Reproduced on the branch before the fix.

Impact

A later edit can stop adbd rebuilds when the patch set changes (bfe-core1106-sdk#44) while the regression test stays green.

Fix

The test evaluates $(ADBD_INPUTS) through make and compares it with the sha256 of the three inputs. It runs the real rule with stub toolchains, so nothing compiles, and checks the stamp and the fail-closed cases. The mutant is a FAIL case in luckfox-sdk-patches/tests/adbd-no-tcp-cases.sh.

Related: bfe-core1106-sdk#44.

## Symptom `luckfox-sdk-patches/tests/test-adbd-no-tcp.sh` (sp/adbd-tcp-off) does not test the adbd gate that the Makefile runs: - step 4 hashes `Makefile`, `adbd-current.sh` and `android-tools-patches/*` itself and never reads the Makefile's `ADBD_INPUTS`; - step 2 replays the android-tools steps with strict checks instead of running the rule, so it cannot see the rule failures in the related issue. ## Evidence A mutant of board patch 0015 whose `ADBD_INPUTS` hashes only the Makefile (patch set and gate script dropped) still prints `RESULT PASS` with exit 0. Reproduced on the branch before the fix. ## Impact A later edit can stop adbd rebuilds when the patch set changes (bfe-core1106-sdk#44) while the regression test stays green. ## Fix The test evaluates `$(ADBD_INPUTS)` through make and compares it with the sha256 of the three inputs. It runs the real rule with stub toolchains, so nothing compiles, and checks the stamp and the fail-closed cases. The mutant is a FAIL case in `luckfox-sdk-patches/tests/adbd-no-tcp-cases.sh`. Related: bfe-core1106-sdk#44.
Author
Owner

Fixed on sp/adbd-tcp-off in fabd79f (not merged; open until the branch merges, as on #44).

  • The test now runs the real android-tools rule under make, with stub toolchains, so nothing compiles.
  • It evaluates $(ADBD_INPUTS) through make and compares it with the sha256 of Makefile, adbd-current.sh and the patch set.
  • The reported mutant (ADBD_INPUTS over the Makefile only, patch set and gate script dropped) is a FAIL case in luckfox-sdk-patches/tests/adbd-no-tcp-cases.sh, and it fails on the ADBD_INPUTS check.
Fixed on sp/adbd-tcp-off in fabd79f (not merged; open until the branch merges, as on #44). - The test now runs the real android-tools rule under make, with stub toolchains, so nothing compiles. - It evaluates `$(ADBD_INPUTS)` through make and compares it with the sha256 of Makefile, adbd-current.sh and the patch set. - The reported mutant (ADBD_INPUTS over the Makefile only, patch set and gate script dropped) is a FAIL case in `luckfox-sdk-patches/tests/adbd-no-tcp-cases.sh`, and it fails on the ADBD_INPUTS check.
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: blueflare/bfe-core1106-sdk#46