testsAndMisc/linux_configuration/scripts/lib
Krzysztof kuhy Rudnicki d42d8ff20d
Some checks are pending
Pre-commit checks / pre-commit (push) Waiting to run
Shell tests / shell-tests (push) Waiting to run
Shell tests / arch-tests (push) Waiting to run
Shrink the shell-coverage allowlist 115 -> 106: cover scripts/lib
Gives linux_configuration/scripts/lib a real test suite, which takes all
nine of its libraries off meta/shell-coverage-allowlist.txt at once —
coverage is per-directory, so this is the highest-ratio first batch.

139 assertions across four suites, all offline: the mtk toolkit is driven
through its existing MTK_ROOT_FIXTURE seam, and adb is shimmed onto a
narrowed PATH. Nothing reads the wall clock, this host's udev rules, or a
real device, because the suite runs in shell-tests.yml and again on every
pre-push via ci-mirror — a host-dependent assertion would be a flake that
blocks unrelated pushes.

The gate only checks that tests/run_all.sh EXISTS, so an empty one would
mark all nine libraries covered while testing nothing. Each of the four
load-bearing rules was therefore mutation-tested and the suite required to
go red: classify_device's && -> ||, discover_partitions' init_boot/boot
ordering, mtk_select_device's refusal to guess between two phones, and
is_hour_in_range's 10#$ octal guard.

That last one initially SURVIVED. Dropping 10#$ makes bash abort with
"value too great for base", a non-zero exit indistinguishable from an
honest out-of-range result, so the status-only assertion passed either
way. It now asserts stderr is empty.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-21 23:52:09 +02:00
..
tests Shrink the shell-coverage allowlist 115 -> 106: cover scripts/lib 2026-08-21 23:52:09 +02:00
android.sh feat: great beautiful fixes 2026-02-20 01:17:53 +01:00
common_datetime.sh Split scripts/lib/common.sh, the library 49 scripts source 2026-08-16 21:14:48 +02:00
common_packages.sh Split scripts/lib/common.sh, the library 49 scripts source 2026-08-16 21:14:48 +02:00
common_services.sh Split scripts/lib/common.sh, the library 49 scripts source 2026-08-16 21:14:48 +02:00
common.sh Split scripts/lib/common.sh, the library 49 scripts source 2026-08-16 21:14:48 +02:00
mtk_classify.sh Split scripts/lib/mtk_common.sh with the same entry-point pattern 2026-08-16 21:17:50 +02:00
mtk_common.sh Split scripts/lib/mtk_common.sh with the same entry-point pattern 2026-08-16 21:17:50 +02:00
mtk_device.sh Split scripts/lib/mtk_common.sh with the same entry-point pattern 2026-08-16 21:17:50 +02:00
mtk_partitions.sh Split scripts/lib/mtk_common.sh with the same entry-point pattern 2026-08-16 21:17:50 +02:00