Compose foreground sandbox process lifetimes

This commit is contained in:
ms2k 2026-07-15 19:09:24 +09:00
commit fd78804fc7

View file

@ -27,7 +27,10 @@ NEXTEST_COMMAND = (
"--all-features",
"--locked",
"--filterset",
"not binary(capability-drop-helper) and not binary(acquisition)",
(
"not binary(capability-drop-helper) and not binary(acquisition) "
"and not binary(runtime-composition)"
),
)
DOCTEST_COMMAND = (
"cargo",
@ -58,6 +61,16 @@ ACQUISITION_TEST_COMMAND = (
"acquisition",
"--locked",
)
RUNTIME_COMPOSITION_TEST_COMMAND = (
"cargo",
"test",
"--offline",
"-p",
"lazaret-host-coordinator",
"--test",
"runtime-composition",
"--locked",
)
REQUIRED_TOOL_VERSIONS = (
("rustc", ("--version",), (0,), re.compile(r"^rustc 1\.90\.0 ")),
("cargo", ("--version",), (0,), re.compile(r"^cargo 1\.90\.0 ")),
@ -117,6 +130,7 @@ PROCESS_LINT_ALLOWANCES = {
"append_to",
"send_signal",
"acquire",
"acquire_with_stdio",
"private_role_command",
"require_reapable_sigchld",
"cleanup_sigchld_probe",
@ -134,6 +148,7 @@ PROCESS_LINT_ALLOWANCES = {
"crates/lazaret-linux/tests/acquisition.rs": {
"run_acquisition",
"successful_acquisition",
"lifetime_pipe_acquisition",
"failed_stages_and_acknowledgments",
"production_wrapper_refuses_former_harness_path",
"malformed_barriers_refuse",
@ -181,6 +196,15 @@ def run(command: list[str], cwd: Path = ROOT) -> None:
subprocess.run(command, cwd=cwd, check=True)
def run_physical(command: list[str], cwd: Path = ROOT) -> None:
print(f"RUN {' '.join(command)}", flush=True)
result = subprocess.run(command, cwd=cwd, check=False)
if result.returncode == 77:
print(f"SKIP {' '.join(command)}: physical prerequisites unavailable")
return
require(result.returncode == 0, f"physical test exited {result.returncode}")
def check_tool_versions() -> None:
require(sys.version_info >= (3, 11), "Python 3.11 or newer is required")
for program, args, accepted_exit_codes, pattern in REQUIRED_TOOL_VERSIONS:
@ -505,6 +529,7 @@ def run_rust_tests() -> None:
run(list(NEXTEST_COMMAND))
run(list(ACQUISITION_TEST_COMMAND))
run(list(CAPABILITY_TEST_COMMAND))
run_physical(list(RUNTIME_COMPOSITION_TEST_COMMAND))
run(list(DOCTEST_COMMAND))