From d9310b2389c07c8d14918eb4fb7e7b06a0a9a263 Mon Sep 17 00:00:00 2001 From: jyviko <2501648+jyviko@users.noreply.github.com> Date: Mon, 2 Nov 2026 21:39:01 -0500 Subject: [PATCH] Crash test: a panic inside the kernel is the command's internal error The kernel crash test's command must fail with EngineError::Internal naming diagnostics.crash_test, as a panic in the command itself does: the panic detectors (hostile_params_never_panic, the fuzzer) look for Internal. Today it is EngineError::Other. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01DtL5M41G8Nua7HvuFPZkmJ --- crates/engine/src/crash_tests.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/crates/engine/src/crash_tests.rs b/crates/engine/src/crash_tests.rs index 7b077e955..684e14fb9 100644 --- a/crates/engine/src/crash_tests.rs +++ b/crates/engine/src/crash_tests.rs @@ -168,8 +168,10 @@ fn child() { } assert_eq!(s.doc.features.len(), 1, "the design is unchanged"); } + // A panic inside a solidcore call: caught there, an internal error of the command. "kernel" => { - assert!(s.execute("diagnostics.crash_test", &json!({"mode": "kernel"})).is_err()); + let r = s.execute("diagnostics.crash_test", &json!({"mode": "kernel"})); + assert!(matches!(&r, Err(crate::EngineError::Internal(id, _)) if id == "diagnostics.crash_test"), "{r:?}"); } // `thread_dies`: the panic ends the app, as one on the window's thread does. "thread" | "thread_dies" => {