From ced57be7238e21c6653c1908c9b6c7e52e441126 Mon Sep 17 00:00:00 2001 From: Ian Martin <4624371+iannitram@users.noreply.github.com> Date: Mon, 12 Oct 2026 10:34:41 -0600 Subject: [PATCH] vst3-host: the late-exit test expects Windows' exit order module_exit_shutdown asserts that the exit handler alone runs the module exit too late. That holds where exit handlers share one list. Windows runs the executable's handlers before a DLL's own, so the fixture's late state is still alive and the child exits cleanly; the test failed there. The Windows case now asserts the clean exit. Co-Authored-By: Claude Opus 5.5 --- crates/vst3-host/tests/module_exit_shutdown.rs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/crates/vst3-host/tests/module_exit_shutdown.rs b/crates/vst3-host/tests/module_exit_shutdown.rs index cc337c9..274823a 100644 --- a/crates/vst3-host/tests/module_exit_shutdown.rs +++ b/crates/vst3-host/tests/module_exit_shutdown.rs @@ -38,7 +38,13 @@ fn main() { assert!(up_front.status.success(), "shutdown before exit: {:?}\n{}", up_front.status, String::from_utf8_lossy(&up_front.stderr)); let too_late = run("exit-handler"); let err = String::from_utf8_lossy(&too_late.stderr); - assert_eq!(too_late.status.code(), Some(3), "the exit handler alone comes too late: {err}"); - assert!(err.contains("module exit after the process exit tore down state"), "{err}"); + if cfg!(windows) { + // Windows runs the executable's exit handlers before a DLL's own, so the fixture's late + // state is still there when the host's exit handler runs its module exit. + assert!(too_late.status.success(), "the exit handler alone: {:?}\n{err}", too_late.status); + } else { + assert_eq!(too_late.status.code(), Some(3), "the exit handler alone comes too late: {err}"); + assert!(err.contains("module exit after the process exit tore down state"), "{err}"); + } println!("module_exit_shutdown: ok"); }