testsAndMisc/linux_configuration/scripts/single_use/features/lib
Krzysztof kuhy Rudnicki 768e73249d Cover dwm_config.sh and fix its unreachable upstream-drift warning
A 27-assertion suite for dwm_config.sh, the highest-scored remaining
allowlisted lib. It drives the lib for real inside the jail: rewriting dwm.c
with perl, appending to config.h, compiling with cc and installing into
/usr/local/bin. The generated content is asserted, not just the call.

LATENT BUG, found by writing the test: apply_fullscreen_confine_hook does
`on=$(grep -c 'pconfine-auto on' "$src")`, and grep -c exits 1 when the count
is zero. The caller runs `set -euo pipefail`, so the function aborted at that
line exactly when the count was zero -- which is precisely when the
"setfullscreen/unmanage were likely refactored upstream" warning three lines
below was the thing needed. The warn branch was dead code in the only
situation it exists for. Both call sites now use `|| true`, and the suite
asserts the warning fires.

Measured: dwm_config.sh 35/73 = 47.95%. It STAYS on the allowlist -- the bar
is 100% and it is measured, not asserted.

That number is an under-report. An `exit 43` sentinel proves build_install,
build_pointer_confine, write_session_files and verify all execute inside the
jail while kcov reports their bodies at zero hits. One kcov artifact is now
CONFIRMED against a minimal repro: continuation lines inside a multi-line
quoted argument (the `perl -0777 -pe '...'` blocks) are counted as
statements that never run, which is the wrong denominator. A sixth
hypothesis -- that the exec-ing sudo shim or a pipeline loses the trace --
was tested and disproven. The two-strike time-box on this hunt is spent;
docs/shell-split-verification.md records what is known, including the
exit-sentinel technique for telling a tracing failure from an aborted suite.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016sxxsDHWgdRhmdmzNMA6XM
2026-08-22 12:44:12 +02:00
..
tests Cover dwm_config.sh and fix its unreachable upstream-drift warning 2026-08-22 12:44:12 +02:00
aw_autostart.sh Split three more scripts; make the verifier catch heredoc cuts 2026-08-16 20:16:08 +02:00
aw_install.sh Split three more scripts; make the verifier catch heredoc cuts 2026-08-16 20:16:08 +02:00
aw_service.sh Split three more scripts; make the verifier catch heredoc cuts 2026-08-16 20:16:08 +02:00
dns_dhcp.sh Split setup_dns_blocker.sh, a live systemd unit target 2026-08-16 21:31:03 +02:00
dns_firewall.sh Split setup_dns_blocker.sh, a live systemd unit target 2026-08-16 21:31:03 +02:00
dns_units.sh Split setup_dns_blocker.sh, a live systemd unit target 2026-08-16 21:31:03 +02:00
dot_resolver_install.sh Split seven more linux_configuration scripts 2026-08-16 18:56:05 +02:00
dwm_config.sh Cover dwm_config.sh and fix its unreachable upstream-drift warning 2026-08-22 12:44:12 +02:00
gitea_network.sh Split three near-miss linux_configuration scripts 2026-08-16 18:38:43 +02:00
kcd2_autorebuild.sh Split three large linux_configuration scripts, defer a fourth 2026-08-16 19:06:16 +02:00
kcd2_expose.sh Split three large linux_configuration scripts, defer a fourth 2026-08-16 19:06:16 +02:00
kcd2_serve.sh Split three large linux_configuration scripts, defer a fourth 2026-08-16 19:06:16 +02:00
local_llm_model.sh Split five more linux_configuration single_use scripts 2026-08-16 18:51:28 +02:00
mobile_service.sh Split two more linux_configuration scripts; revert a third 2026-08-16 18:44:18 +02:00
nc_discover.sh Split setup_nextcloud_raspberry.sh 1383 -> 231 2026-08-16 19:37:07 +02:00
nc_flash.sh Split setup_nextcloud_raspberry.sh 1383 -> 231 2026-08-16 19:37:07 +02:00
nc_image.sh Split setup_nextcloud_raspberry.sh 1383 -> 231 2026-08-16 19:37:07 +02:00
nc_packages.sh Split setup_nextcloud_raspberry.sh 1383 -> 231 2026-08-16 19:37:07 +02:00
nc_php.sh Split setup_nextcloud_raspberry.sh 1383 -> 231 2026-08-16 19:37:07 +02:00
nc_remote_flash.sh Split setup_nextcloud_raspberry.sh 1383 -> 231 2026-08-16 19:37:07 +02:00
nc_remote.sh Split setup_nextcloud_raspberry.sh 1383 -> 231 2026-08-16 19:37:07 +02:00
nc_services.sh Split setup_nextcloud_raspberry.sh 1383 -> 231 2026-08-16 19:37:07 +02:00
pi_flash_exec.sh Split the Pi flasher and the boot-repair test harness 2026-08-16 20:21:44 +02:00
pi_flash_image.sh Split the Pi flasher and the boot-repair test harness 2026-08-16 20:21:44 +02:00
pi_flash_remote.sh Split the Pi flasher and the boot-repair test harness 2026-08-16 20:21:44 +02:00
rpi_nc_ca.sh Split three more linux_configuration giants 2026-08-16 19:43:55 +02:00
rpi_nc_deps.sh Split three more linux_configuration giants 2026-08-16 19:43:55 +02:00
rpi_nc_fixes.sh Split three more linux_configuration giants 2026-08-16 19:43:55 +02:00
rpi_nc_install.sh Split three more linux_configuration giants 2026-08-16 19:43:55 +02:00
rpi_nc_ssl_remote.sh Split three more linux_configuration giants 2026-08-16 19:43:55 +02:00
rpi_nc_ssl.sh Split three more linux_configuration giants 2026-08-16 19:43:55 +02:00
rpi_nc_system.sh Split three more linux_configuration giants 2026-08-16 19:43:55 +02:00
searxng_expose.sh Split setup_searxng.sh 912 -> 184 2026-08-16 19:11:40 +02:00
searxng_limiter.sh Split setup_searxng.sh 912 -> 184 2026-08-16 19:11:40 +02:00
searxng_settings.sh Split setup_searxng.sh 912 -> 184 2026-08-16 19:11:40 +02:00
searxng_stack.sh Split setup_searxng.sh 912 -> 184 2026-08-16 19:11:40 +02:00
searxng_start.sh Split setup_searxng.sh 912 -> 184 2026-08-16 19:11:40 +02:00
searxng_status.sh Split setup_searxng.sh 912 -> 184 2026-08-16 19:11:40 +02:00
syncyomi_expose.sh Split three more linux_configuration feature and fix scripts 2026-08-16 18:48:01 +02:00
syncyomi_stack.sh Split three more linux_configuration feature and fix scripts 2026-08-16 18:48:01 +02:00
unreal_mcp_repo.sh Split five more linux_configuration single_use scripts 2026-08-16 18:51:28 +02:00
website_build.sh Split three more linux_configuration feature and fix scripts 2026-08-16 18:48:01 +02:00
wg_firewall.sh Split three more scripts; make the verifier catch heredoc cuts 2026-08-16 20:16:08 +02:00
wg_keys.sh Split three more scripts; make the verifier catch heredoc cuts 2026-08-16 20:16:08 +02:00
wg_sshd.sh Split three more scripts; make the verifier catch heredoc cuts 2026-08-16 20:16:08 +02:00