mirror of
https://github.com/kuhyx/testsAndMisc.git
synced 2026-11-11 18:14:03 +01:00
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>
19 lines
2.1 KiB
JSON
19 lines
2.1 KiB
JSON
{
|
|
"title": "Test arch_perf_report.sh, open the arch-performance family, and fix the dead journal-size check",
|
|
"objective": "Cover the fifth of the sixteen untested fixes/lib libs and stand up the harness the arch-performance group will share. Writing the tests exposed a second dead branch -- the journal size regex demanded a space before the unit that journalctl never prints -- so this lands that fix alongside the coverage. The lib stops at 98.33%: its last line is a redirected closing brace no test can reach.",
|
|
"acceptance_criteria": [
|
|
"arch_perf_report.sh measures 98.33% (59/60) through lib/tests/run_all.sh, twice, with line 20 the only uncovered line both times.",
|
|
"The old journal regex is shown NOT to match journalctl's real output before the fix, and the fixed one shown to match both the spaced and unspaced forms.",
|
|
"Line 20 is shown to be a closing brace of a redirected group that executes, not a missing test.",
|
|
"meta/shell-coverage-allowlist.txt is UNCHANGED -- arch_perf_report.sh does not meet the 100% bar.",
|
|
"The four bluetooth suites and the eight pacman_hook_stall suites still pass after _t_hide and _t_full_path move into lib_test_core.sh.",
|
|
"Every file stays under the repo's 250-line cap, and pre-commit passes with no suppression added."
|
|
],
|
|
"out_of_scope": [
|
|
"Clearing arch_perf_report.sh, bt_audio.sh or bt_adapter.sh from the allowlist. All three are capped by defect (a) in docs/kcov-under-report.md.",
|
|
"Changing continuation_lines() in meta/scripts/lib/shell_coverage_lines.py. That is the next commit, kept separate so a denominator change can be reverted without losing these tests.",
|
|
"The remaining eleven untested fixes/lib libs."
|
|
],
|
|
"verifier": "bash linux_configuration/scripts/single_use/fixes/lib/tests/run_all.sh (expects all files passing, 17 + 21 for the two arch_perf_report files), plus bash meta/scripts/shell_coverage_jail.sh --subject linux_configuration/scripts/single_use/fixes/lib/tests/run_all.sh --measure arch_perf_report.sh --min 1 --fail-on-case-error -- \"\" (expects 59/60 = 98.33%, uncovered 20), plus bash meta/scripts/check_shell_coverage.sh on the cleared libs (expects exit 0)."
|
|
}
|