You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Plan 00055: L2 LXC can test a real existing container (CW_LXC_TEST_CONTAINER)
Per review (localdev, real bl-* containers are fine to test with): add a real
LXC runtime path. Set CW_LXC_TEST_CONTAINER=<name> and the LXC block uses that
EXISTING system container instead of a flaky minimal-busybox throwaway — a full
system container has proper coreutils/procps for the spinner and its own PID
namespace for NSpid.
Safety guarantees for a nominated container:
- NEVER created or destroyed — only started if stopped, then restored to its
prior run-state (lxc_restore stops it only if we started it; never lxc-destroy).
- spinner stopped best-effort on teardown; cleanup runs on every early-return path.
- the EXIT trap still only force-removes cw-test-* names, never bl-*.
Robustness for a real multi-process container:
- representative finding prefers one whose container_pid is a ground-truth
spinner PID (a busy app process under the same container_name no longer fools
the spinner-cmd assertion); adds the container_pid-in-ground-truth assertion.
- safety survive-assert checks one of OUR spinner PIDs survived, not just any
'while' process.
Without the env var, the block still attempts a throwaway and SKIPs cleanly if it
can't generate load. shellcheck clean (all levels); qa-all green (345 files).
Refs: CLAUDE/Plan/00055-container-process-watchdog
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
pass "$engine: started throwaway container '$burner'"
370
416
fi
371
-
pass "$engine: started container '$burner'"
372
417
373
418
# Launch a bounded CPU spinner. Background the WHOLE lxc-attach on the HOST side
374
419
# so the spinner runs in the FOREGROUND inside the container (held alive by
@@ -399,7 +444,12 @@ run_lxc_block() {
399
444
# - the podman + docker L2 blocks above prove the engine-agnostic runtime
400
445
# (scan, attribution, NSpid, the safety survive-assert, allowlist, DBus).
401
446
# We deliberately do NOT burn CPU inside real project containers to force it.
402
-
skip "$engine: no throwaway LXC burner here — LXC cgroup attribution is covered by L1 unit fixtures + the engine-agnostic runtime by the podman/docker L2 blocks (not faking a pass)"
447
+
# Could not generate in-container CPU load → SKIP (not a watchdog defect):
448
+
# the LXC-specific logic is covered by L1 unit fixtures and the
449
+
# engine-agnostic runtime by the podman/docker L2 blocks. Use a full system
450
+
# container (CW_LXC_TEST_CONTAINER=<name>) if a minimal throwaway lacks the
451
+
# tooling to spin.
452
+
skip "$engine: could not generate in-container CPU load (no spinner PIDs) — LXC cgroup attribution covered by L1 unit fixtures + engine-agnostic runtime by the podman/docker L2 blocks; set CW_LXC_TEST_CONTAINER=<name> for a real system container"
0 commit comments