From 2cf88415c7e862d6eb7a7c185235243f07febdf2 Mon Sep 17 00:00:00 2001 From: Aly Raffauf Date: Thu, 19 Nov 2026 15:51:34 -0500 Subject: [PATCH] test(kernel): drop two e2e cases cheaper tests already fail for kernel_detach_test's EACCES case (a socket no connect can reach) took the same orphan-and-reap path as the stopped-kernel case that stays; the two differ only in recovery.reattach's attempt rule, which kernel_policy_test checks as a property (only a local kernel out of attempts is orphaned). kernel_wedge_test's spinning-in-Python case guarded a kernel that keeps answering pings while a cell holds the loop: kernel_link_test's LivenessProbeTest fails for that defect, and cell_background_test covers the kernel backgrounding its own long cell. kernel_wedge e2e: 4 tests -> 3, 13.3 s wall; kernel_detach: 15 -> 14, 36.0 s wall (exclusive lanes overlap, so wall time drops little). --- e2e/kernel_detach_test.py | 5 ----- e2e/kernel_wedge_test.py | 36 ------------------------------------ 2 files changed, 41 deletions(-) diff --git a/e2e/kernel_detach_test.py b/e2e/kernel_detach_test.py index bd4d87d4d..cd0808461 100644 --- a/e2e/kernel_detach_test.py +++ b/e2e/kernel_detach_test.py @@ -299,11 +299,6 @@ class KernelDetachTests(unittest.TestCase): self.assertEqual(after["status"], "ok", after) self.assertNotEqual(int(after["value"]), kernel) - @exclusive - def test_a_kernel_unreachable_for_every_try_is_replaced_and_reaped(self): - # connect(2) fails with EACCES on every try. - self.orphaned_and_reaped(lambda _, run_dir: (run_dir / "kernel.sock").chmod(0)) - @exclusive def test_a_stopped_kernel_is_replaced_and_reaped(self): # The socket accepts, but a stopped kernel never says hello. diff --git a/e2e/kernel_wedge_test.py b/e2e/kernel_wedge_test.py index 2e5624d9a..8a1e31d87 100644 --- a/e2e/kernel_wedge_test.py +++ b/e2e/kernel_wedge_test.py @@ -247,42 +247,6 @@ class KernelWedgeTests(Wedges): after, _ = self.cell(f"print((await cells.info({cell_id!r}))['status'])") self.assertEqual(after["output"].strip(), "interrupted") - def test_a_cell_that_spins_in_python_answers_probes_and_is_left_alone(self): - result, _ = self.cell( - "import os, time\n" - "started = time.monotonic()\n" - "while time.monotonic() - started < 2.5:\n" - " pass\n" - "os.getpid()", - timeout_ms=30_000, - ) - - # Backgrounded by the kernel itself at the threshold, at full CPU. - self.assertEqual(result["status"], "backgrounded", result) - self.assertIn("wake automatically", result["output"]) - harness.wait_until(self.wakes, 20, "the cell never finished") - self.assertIn("status=ok", self.wakes()[-1]) - kernel = int( - harness.cell_result( - next( - i["output"] - for r in reversed(self.provider.requests) - for i in r["request"]["input"] - if i.get("type") == "function_call_output" - ) - ).get("value", "0") - or 0 - ) - log = self.log() - self.assertNotIn("kernel_unresponsive", log) - self.assertNotIn("kernel_wedged", log) - self.app.idle(self.session) - after, _ = self.cell(PROBE) - _, pid = ast.literal_eval(after["value"]) - self.assertTrue(alive(pid), "the kernel did not survive its busy cell") - if kernel: - self.assertEqual(pid, kernel) - # exclusive: restarts the daemon @exclusive -- knotmirror 0.0.1