diff options
-rw-r--r-- | tests/status-request-ext.c | 13 | ||||
-rw-r--r-- | tests/status-request-ok.c | 14 | ||||
-rw-r--r-- | tests/status-request.c | 14 |
3 files changed, 3 insertions, 38 deletions
diff --git a/tests/status-request-ext.c b/tests/status-request-ext.c index e893c5c528..d5d7b9922f 100644 --- a/tests/status-request-ext.c +++ b/tests/status-request-ext.c @@ -49,8 +49,6 @@ int main() #include "cert-common.h" #include "utils.h" -static void terminate(void); - /* This program tests that the server does not send the * status request extension if no status response exists. That * is to provide compatibility with gnutls 3.3.x which requires @@ -200,7 +198,6 @@ static void client(int fd) if (ret < 0) { fail("client: Handshake failed: %s\n", gnutls_strerror(ret)); - terminate(); } else { if (debug) success("client: Handshake was completed\n"); @@ -225,15 +222,6 @@ static void client(int fd) } -/* These are global */ -pid_t child; - -static void terminate(void) -{ - kill(child, SIGTERM); - exit(1); -} - static void server(int fd) { int ret; @@ -311,6 +299,7 @@ static void ch_handler(int sig) void doit(void) { + pid_t child; int fd[2]; int ret, status = 0; diff --git a/tests/status-request-ok.c b/tests/status-request-ok.c index 5dda6faf4f..fe1818eeee 100644 --- a/tests/status-request-ok.c +++ b/tests/status-request-ok.c @@ -49,8 +49,6 @@ int main() #include "utils.h" -static void terminate(void); - /* This program tests the status request extension and that receiving the * certificate status works. */ @@ -181,7 +179,6 @@ static void client(int fd) if (ret < 0) { fail("client: Handshake failed: %s\n", gnutls_strerror(ret)); - terminate(); } else { if (debug) success("client: Handshake was completed\n"); @@ -194,7 +191,6 @@ static void client(int fd) if (received == 0) { fail("client: didn't receive status request\n"); - terminate(); } gnutls_bye(session, GNUTLS_SHUT_WR); @@ -211,15 +207,6 @@ static void client(int fd) } -/* These are global */ -pid_t child; - -static void terminate(void) -{ - kill(child, SIGTERM); - exit(1); -} - static void server(int fd) { int ret; @@ -300,6 +287,7 @@ static void ch_handler(int sig) void doit(void) { + pid_t child; int fd[2]; int ret, status = 0; diff --git a/tests/status-request.c b/tests/status-request.c index 2ab57727cd..0e62969ba9 100644 --- a/tests/status-request.c +++ b/tests/status-request.c @@ -51,8 +51,6 @@ int main() #include "cert-common.h" #include "utils.h" -static void terminate(void); - /* This program tests that the client does not send the * status request extension if GNUTLS_NO_EXTENSIONS is set. */ @@ -133,7 +131,6 @@ static void client(int fd, const char *prio) if (ret < 0) { fail("client: Handshake failed: %s\n", gnutls_strerror(ret)); - terminate(); } else { if (debug) success("client: Handshake was completed\n"); @@ -158,7 +155,6 @@ static void client(int fd, const char *prio) goto end; } else if (ret < 0) { fail("client: Error: %s\n", gnutls_strerror(ret)); - terminate(); } gnutls_bye(session, GNUTLS_SHUT_WR); @@ -175,15 +171,6 @@ static void client(int fd, const char *prio) } -/* These are global */ -pid_t child; - -static void terminate(void) -{ - kill(child, SIGTERM); - exit(1); -} - static void server(int fd, const char *prio) { int ret; @@ -261,6 +248,7 @@ static void ch_handler(int sig) static void start(const char *prio) { + pid_t child; int fd[2]; int ret, status = 0; |