From 425c86179791cd32e2d4ce0ae7f269940b4b0663 Mon Sep 17 00:00:00 2001 From: Can Celik Date: Thu, 10 Sep 2026 21:51:57 +0300 Subject: chore: upgrade libghostty and preserve terminal behavior (#3906) --- tests/live_handoff.rs | 4 ++-- tests/support/mod.rs | 10 +++++++--- 2 files changed, 9 insertions(+), 5 deletions(-) (limited to 'tests') diff --git a/tests/live_handoff.rs b/tests/live_handoff.rs index 034e1e89..38e68a5a 100644 --- a/tests/live_handoff.rs +++ b/tests/live_handoff.rs @@ -985,7 +985,6 @@ fn live_handoff_preserves_pane_process_io() { &api_socket, serde_json::json!({"id":"test:handoff","method":"server.live_handoff","params":{}}), )); - drop(spawned); assert!( wait_for_message_variant( &mut client_stream, @@ -995,6 +994,7 @@ fn live_handoff_preserves_pane_process_io() { .unwrap(), "connected client shell should receive live-handoff shutdown" ); + drop(spawned); thread::sleep(Duration::from_millis(300)); wait_for_api(&api_socket, Duration::from_secs(10)); wait_for_socket(&client_socket, Duration::from_secs(5)); @@ -1359,7 +1359,7 @@ fn live_handoff_keeps_unmanaged_agent_name_bound_to_saved_session() { fs::write( &fake_pi, format!( - "#!/bin/sh\nexport HERDR_AGENT=pi\necho started > {}\nexec /bin/sleep 30\n", + "#!/bin/sh\nexport HERDR_AGENT=pi\necho started > {}\n/bin/sleep 30\n:\n", started_marker.display() ), ) diff --git a/tests/support/mod.rs b/tests/support/mod.rs index f4ccebe8..cc29afe9 100644 --- a/tests/support/mod.rs +++ b/tests/support/mod.rs @@ -444,9 +444,13 @@ pub fn wait_for_message_variants( timeout: Duration, variants: &[u32], ) -> Result { - stream - .set_read_timeout(Some(Duration::from_millis(200))) - .map_err(|e| e.to_string())?; + let read_timeout = Some(Duration::from_millis(200)); + // Darwin can reject resetting the timeout after peer closure with queued data. + if stream.read_timeout().map_err(|e| e.to_string())? != read_timeout { + stream + .set_read_timeout(read_timeout) + .map_err(|e| e.to_string())?; + } let deadline = Instant::now() + timeout; while Instant::now() < deadline { match read_server_message(stream) { -- cgit v1.2.3