2025-06-04 18:27:56 +00:00
|
|
|
From 886e0288a7f27d11fc0020b48c5d4be997293b04 Mon Sep 17 00:00:00 2001
|
|
|
|
From: Lucas Mulling <lucas.mulling@suse.com>
|
|
|
|
Date: Mon, 2 Jun 2025 11:48:58 -0300
|
|
|
|
Subject: [PATCH] tests: Fix an issue where torture_session request a SIGTERM
|
|
|
|
too early
|
|
|
|
|
|
|
|
Signed-off-by: Lucas Mulling <lucas.mulling@suse.com>
|
|
|
|
---
|
|
|
|
tests/client/torture_session.c | 14 ++++++++++++--
|
|
|
|
1 file changed, 12 insertions(+), 2 deletions(-)
|
|
|
|
|
|
|
|
diff --git a/tests/client/torture_session.c b/tests/client/torture_session.c
|
2025-06-27 21:00:44 +00:00
|
|
|
index cc83578f..6c10dee1 100644
|
2025-06-04 18:27:56 +00:00
|
|
|
--- a/tests/client/torture_session.c
|
|
|
|
+++ b/tests/client/torture_session.c
|
2025-06-27 21:00:44 +00:00
|
|
|
@@ -447,6 +447,16 @@ static void torture_channel_exit_signal(void **state)
|
2025-06-04 18:27:56 +00:00
|
|
|
/* Make the request, read parts with close */
|
|
|
|
rc = ssh_channel_request_exec(channel, request);
|
|
|
|
assert_ssh_return_code(session, rc);
|
|
|
|
+
|
|
|
|
+ /* FIX-SUSE bsc#1243799: Wait a bit before sending the SIGTERM. In real
|
|
|
|
+ * world use chases this should not happen has there will be network delays,
|
|
|
|
+ * since we are running the tests locally, it can happen that the server has
|
|
|
|
+ * yet to spawn the child (by this setting the correct group id). Meaning
|
|
|
|
+ * when we request TERM the correct gids are not setup and killpg will not
|
|
|
|
+ * work.
|
|
|
|
+ */
|
|
|
|
+ sleep(1);
|
|
|
|
+
|
|
|
|
rc = ssh_channel_request_send_signal(channel, "TERM");
|
|
|
|
assert_ssh_return_code(session, rc);
|
|
|
|
|
|
|
|
--
|
|
|
|
2.49.0
|
|
|
|
|