diff options
Diffstat (limited to 'tests/tls13')
-rw-r--r-- | tests/tls13/change_cipher_spec.c | 1 | ||||
-rw-r--r-- | tests/tls13/cookie.c | 2 | ||||
-rw-r--r-- | tests/tls13/hello_random_value.c | 2 | ||||
-rw-r--r-- | tests/tls13/key_share.c | 4 | ||||
-rw-r--r-- | tests/tls13/no-psk-exts.c | 3 | ||||
-rw-r--r-- | tests/tls13/post-handshake-with-cert-ticket.c | 2 | ||||
-rw-r--r-- | tests/tls13/post-handshake-with-cert.c | 2 | ||||
-rw-r--r-- | tests/tls13/post-handshake-with-psk.c | 2 | ||||
-rw-r--r-- | tests/tls13/post-handshake-without-cert.c | 3 | ||||
-rw-r--r-- | tests/tls13/prf.c | 2 | ||||
-rw-r--r-- | tests/tls13/psk-dumbfw.c | 15 | ||||
-rw-r--r-- | tests/tls13/rnd-check-rollback-val.c | 3 | ||||
-rw-r--r-- | tests/tls13/rnd-rollback-detection.c | 3 | ||||
-rw-r--r-- | tests/tls13/supported_versions.c | 3 | ||||
-rw-r--r-- | tests/tls13/tls12-no-tls13-exts.c | 3 |
15 files changed, 36 insertions, 14 deletions
diff --git a/tests/tls13/change_cipher_spec.c b/tests/tls13/change_cipher_spec.c index 23519d9fd4..1a9b80c817 100644 --- a/tests/tls13/change_cipher_spec.c +++ b/tests/tls13/change_cipher_spec.c @@ -309,6 +309,7 @@ void start(unsigned ccs_check) pid_t child; signal(SIGCHLD, ch_handler); + signal(SIGPIPE, SIG_IGN); ret = socketpair(AF_UNIX, SOCK_STREAM, 0, fd); if (ret < 0) { diff --git a/tests/tls13/cookie.c b/tests/tls13/cookie.c index 03d4f70ff4..562b9885f3 100644 --- a/tests/tls13/cookie.c +++ b/tests/tls13/cookie.c @@ -250,7 +250,7 @@ void doit(void) } if (child) { - int status; + int status = 0; /* parent */ close(sockets[1]); server(sockets[0]); diff --git a/tests/tls13/hello_random_value.c b/tests/tls13/hello_random_value.c index e14b4e786e..b0ef0b2309 100644 --- a/tests/tls13/hello_random_value.c +++ b/tests/tls13/hello_random_value.c @@ -248,7 +248,7 @@ void doit(void) } if (child) { - int status; + int status = 0; /* parent */ close(sockets[1]); client(sockets[0]); diff --git a/tests/tls13/key_share.c b/tests/tls13/key_share.c index 205f7d0056..c848fe5a15 100644 --- a/tests/tls13/key_share.c +++ b/tests/tls13/key_share.c @@ -258,7 +258,7 @@ static void server(int fd, gnutls_group_t exp_group, unsigned ngroups) static void ch_handler(int sig) { - int status; + int status = 0; wait(&status); check_wait_status(status); return; @@ -271,6 +271,8 @@ static void start(const char *name, const char *prio, unsigned flag, gnutls_grou pid_t child; signal(SIGCHLD, ch_handler); + signal(SIGPIPE, SIG_IGN); + testname = name; success("== test %s ==\n", testname); diff --git a/tests/tls13/no-psk-exts.c b/tests/tls13/no-psk-exts.c index e8f1e2e84f..c1c25fdf16 100644 --- a/tests/tls13/no-psk-exts.c +++ b/tests/tls13/no-psk-exts.c @@ -216,7 +216,7 @@ static void server(int fd) static void ch_handler(int sig) { - int status; + int status = 0; wait(&status); check_wait_status(status); return; @@ -229,6 +229,7 @@ void doit(void) pid_t child; signal(SIGCHLD, ch_handler); + signal(SIGPIPE, SIG_IGN); ret = socketpair(AF_UNIX, SOCK_STREAM, 0, fd); if (ret < 0) { diff --git a/tests/tls13/post-handshake-with-cert-ticket.c b/tests/tls13/post-handshake-with-cert-ticket.c index 87b3ea4ea3..8ece3f1b4c 100644 --- a/tests/tls13/post-handshake-with-cert-ticket.c +++ b/tests/tls13/post-handshake-with-cert-ticket.c @@ -318,7 +318,7 @@ static void server(int fd) static void ch_handler(int sig) { - int status; + int status = 0; wait(&status); check_wait_status(status); return; diff --git a/tests/tls13/post-handshake-with-cert.c b/tests/tls13/post-handshake-with-cert.c index 803a77b196..d24e06db70 100644 --- a/tests/tls13/post-handshake-with-cert.c +++ b/tests/tls13/post-handshake-with-cert.c @@ -327,7 +327,7 @@ static void server(int fd, int err, int type, unsigned max_auths) static void ch_handler(int sig) { - int status; + int status = 0; wait(&status); check_wait_status(status); return; diff --git a/tests/tls13/post-handshake-with-psk.c b/tests/tls13/post-handshake-with-psk.c index d104d0d460..a85b57ab75 100644 --- a/tests/tls13/post-handshake-with-psk.c +++ b/tests/tls13/post-handshake-with-psk.c @@ -311,7 +311,7 @@ static void server(int fd, int err, int type, unsigned max_auths) static void ch_handler(int sig) { - int status; + int status = 0; wait(&status); check_wait_status(status); return; diff --git a/tests/tls13/post-handshake-without-cert.c b/tests/tls13/post-handshake-without-cert.c index 827fbc8495..e6075ab0a0 100644 --- a/tests/tls13/post-handshake-without-cert.c +++ b/tests/tls13/post-handshake-without-cert.c @@ -219,7 +219,7 @@ static void server(int fd) static void ch_handler(int sig) { - int status; + int status = 0; wait(&status); check_wait_status(status); return; @@ -232,6 +232,7 @@ void doit(void) pid_t child; signal(SIGCHLD, ch_handler); + signal(SIGPIPE, SIG_IGN); ret = socketpair(AF_UNIX, SOCK_STREAM, 0, fd); if (ret < 0) { diff --git a/tests/tls13/prf.c b/tests/tls13/prf.c index 22e7f0e08f..da27332d42 100644 --- a/tests/tls13/prf.c +++ b/tests/tls13/prf.c @@ -339,7 +339,7 @@ void doit(void) } if (child) { - int status; + int status = 0; /* parent */ server(fd[0]); diff --git a/tests/tls13/psk-dumbfw.c b/tests/tls13/psk-dumbfw.c index c9c995801e..5d8ad8b152 100644 --- a/tests/tls13/psk-dumbfw.c +++ b/tests/tls13/psk-dumbfw.c @@ -48,6 +48,7 @@ int main(int argc, char **argv) #include <unistd.h> #include <gnutls/gnutls.h> #include <assert.h> +#include <signal.h> #include "tls13/ext-parse.h" @@ -279,6 +280,15 @@ static void server(int sd, const char *prio) success("server: finished\n"); } +static void ch_handler(int sig) +{ + int status = 0; + wait(&status); + check_wait_status(status); + return; +} + + static void run_test(const char *prio) { @@ -286,6 +296,9 @@ void run_test(const char *prio) int err; int sockets[2]; + signal(SIGCHLD, ch_handler); + signal(SIGPIPE, SIG_IGN); + success("trying with %s\n", prio); err = socketpair(AF_UNIX, SOCK_STREAM, 0, sockets); @@ -303,7 +316,7 @@ void run_test(const char *prio) } if (child) { - int status; + int status = 0; /* parent */ close(sockets[1]); server(sockets[0], prio); diff --git a/tests/tls13/rnd-check-rollback-val.c b/tests/tls13/rnd-check-rollback-val.c index 5971bdb2f6..f573596c5e 100644 --- a/tests/tls13/rnd-check-rollback-val.c +++ b/tests/tls13/rnd-check-rollback-val.c @@ -210,7 +210,7 @@ static void server(int fd) static void ch_handler(int sig) { - int status; + int status = 0; wait(&status); check_wait_status(status); return; @@ -223,6 +223,7 @@ void doit(void) pid_t child; signal(SIGCHLD, ch_handler); + signal(SIGPIPE, SIG_IGN); ret = socketpair(AF_UNIX, SOCK_STREAM, 0, fd); if (ret < 0) { diff --git a/tests/tls13/rnd-rollback-detection.c b/tests/tls13/rnd-rollback-detection.c index 7b136ea29a..0d1ef01498 100644 --- a/tests/tls13/rnd-rollback-detection.c +++ b/tests/tls13/rnd-rollback-detection.c @@ -194,7 +194,7 @@ static void server(int fd) static void ch_handler(int sig) { - int status; + int status = 0; wait(&status); check_wait_status(status); return; @@ -207,6 +207,7 @@ void doit(void) pid_t child; signal(SIGCHLD, ch_handler); + signal(SIGPIPE, SIG_IGN); ret = socketpair(AF_UNIX, SOCK_STREAM, 0, fd); if (ret < 0) { diff --git a/tests/tls13/supported_versions.c b/tests/tls13/supported_versions.c index bb9c7b6b92..50ea986ca1 100644 --- a/tests/tls13/supported_versions.c +++ b/tests/tls13/supported_versions.c @@ -314,7 +314,7 @@ static void server(int fd) static void ch_handler(int sig) { - int status; + int status = 0; wait(&status); check_wait_status(status); return; @@ -327,6 +327,7 @@ void doit(void) pid_t child; signal(SIGCHLD, ch_handler); + signal(SIGPIPE, SIG_IGN); ret = socketpair(AF_UNIX, SOCK_STREAM, 0, fd); if (ret < 0) { diff --git a/tests/tls13/tls12-no-tls13-exts.c b/tests/tls13/tls12-no-tls13-exts.c index b7411fbdc8..ead25b4ad2 100644 --- a/tests/tls13/tls12-no-tls13-exts.c +++ b/tests/tls13/tls12-no-tls13-exts.c @@ -199,7 +199,7 @@ static void server(int fd) static void ch_handler(int sig) { - int status; + int status = 0; wait(&status); check_wait_status(status); return; @@ -212,6 +212,7 @@ void doit(void) pid_t child; signal(SIGCHLD, ch_handler); + signal(SIGPIPE, SIG_IGN); ret = socketpair(AF_UNIX, SOCK_STREAM, 0, fd); if (ret < 0) { |