From 97bbf1b8668222e4f77f8822a44583a98a3478af Mon Sep 17 00:00:00 2001 From: Samuel Onoja Date: Tue, 20 Oct 2026 15:40:34 +0100 Subject: [PATCH] Isolate readiness tests that count process-wide descriptors Run descriptor-count assertions in private processes so concurrent display and process-monitor tests cannot change their baseline. Keep the existing leak, timing and socket-recovery assertions unchanged. --- compositor/src/xwayland/readiness.rs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/compositor/src/xwayland/readiness.rs b/compositor/src/xwayland/readiness.rs index 5b3d302..81a687e 100644 --- a/compositor/src/xwayland/readiness.rs +++ b/compositor/src/xwayland/readiness.rs @@ -540,6 +540,13 @@ mod tests { /// A truncated ancillary buffer must be rejected and its delivered descriptors closed. #[test] fn truncated_control_messages_still_close_the_descriptors_they_delivered() { + // Descriptor counts cover the whole process; isolate them from other + // tests opening display sockets and process-monitor descriptors. + if !crate::startup_tests::private_runtime( + "xwayland::readiness::tests::truncated_control_messages_still_close_the_descriptors_they_delivered", + ) { + return; + } let runtime = private_runtime_dir("ctrunc"); let socket = ReadinessSocket::create(&runtime, 24).unwrap(); let path = socket.path().to_owned(); @@ -573,6 +580,13 @@ mod tests { /// A flood of malformed datagrams must leak nothing and leave the socket usable. #[test] fn a_storm_of_malformed_datagrams_leaks_nothing_and_leaves_the_socket_usable() { + // Descriptor counts cover the whole process; isolate them from other + // tests opening display sockets and process-monitor descriptors. + if !crate::startup_tests::private_runtime( + "xwayland::readiness::tests::a_storm_of_malformed_datagrams_leaks_nothing_and_leaves_the_socket_usable", + ) { + return; + } let runtime = private_runtime_dir("storm"); let socket = ReadinessSocket::create(&runtime, 25).unwrap(); let path = socket.path().to_owned();