testsAndMisc/linux_configuration/scripts/single_use/fixes/lib
Krzysztof kuhy Rudnicki 434cb7587e Test bt_adapter.sh to 98.55%; line 97 is unreachable by construction
Third of the 16 untested fixes/lib libs, and the first that does NOT come
off the allowlist. 68/69 = 98.55%, up from 45/69. The remaining line is
not a missing test:

  PS4='+TRACE:${BASH_SOURCE##*/}:${LINENO} ' bash -x

shows bash attributing the whole multi-line dbus-send assignment in
_services_resolved to line 100, and never emitting line 97 at all. Line 97
is the OPENING line of a backslash-continued statement; kcov instruments
it, bash never attributes a statement to it. That is defect (a) in
docs/kcov-under-report.md -- a wrong denominator -- and no test can move it.

continuation_lines() in shell_coverage_lines.py already excludes such lines,
but only detects them by tracking QUOTE state, so a line ending in an
unquoted backslash slips through. Fixing that is deliberately left out of
this commit: it changes the denominator for every measured lib, and if it
regresses one of the libs now gated with no exemption, reverting a mixed
commit would throw away these tests too.

Scope of the problem, measured rather than guessed -- backslash
continuations are confined to the bluetooth family: bt_audio.sh 10,
bt_adapter.sh 7, bt_pairing.sh 3, pacman_hook_stall_summary.sh 2, and ZERO
in the other 12 remaining libs. So this caps bt_audio.sh next and then stops
mattering.

Also replaces the harness's _t_only_path with _t_hide. _t_only_path dropped
PATH to $FAKE_BIN alone, which hid grep, head and sort as well as the tool
under test -- so the "usbreset is not installed" case died in a cascade of
"command not found" and passed for the wrong reason instead of exercising
the fallback. _t_hide rebuilds PATH from symlinks to every real executable
except the named ones; verified directly that command -v usbreset is then
empty while grep and head still resolve.

bt_report.sh (37/37) and bt_pairing.sh (65/65) re-measured at --min 100,
both exit 0, so neither cleared lib regressed.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-22 17:10:15 +02:00
..
tests Test bt_adapter.sh to 98.55%; line 97 is unreachable by construction 2026-08-22 17:10:15 +02:00
arch_cpu.sh Split offline docs and arch optimiser; defer libre_translate 2026-08-16 20:09:54 +02:00
arch_hardware.sh Split offline docs and arch optimiser; defer libre_translate 2026-08-16 20:09:54 +02:00
arch_perf_fixes.sh Split seven more linux_configuration scripts 2026-08-16 18:56:05 +02:00
arch_perf_probes.sh Split five more linux_configuration single_use scripts 2026-08-16 18:51:28 +02:00
arch_perf_report.sh Split five more linux_configuration single_use scripts 2026-08-16 18:51:28 +02:00
arch_sysctl.sh Split offline docs and arch optimiser; defer libre_translate 2026-08-16 20:09:54 +02:00
bt_adapter.sh Split fix_bluetooth.sh 720 -> 186; defer steam_compatibility.sh 2026-08-16 19:17:05 +02:00
bt_audio.sh Split fix_bluetooth.sh 720 -> 186; defer steam_compatibility.sh 2026-08-16 19:17:05 +02:00
bt_pairing.sh Test bt_pairing.sh to 100%: allowlist 97 -> 96 2026-08-22 16:47:40 +02:00
bt_report.sh Split fix_bluetooth.sh 720 -> 186; defer steam_compatibility.sh 2026-08-16 19:17:05 +02:00
hosts_guard_migrate.sh shell: split clean_audio, enforce_vbox_hosts and migrate_hosts_guard 2026-08-17 14:27:57 +02:00
hosts_guard_rollback.sh shell: split clean_audio, enforce_vbox_hosts and migrate_hosts_guard 2026-08-17 14:27:57 +02:00
nvidia_config.sh fixes/utils: split nvidia_troubleshoot 336 -> 169+181, passwordless 374 -> 195+193 2026-08-17 14:18:06 +02:00
pacman_hook_stall_capture.sh diagnose_pacman_hook_stall.sh: split 493 -> 249 + 6 libs, 100% coverage 2026-08-18 22:33:57 +02:00
pacman_hook_stall_load.sh diagnose_pacman_hook_stall.sh: split 493 -> 249 + 6 libs, 100% coverage 2026-08-18 22:33:57 +02:00
pacman_hook_stall_setup.sh diagnose_pacman_hook_stall.sh: split 493 -> 249 + 6 libs, 100% coverage 2026-08-18 22:33:57 +02:00
pacman_hook_stall_summary.sh diagnose_pacman_hook_stall.sh: split 493 -> 249 + 6 libs, 100% coverage 2026-08-18 22:33:57 +02:00
pacman_hook_stall_usage.sh diagnose_pacman_hook_stall.sh: split 493 -> 249 + 6 libs, 100% coverage 2026-08-18 22:33:57 +02:00
pacman_hook_stall_watch.sh diagnose_pacman_hook_stall.sh: split 493 -> 249 + 6 libs, 100% coverage 2026-08-18 22:33:57 +02:00
thorium_repairs.sh Split three more linux_configuration feature and fix scripts 2026-08-16 18:48:01 +02:00
ubuntu_perf_fixes.sh Split three large linux_configuration scripts, defer a fourth 2026-08-16 19:06:16 +02:00
ubuntu_perf_more.sh Split three large linux_configuration scripts, defer a fourth 2026-08-16 19:06:16 +02:00