Repository navigation
Description
Priority
low. The defect is in test code only. It fails the backend suite in a change that does not touch hosts.
Components
- app/nullius (backend)
- app/web (routes)
- templates and static files
- docs and the site
- catalogue (benchmarks, agents, capabilities)
- the standard (ports, kits, relay, runs)
- CI, workflows and skills
Tests only: app/tests/test_hosts.py.
Evidence
On #215, whose diff does not touch hosts.py or test_hosts.py, the backend suite failed once in CI (job, attempt 1). A rerun passed.
ERROR: test_the_probe_says_when_the_host_s_docker_has_userns_remap (tests.test_hosts.ConnectionTest...) (options='[name=seccomp,profile=builtin name=userns name=cgroupns]')
File ".../app/tests/test_hosts.py", line 105, in test_the_probe_says_when_the_host_s_docker_has_userns_remap
File ".../app/nullius/hosts.py", line 213, in test
File ".../app/tests/test_hosts.py", line 103, in <lambda>
subprocess.TimeoutExpired: Command '['sh', '-c', 'printf \'ok\\n\'; for c in uv docker podman harbor; ...']' timed out after 12.0 seconds
The test runs hosts.PROBE in a local shell, with a stub docker first on PATH. The rest of PATH is /usr/bin:/bin, so the probe also finds the machine's own programs. For each of docker and podman it finds, it runs $c ps. A machine with a real podman in /usr/bin therefore runs podman ps inside the test, and the test waits for it under the probe's 12 s timeout.
The CI runner has one: the job ran on GitHub's Ubuntu 26.04 image 20261116.202, whose software list includes Podman 5.7.0. Why podman ps took that long on the runner was not checked. A first rootless call may set up its storage.
A podman in /usr/bin that takes 20 s reproduces the failure. Without it, the test passes in 6 ms.
Screenshot
No response
Reproduction
- In a
python:3.12container, on main, write/usr/bin/podmanas#!/bin/shandsleep 20, and make it executable. - From
app/, runpython3 -m unittest tests.test_hosts.ConnectionTest.test_the_probe_says_when_the_host_s_docker_has_userns_remap. - The test fails with
subprocess.TimeoutExpired: ... timed out after 12.0 seconds. Remove the file and it passes.
Expected
The test depends only on its own stub programs. A program installed on the machine running the suite does not run during the test or change its result.
Acceptance
- The test's
PATHholds only its stubdockerand the few programs the test and the probe need (sh,sed,grep,hostname), not/usr/binor/bin. - A
docker,podman,uvorharborinstalled on the machine does not run during the test. - The test still checks both answers,
docker_usernstrue and false. - The test passes with a slow
podmanin/usr/bin.
Dependencies and related
- test: wait for runs, drivers and killed processes until a load-tolerant deadline #170: backend tests that fail on a fixed wait under load. This one waits on a program the test does not control.
Activity
test(execution): run the host probe test on its own stubs only (Think…