From 08d5845e0e634eac13d2c6bc2d94f344c9a5bfda Mon Sep 17 00:00:00 2001 From: Hasan Basbunar Date: Sat, 24 Oct 2026 02:41:04 +0200 Subject: [PATCH] tests: run.sh's bind test runs on the reference box's memory run.sh refuses a 64 GB box since 6f6ef5e, and test_run_engine_bind ran it with an environment of PATH and HOME only, so boxmem.py read the memory of the machine the suite ran on: on a 64 GB DGX Spark its three tests failed on that refusal (found in review, 2026-10-24). The test now writes the reference box's MemTotal and passes it as QWEN38_MEMINFO, as the walled install tests do. Measured by a mutant: the test's own meminfo at 64 GB fails all three tests on the refusal, and the unchanged copy beside it passes. Co-Authored-By: Claude Opus 5.5 --- tests/test_run_engine_bind.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/test_run_engine_bind.py b/tests/test_run_engine_bind.py index 8334ddba..c5fc8a72 100644 --- a/tests/test_run_engine_bind.py +++ b/tests/test_run_engine_bind.py @@ -6,7 +6,8 @@ run.sh runs the engine in the foreground with no proxy in front, and it passed was open to anyone on the network holding the key, while SECURITY.md said it is not on the network at all (found in review, 2026-09-24). This runs the real run.sh in a throwaway HOME, with docker, systemctl, ss and nvidia-smi replaced by stubs, and reads -the `docker run` it execs.""" +the `docker run` it execs. Its memory is the reference box's, by QWEN38_MEMINFO: run.sh refuses +a 64 GB box, and the test read the memory of the machine it ran on (found in review, 2026-10-24).""" import pathlib import re import shutil @@ -46,6 +47,8 @@ class TheEngineBind(unittest.TestCase): snap.mkdir(parents=True) (snap / "model.safetensors").write_text("w") (snap / "config.json").write_text('{"architectures": ["X"]}') + self.meminfo = self.home / "meminfo" + self.meminfo.write_text("MemTotal: 127535272 kB\n") self.bin = self.home / "bin" self.bin.mkdir() for name, body in STUBS.items(): @@ -54,7 +57,8 @@ class TheEngineBind(unittest.TestCase): def run_sh(self, **env): r = subprocess.run(["bash", str(REPO / "run.sh")], capture_output=True, text=True, timeout=60, - env={"PATH": f"{self.bin}:/usr/bin:/bin", "HOME": str(self.home), **env}) + env={"PATH": f"{self.bin}:/usr/bin:/bin", "HOME": str(self.home), + "QWEN38_MEMINFO": str(self.meminfo), **env}) argv = self.home / "docker-run.argv" return r, argv.read_text().split("\n") if argv.exists() else []