testsAndMisc/meta/scripts/lib
Krzysztof kuhy Rudnicki 0201d5460a
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
Clear both hosts-guard libs; teach the instrument done <redirect> (88 -> 86)
hosts_guard_migrate.sh 81/81 and hosts_guard_rollback.sh 65/65, both
100.00% through run_all.sh at --min 100, and check_shell_coverage.sh
passes with each allowlist line already deleted.

82 assertions over 36 cases in three files sharing one harness: all four
validate_requirements refusals, plugin installation, the mount-collapse
loop in every arm (clears, fails, hits its 20-iteration bound, dry-run),
per-instance migration for both the bind-mounted and the plugin flavour,
and do_migrate's refusal to retire the legacy pacman hooks when nothing
registered -- the arm that exists so a failed migration cannot leave the
files with no unlock hook at all.

INSTRUMENT FIX: rollback measured 97.01% with lines 69 and 108
uncovered, both `done <redirect>` closing a loop. Reproduced minimally:
in a three-iteration loop ending `done >"$1"`, the body reports hits=3
and the `done` line hits=0, because bash attributes the redirected
compound statement to the loop's OPENING line. That is the same defect
_CLOSING_BRACE_OP already handles for `} |`, so _LOOP_END_OP is its
twin. The redirect is required by the pattern: a bare `done` stays in
the denominator, so genuinely uncovered loops are still caught.

Audited as the instrument notes demand -- every newly excluded line
printed with its text -- and it is exactly those two lines across all of
fixes/lib. Acceptance pair unchanged and exact: dot_resolver_install.sh
39/39, rpi_nc_ca.sh 73/73.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-23 11:50:13 +02:00
..
disk_cleanup_common.sh Split disk_cleanup_check.sh: extract the helpers and the output blocks 2026-08-16 22:57:06 +02:00
shell_coverage_bar.sh Test thorium_repairs.sh to 100%, lift the gate timeout (89 -> 88) 2026-08-23 11:05:56 +02:00
shell_coverage_case_runner.sh Fix both kcov defects: dwm_config 47.95% -> 98.48%, rpi_nc_install 11.36% -> 96.59% 2026-08-22 14:24:25 +02:00
shell_coverage_jail_setup.sh Fix both kcov defects: dwm_config 47.95% -> 98.48%, rpi_nc_install 11.36% -> 96.59% 2026-08-22 14:24:25 +02:00
shell_coverage_lines.py Clear both hosts-guard libs; teach the instrument done <redirect> (88 -> 86) 2026-08-23 11:50:13 +02:00
trace_prefix.sh Close three fail-open paths in the prefix trace harness 2026-08-16 23:38:38 +02:00
trace_stubs.sh Trace scripts that place files, via a prefix redirect 2026-08-16 23:31:49 +02:00