testsAndMisc/linux_configuration/scripts/single_use
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
..
features Make the gate read jail_args and refuse a suite that dies partway 2026-08-22 13:36:54 +02:00
feedback-appimage feedback: local-only pacman package build, and ignore build artifacts 2026-08-10 15:33:18 +02:00
fixes Test arch_perf_report.sh to 98.33% and fix its dead journal-size check 2026-08-22 18:06:57 +02:00
fresh-install fresh-install: split main.sh 308 -> 200 + 121 2026-08-17 14:11:26 +02:00
lib Split install_joplin.sh and establish the shell-split pattern 2026-08-16 18:33:59 +02:00
misc/testsAndMisc-bash Cover clean_audio_filters.sh (89.25%), completing testsAndMisc-bash/lib 2026-08-22 13:27:44 +02:00
utils generate_study_materials: split into lib/ under the 250-line cap 2026-08-21 14:32:08 +02:00
install_code_insiders.sh refactor(linux_configuration/scripts): split all scripts into single_use/ and periodic_background/ 2026-05-15 00:32:35 +02:00
install_feedback.sh feedback: local-only pacman package build, and ignore build artifacts 2026-08-10 15:33:18 +02:00
install_joplin.sh Split install_joplin.sh and establish the shell-split pattern 2026-08-16 18:33:59 +02:00
install_ungoogled_chromium_ubuntu.sh Wire uBlock Origin into every real Chromium launch, alongside LeechBlock 2026-08-12 22:44:28 +02:00
test_bad.sh refactor(linux_configuration/scripts): split all scripts into single_use/ and periodic_background/ 2026-05-15 00:32:35 +02:00
test_removal.sh refactor(linux_configuration/scripts): split all scripts into single_use/ and periodic_background/ 2026-05-15 00:32:35 +02:00