mirror of
https://github.com/kuhyx/testsAndMisc.git
synced 2026-11-13 21:30:47 +01:00
rpi_nc_install.sh is one 200-line function that apt-installs 24 packages, seeds MariaDB, rm -rf's /var/www/nextcloud, rewrites Apache and PHP config and installs a www-data crontab. 29 assertions, run for real inside the jail. The destructive step is the point: a bug in `rm -rf /var/www/nextcloud` is invisible to any check that does not actually run it. Two latent bugs in the ALREADY-COMMITTED nc_php suite, both found by finally reading its assertion results instead of only its coverage percentage. It was failing 2 of 29 in isolation: - the cron entry arrives on crontab's STDIN, not in argv, so asserting on the call log could never have passed for the right reason. The stub now records stdin. - configure_mariadb's stdout is eaten by `db_password=$(...)`, so the phase-order marker now goes to stderr and the capture reads both. Suites now: 28 + 30 + 29 = 87 assertions, 0 failures. KNOWN AND UNEXPLAINED: kcov mis-measures rpi_nc_install.sh at 10/88 = 11.36%, recording lines 13-54 and nothing after -- yet the code past line 54 provably runs, since /root/.nextcloud_db_password and /etc/apache2/sites-available/nextcloud.conf both exist afterwards. The three obvious culprits were each tested against a minimal reproduction and DISPROVEN: kcov traces fine past a heredoc, into a $( ) command substitution, and past a heredoc-fed stub reading stdin via $(cat). The file stays on the allowlist and the suite is kept for its assertions, not its percentage. Do not 'fix' the number by weakening a test. dot_resolver_install.sh 39/39 = 100.00%; nc_php.sh 84/85 = 98.82%. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DbD4nco3EgL1UFoZKmKsLE |
||
|---|---|---|
| .. | ||
| lib | ||
| systemd | ||
| control_from_mobile.sh | ||
| install_unreal_mcp_kvick.sh | ||
| install_unreal_mcp.sh | ||
| keepass_consolidate.sh | ||
| keepass_sync.sh | ||
| keepass-open.sh | ||
| migrate_github_to_gitea.sh | ||
| raspberry_pi_flash_sd.sh | ||
| raspberry_pi_nextcloud.sh | ||
| setup_activitywatch.sh | ||
| setup_dns_blocker.sh | ||
| setup_dot_resolver.sh | ||
| setup_dwm.sh | ||
| setup_gitea.sh | ||
| setup_kcd2_dice_solver.sh | ||
| setup_keepass_sync.sh | ||
| setup_local_llm.sh | ||
| setup_nextcloud_raspberry.sh | ||
| setup_personal_website.sh | ||
| setup_phone_wireguard.sh | ||
| setup_searxng.sh | ||
| setup_syncyomi_guard.sh | ||
| setup_syncyomi.sh | ||
| setup_wireguard_ssh.sh | ||