mirror of
https://github.com/kuhyx/testsAndMisc.git
synced 2026-11-11 17:54:03 +01:00
57/57 lines, measured through run_all.sh and confirmed a second time at --min 100 so a shortfall would exit non-zero. check_shell_coverage.sh passes with the exemption removed. 28 assertions over 14 cases: no cpufreq at all, every core already tuned, the mixed case where only some cores lag, cpupower absent / unconfigured / already configured, and all three I/O scheduler targets (none for NVMe, mq-deadline for SATA SSD, bfq for spinning disks). The sysfs reads and the two /etc write targets are now behind overrides defaulting to the real paths, so the tests can present hardware this host does not have -- a rotational disk -- without touching anything. One assertion initially passed for the wrong reason: _t_hide keeps $FAKE_BIN on PATH by design, so the harness's own cpupower stub still satisfied has_cmd and the "not installed" branch never ran. Unstubbing before hiding is now explicit, and the case fails if that is lost. This also settles arch_sysctl.sh's diagnosis: it uses this same harness, so the harness is not why it cannot be measured. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
19 lines
1.8 KiB
JSON
19 lines
1.8 KiB
JSON
{
|
|
"title": "Clear arch_cpu.sh from the shell coverage allowlist",
|
|
"objective": "Bring arch_cpu.sh to 100% measured line coverage through tests/run_all.sh and remove its allowlist exemption, taking the allowlist from 91 entries to 90.",
|
|
"acceptance_criteria": [
|
|
"The jail reports arch_cpu.sh at 100.00% measured through tests/run_all.sh, not through a single test file.",
|
|
"A second measurement at --min 100 exits 0, so a shortfall would be a non-zero exit rather than a number to read.",
|
|
"With the allowlist line removed, check_shell_coverage.sh on arch_cpu.sh prints 'every checked shell library meets the coverage bar'.",
|
|
"Both functions are covered across every branch: no cpufreq at all, all cores already tuned, a mixed set where only some cores lag, cpupower absent, cpupower present and unconfigured, cpupower already configured, and all three I/O scheduler targets (none for NVMe, mq-deadline for SSD, bfq for HDD).",
|
|
"arch_cpu.sh's production behaviour is unchanged: every new override defaults to the real path it replaced.",
|
|
"The whole suite stays green and shellcheck reports nothing, with zero suppressions."
|
|
],
|
|
"out_of_scope": [
|
|
"arch_sysctl.sh's kcov registration failure, which is tracked separately and stays on the allowlist.",
|
|
"Changing the coverage instrument, which is scheduled after the eight libs.",
|
|
"arch_hardware.sh, the third lib of this family, which reuses this harness in a later commit."
|
|
],
|
|
"verifier": "timeout 900s bash meta/scripts/shell_coverage_jail.sh --subject linux_configuration/scripts/single_use/fixes/lib/tests/run_all.sh --measure arch_cpu.sh --min 100 --fail-on-case-error -- \"\" (expects 57/57 = 100.00%, exit 0), followed by bash meta/scripts/check_shell_coverage.sh on the lib with its allowlist line removed."
|
|
}
|