mirror of
https://github.com/kuhyx/testsAndMisc.git
synced 2026-11-13 04:10:48 +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 |
||
|---|---|---|
| .. | ||
| tests | ||
| aw_autostart.sh | ||
| aw_install.sh | ||
| aw_service.sh | ||
| dns_dhcp.sh | ||
| dns_firewall.sh | ||
| dns_units.sh | ||
| dot_resolver_install.sh | ||
| dwm_config.sh | ||
| gitea_network.sh | ||
| kcd2_autorebuild.sh | ||
| kcd2_expose.sh | ||
| kcd2_serve.sh | ||
| local_llm_model.sh | ||
| mobile_service.sh | ||
| nc_discover.sh | ||
| nc_flash.sh | ||
| nc_image.sh | ||
| nc_packages.sh | ||
| nc_php.sh | ||
| nc_remote_flash.sh | ||
| nc_remote.sh | ||
| nc_services.sh | ||
| pi_flash_exec.sh | ||
| pi_flash_image.sh | ||
| pi_flash_remote.sh | ||
| rpi_nc_ca.sh | ||
| rpi_nc_deps.sh | ||
| rpi_nc_fixes.sh | ||
| rpi_nc_install.sh | ||
| rpi_nc_ssl_remote.sh | ||
| rpi_nc_ssl.sh | ||
| rpi_nc_system.sh | ||
| searxng_expose.sh | ||
| searxng_limiter.sh | ||
| searxng_settings.sh | ||
| searxng_stack.sh | ||
| searxng_start.sh | ||
| searxng_status.sh | ||
| syncyomi_expose.sh | ||
| syncyomi_stack.sh | ||
| unreal_mcp_repo.sh | ||
| website_build.sh | ||
| wg_firewall.sh | ||
| wg_keys.sh | ||
| wg_sshd.sh | ||