testsAndMisc/linux_configuration/scripts/single_use/fixes/lib/tests
Krzysztof kuhy Rudnicki 0c92a00f0f Test arch_perf_fixes.sh to 93.48% and fix the journal regex a third time
Eighth of the 16 untested fixes/lib libs. 22 assertions; 43/46 = 93.48%. The
lib STAYS on the allowlist -- see the artifact below.

Third instance of the same dead branch. Line 16 matched on
`([0-9]+\.?[0-9]*)\ G`, a required space before the unit, while journalctl
prints "4.2G" with no separator, so the vacuum could never run. Fixed to an
optional space, as in arch_perf_report.sh.

This one differs from that earlier fix and the difference was confirmed with
the user before landing: arch_perf_report.sh's vacuum sits behind
--apply-safe-fixes, but THIS one runs whenever fix_arch_performance.sh runs.
So the fix makes an unflagged destructive action live -- the script will now
really vacuum the journal to 300M once it passes a gigabyte. That is the
function's evident intent, since its next act is to write a permanent 300M
cap, and the user approved it explicitly.

Three absolute paths moved behind overrides defaulting to the real ones:
JOURNALD_CONF_DIR, SYSTEMD_UNIT_DIR (fix_media_organizer writes
/etc/systemd/system/media-organizer.service) and ORGANIZE_SCRIPT_CANDIDATES.
Verified afterwards that the real unit file still carries its 2026-07-25
mtime and the journald drop-in its 2026-03-02 one, i.e. a bare un-jailed
run_all.sh touched neither.

The three uncovered lines (68-70) are the element lines of a multi-line array
literal. `PS4` + `set -x` on a minimal case shows bash reporting the whole
assignment at its OPENING line and never emitting the elements or the closing
paren, so they are data, not statements -- a fourth flavour of defect (a),
after multi-line quotes, `} |` and the backslash-continued assignment. The
array is provably used: the loop on the next line iterates it and the
media-organizer assertions pass.

Worth fixing, unlike the bt_adapter one-liner: the form appears in three of
the remaining untested libs (thorium_repairs.sh has four) and in nine
allowlisted libs repo-wide. That lands as its own commit next.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-22 19:34:12 +02:00
..
arch_perf_harness.sh Test arch_perf_fixes.sh to 93.48% and fix the journal regex a third time 2026-08-22 19:34:12 +02:00
bt_harness.sh Test arch_perf_report.sh to 98.33% and fix its dead journal-size check 2026-08-22 18:06:57 +02:00
lib_test_core.sh Test arch_perf_probes.sh to 100%: allowlist 93 -> 92 2026-08-22 19:04:50 +02:00
pacman_hook_stall_entry_harness.sh diagnose_pacman_hook_stall.sh: split 493 -> 249 + 6 libs, 100% coverage 2026-08-18 22:33:57 +02:00
pacman_hook_stall_harness.sh diagnose_pacman_hook_stall.sh: split 493 -> 249 + 6 libs, 100% coverage 2026-08-18 22:33:57 +02:00
run_all.sh Add fixes/lib run_all.sh; the previous handoff was wrong about that directory 2026-08-22 14:40:31 +02:00
test_arch_perf_fixes.sh Test arch_perf_fixes.sh to 93.48% and fix the journal regex a third time 2026-08-22 19:34:12 +02:00
test_arch_perf_probes_health.sh Test arch_perf_probes.sh to 100%: allowlist 93 -> 92 2026-08-22 19:04:50 +02:00
test_arch_perf_probes.sh Test arch_perf_probes.sh to 100%: allowlist 93 -> 92 2026-08-22 19:04:50 +02:00
test_arch_perf_report_fixes.sh Test arch_perf_report.sh to 98.33% and fix its dead journal-size check 2026-08-22 18:06:57 +02:00
test_arch_perf_report.sh Test arch_perf_report.sh to 98.33% and fix its dead journal-size check 2026-08-22 18:06:57 +02:00
test_bt_adapter_reset.sh Test arch_perf_probes.sh to 100%: allowlist 93 -> 92 2026-08-22 19:04:50 +02:00
test_bt_adapter.sh Test bt_adapter.sh to 98.55%; line 97 is unreachable by construction 2026-08-22 17:10:15 +02:00
test_bt_audio_connect.sh Test bt_audio.sh to 96.97% and fix its wpctl health check 2026-08-22 17:52:24 +02:00
test_bt_audio_health.sh Test bt_audio.sh to 96.97% and fix its wpctl health check 2026-08-22 17:52:24 +02:00
test_bt_audio.sh Test bt_audio.sh to 96.97% and fix its wpctl health check 2026-08-22 17:52:24 +02:00
test_bt_pairing_usb.sh Test arch_perf_probes.sh to 100%: allowlist 93 -> 92 2026-08-22 19:04:50 +02:00
test_bt_pairing.sh Test bt_pairing.sh to 100%: allowlist 97 -> 96 2026-08-22 16:47:40 +02:00
test_bt_report.sh Test bt_report.sh to 100%: allowlist 98 -> 97 2026-08-22 16:33:33 +02:00
test_diagnose_pacman_hook_stall_args.sh diagnose_pacman_hook_stall.sh: split 493 -> 249 + 6 libs, 100% coverage 2026-08-18 22:33:57 +02:00
test_diagnose_pacman_hook_stall_timing.sh diagnose_pacman_hook_stall.sh: split 493 -> 249 + 6 libs, 100% coverage 2026-08-18 22:33:57 +02:00
test_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
test_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
test_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
test_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
test_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
test_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
test_ubuntu_perf_more.sh Test ubuntu_perf_more.sh to 100%: allowlist 93 -> 92 2026-08-22 19:25:21 +02:00
ubuntu_perf_harness.sh Test ubuntu_perf_more.sh to 100%: allowlist 93 -> 92 2026-08-22 19:25:21 +02:00