testsAndMisc/linux_configuration
Krzysztof kuhy Rudnicki ffcf99f102 Test arch_perf_report.sh to 98.33% and fix its dead journal-size check
Fifth of the 16 untested fixes/lib libs and the first of the arch-performance
group, which gets its own harness here. 38 assertions across two files. The
lib STAYS on the allowlist at 59/60 = 98.33%, measured twice.

The second dead branch this campaign has found, fixed here. Lines 36 and 65
matched on:

    ([0-9]+\.?[0-9]*)\ (G|M)

a REQUIRED space before the unit. journalctl actually prints "Archived and
active journals take up 305.5M in the file system." with no separator --
verified against the real binary on this machine. So check_journal_size could
never report a large journal and apply_safe_fixes could never vacuum one:
both were unreachable. The space is now optional, and tests cover the spaced
and unspaced forms so neither can rot.

NOTE: this makes a previously-dead DESTRUCTIVE action live. With
--apply-safe-fixes and a journal over a gigabyte, the entry script will now
really run `journalctl --vacuum-size=300M`. That is the flag's documented
purpose and it stays behind the flag, but it has never actually executed
before today.

Line 20, the one uncovered line, is `} >>"$REPORT_FILE"` -- the closing brace
of a redirected group. A minimal probe writes both inner lines to the file
while bash attributes no statement to the brace, and the report assertions
independently prove the group runs, since they read the text it writes. Same
defect (a) class as bt_audio's `} |`.

That form now caps four libs: bt_audio.sh, arch_perf_report.sh, and
arch_perf_probes.sh and nvidia_config.sh which are still untested. So the
continuation_lines() fix is worth landing after all -- as its own commit,
next, so a denominator change can be reverted without taking these tests
with it.

_t_hide and _t_full_path move from bt_harness.sh into lib_test_core.sh: they
are generic PATH plumbing and the arch harness needs them for the
"nvidia-smi is not installed" branch. All twelve existing suites re-run green
after the move.

One trap worth recording: apply_safe_fixes appends to the ACTIONS array, so
it must be called directly rather than inside "$(...)" -- a command
substitution runs it in a subshell where the appends die with it, and the
assertions read an empty array.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-22 18:06:57 +02:00
..
.githooks Shell coverage: convert the ratchet to a measured 100% bar 2026-08-22 11:20:58 +02:00
.github Archive legacy hosts-guard subsystem: superseded by guard-lib 2026-08-18 22:49:54 +02:00
C/atop_agg atop_agg: split atop_agg.c 478 -> 204 + state + emit 2026-08-17 10:49:46 +02:00
docs Apply prettier to two split prose files 2026-08-16 19:31:54 +02:00
dwm style: apply prettier formatting to evidence JSON and dwm/gaming READMEs 2026-06-14 07:22:04 +02:00
scripts Test arch_perf_report.sh to 98.33% and fix its dead journal-size check 2026-08-22 18:06:57 +02:00
tests test_shutdown_timer_monitor: actually populate SETUP_SOURCES 2026-08-21 16:32:51 +02:00
zsh Split calc-live.zsh: extract the qalc coprocess 2026-08-16 22:12:32 +02:00
.gitignore linux_configuration: self-hosted dufs cloud storage + KeePass WebDAV auto-sync 2026-07-12 03:40:54 +02:00
install_core_system.sh remove(digital-wellbeing): delete unusable focus-mode daemon entirely 2026-07-19 13:15:04 +02:00
test_results.log Add 'linux_configuration/' from commit '0762e3d07b90bac9256eb272de10bf9f42878094' 2026-02-06 21:43:26 +01:00