From eaaf9da961c9ae430e89b00458d6694dffb46765 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rub=C3=A9n=20Herrero?= Date: Fri, 16 Oct 2026 18:51:22 +0200 Subject: [PATCH] Fix and re-enable ssh2_send_signal() test The test was racy: the signal was sent right after ssh2_exec(), possibly before the remote bash had installed its trap, killing it with no output. It also read the stream in non-blocking mode, so stream_get_contents() could return before "success" arrived. Wait for the remote command to print "ready" after installing the trap, read in blocking mode, and bound the sleep so a lost signal fails the test instead of hanging it. Co-Authored-By: Claude Opus 5.5 --- tests/ssh2_send_signal.phpt | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/tests/ssh2_send_signal.phpt b/tests/ssh2_send_signal.phpt index da3f029..64b866e 100644 --- a/tests/ssh2_send_signal.phpt +++ b/tests/ssh2_send_signal.phpt @@ -1,26 +1,27 @@ --TEST-- ssh2_send_signal() - Tests sending signal to process --SKIPIF-- - + --FILE--