summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/alerts.c1
-rw-r--r--tests/alpn-server-prec.c2
-rw-r--r--tests/client-fastopen.c1
-rw-r--r--tests/custom-urls-override.c1
-rw-r--r--tests/custom-urls.c1
-rw-r--r--tests/dtls-client-with-seccomp.c2
-rw-r--r--tests/dtls-etm.c1
-rw-r--r--tests/dtls-rehandshake-anon.c2
-rw-r--r--tests/dtls-rehandshake-cert-2.c2
-rw-r--r--tests/dtls-rehandshake-cert-3.c2
-rw-r--r--tests/dtls-rehandshake-cert.c2
-rw-r--r--tests/dtls-with-seccomp.c2
-rw-r--r--tests/fallback-scsv.c1
-rw-r--r--tests/key-material-dtls.c6
-rw-r--r--tests/key-material-set-dtls.c6
-rw-r--r--tests/keylog-func.c6
-rw-r--r--tests/mini-alpn.c2
-rw-r--r--tests/mini-dtls-discard.c2
-rw-r--r--tests/mini-dtls-fork.c2
-rw-r--r--tests/mini-dtls-heartbeat.c2
-rw-r--r--tests/mini-dtls-hello-verify.c2
-rw-r--r--tests/mini-dtls-lowmtu.c1
-rw-r--r--tests/mini-dtls-mtu.c2
-rw-r--r--tests/mini-dtls-record-asym.c2
-rw-r--r--tests/mini-dtls-record.c2
-rw-r--r--tests/mini-dtls-srtp.c2
-rw-r--r--tests/mini-dtls0-9.c2
-rw-r--r--tests/mini-key-material.c6
-rw-r--r--tests/mini-overhead.c1
-rw-r--r--tests/mini-record-2.c1
-rw-r--r--tests/mini-record-failure.c1
-rw-r--r--tests/mini-record-range.c1
-rw-r--r--tests/mini-record.c1
-rw-r--r--tests/mini-server-name.c1
-rw-r--r--tests/mini-termination.c1
-rw-r--r--tests/mini-tls-nonblock.c1
-rw-r--r--tests/prf.c6
-rw-r--r--tests/record-pad.c1
-rw-r--r--tests/record-retvals.c1
-rw-r--r--tests/recv-data-before-handshake.c1
-rw-r--r--tests/send-data-before-handshake.c1
-rw-r--r--tests/session-tickets-missing.c1
-rw-r--r--tests/session-tickets-ok.c1
-rw-r--r--tests/srp.c2
-rw-r--r--tests/tls-client-with-seccomp.c2
-rw-r--r--tests/tls-etm.c1
-rw-r--r--tests/tls-with-seccomp.c2
-rw-r--r--tests/tls12-rehandshake-cert-2.c1
-rw-r--r--tests/tls12-rehandshake-cert-3.c1
-rw-r--r--tests/tls13/key_limits.c1
-rw-r--r--tests/tls13/prf-early.c6
-rw-r--r--tests/tls13/prf.c6
-rw-r--r--tests/tlsext-decoding.c2
53 files changed, 74 insertions, 35 deletions
diff --git a/tests/alerts.c b/tests/alerts.c
index 4768f639b9..6bc2868add 100644
--- a/tests/alerts.c
+++ b/tests/alerts.c
@@ -149,6 +149,7 @@ pid_t child;
static void terminate(void)
{
+ assert(child);
kill(child, SIGTERM);
exit(1);
}
diff --git a/tests/alpn-server-prec.c b/tests/alpn-server-prec.c
index 0461c5d39a..115522c843 100644
--- a/tests/alpn-server-prec.c
+++ b/tests/alpn-server-prec.c
@@ -160,7 +160,7 @@ static void client(int fd, const char *protocol0, const char *protocol1, const c
static void terminate(void)
{
int status;
-
+ assert(child);
kill(child, SIGTERM);
wait(&status);
exit(1);
diff --git a/tests/client-fastopen.c b/tests/client-fastopen.c
index 5a1457a8e8..cf527ffeda 100644
--- a/tests/client-fastopen.c
+++ b/tests/client-fastopen.c
@@ -154,6 +154,7 @@ pid_t child;
static void terminate(void)
{
+ assert(child);
kill(child, SIGTERM);
exit(1);
}
diff --git a/tests/custom-urls-override.c b/tests/custom-urls-override.c
index 8ce3606cf9..1ed55b2fde 100644
--- a/tests/custom-urls-override.c
+++ b/tests/custom-urls-override.c
@@ -140,6 +140,7 @@ pid_t child;
static void terminate(void)
{
+ assert(child);
kill(child, SIGTERM);
exit(1);
}
diff --git a/tests/custom-urls.c b/tests/custom-urls.c
index a7295a174c..81bf8353f9 100644
--- a/tests/custom-urls.c
+++ b/tests/custom-urls.c
@@ -137,6 +137,7 @@ pid_t child;
static void terminate(void)
{
+ assert(child);
kill(child, SIGTERM);
exit(1);
}
diff --git a/tests/dtls-client-with-seccomp.c b/tests/dtls-client-with-seccomp.c
index 7fc77263b4..c39068c18b 100644
--- a/tests/dtls-client-with-seccomp.c
+++ b/tests/dtls-client-with-seccomp.c
@@ -169,7 +169,7 @@ pid_t child;
static void terminate(void)
{
int status;
-
+ assert(child);
kill(child, SIGTERM);
wait(&status);
exit(1);
diff --git a/tests/dtls-etm.c b/tests/dtls-etm.c
index 765bc1fb19..1a8c1b55aa 100644
--- a/tests/dtls-etm.c
+++ b/tests/dtls-etm.c
@@ -180,6 +180,7 @@ pid_t child;
static void terminate(void)
{
+ assert(child);
kill(child, SIGTERM);
exit(1);
}
diff --git a/tests/dtls-rehandshake-anon.c b/tests/dtls-rehandshake-anon.c
index 12f432387a..f281f5d3fa 100644
--- a/tests/dtls-rehandshake-anon.c
+++ b/tests/dtls-rehandshake-anon.c
@@ -200,7 +200,7 @@ pid_t child;
static void terminate(void)
{
int status;
-
+ assert(child);
kill(child, SIGTERM);
wait(&status);
exit(1);
diff --git a/tests/dtls-rehandshake-cert-2.c b/tests/dtls-rehandshake-cert-2.c
index 2400ab85ee..c9d50585a8 100644
--- a/tests/dtls-rehandshake-cert-2.c
+++ b/tests/dtls-rehandshake-cert-2.c
@@ -205,7 +205,7 @@ pid_t child;
static void terminate(void)
{
int status;
-
+ assert(child);
kill(child, SIGTERM);
wait(&status);
exit(1);
diff --git a/tests/dtls-rehandshake-cert-3.c b/tests/dtls-rehandshake-cert-3.c
index b537a2b670..855f63cee6 100644
--- a/tests/dtls-rehandshake-cert-3.c
+++ b/tests/dtls-rehandshake-cert-3.c
@@ -212,7 +212,7 @@ pid_t child;
static void terminate(void)
{
int status;
-
+ assert(child);
kill(child, SIGTERM);
wait(&status);
exit(1);
diff --git a/tests/dtls-rehandshake-cert.c b/tests/dtls-rehandshake-cert.c
index a9535a3ab6..3439ee9e93 100644
--- a/tests/dtls-rehandshake-cert.c
+++ b/tests/dtls-rehandshake-cert.c
@@ -201,7 +201,7 @@ pid_t child;
static void terminate(void)
{
int status;
-
+ assert(child);
kill(child, SIGTERM);
wait(&status);
exit(1);
diff --git a/tests/dtls-with-seccomp.c b/tests/dtls-with-seccomp.c
index fa46c3dfc9..357c3336c4 100644
--- a/tests/dtls-with-seccomp.c
+++ b/tests/dtls-with-seccomp.c
@@ -160,7 +160,7 @@ pid_t child;
static void terminate(void)
{
int status;
-
+ assert(child);
kill(child, SIGTERM);
wait(&status);
exit(1);
diff --git a/tests/fallback-scsv.c b/tests/fallback-scsv.c
index aeaa9d8056..d823e625a7 100644
--- a/tests/fallback-scsv.c
+++ b/tests/fallback-scsv.c
@@ -161,6 +161,7 @@ pid_t child;
static void terminate(void)
{
+ assert(child);
kill(child, SIGTERM);
exit(1);
}
diff --git a/tests/key-material-dtls.c b/tests/key-material-dtls.c
index 32a37c1b0a..e54500d7bf 100644
--- a/tests/key-material-dtls.c
+++ b/tests/key-material-dtls.c
@@ -83,8 +83,10 @@ static void terminate(void)
{
int status = 0;
- kill(child, SIGTERM);
- wait(&status);
+ if (child) {
+ kill(child, SIGTERM);
+ wait(&status);
+ }
exit(1);
}
diff --git a/tests/key-material-set-dtls.c b/tests/key-material-set-dtls.c
index bd119cd1ef..6e6d6d2df5 100644
--- a/tests/key-material-set-dtls.c
+++ b/tests/key-material-set-dtls.c
@@ -71,8 +71,10 @@ static void terminate(void)
{
int status = 0;
- kill(child, SIGTERM);
- wait(&status);
+ if (child) {
+ kill(child, SIGTERM);
+ wait(&status);
+ }
exit(1);
}
diff --git a/tests/keylog-func.c b/tests/keylog-func.c
index 4350698e6b..8145c55d1d 100644
--- a/tests/keylog-func.c
+++ b/tests/keylog-func.c
@@ -303,8 +303,10 @@ static void terminate(void)
{
int status = 0;
- kill(child, SIGTERM);
- wait(&status);
+ if (child) {
+ kill(child, SIGTERM);
+ wait(&status);
+ }
exit(1);
}
diff --git a/tests/mini-alpn.c b/tests/mini-alpn.c
index bed981451a..a8c9eb50af 100644
--- a/tests/mini-alpn.c
+++ b/tests/mini-alpn.c
@@ -162,7 +162,7 @@ static void client(int fd, const char *protocol0, const char *protocol2, const c
static void terminate(void)
{
int status;
-
+ assert(child);
kill(child, SIGTERM);
wait(&status);
exit(1);
diff --git a/tests/mini-dtls-discard.c b/tests/mini-dtls-discard.c
index 2ad841b1d8..7b0d23ed5a 100644
--- a/tests/mini-dtls-discard.c
+++ b/tests/mini-dtls-discard.c
@@ -169,7 +169,7 @@ pid_t child;
static void terminate(void)
{
int status;
-
+ assert(child);
kill(child, SIGTERM);
wait(&status);
exit(1);
diff --git a/tests/mini-dtls-fork.c b/tests/mini-dtls-fork.c
index b3164ef65c..f7b0ee7f60 100644
--- a/tests/mini-dtls-fork.c
+++ b/tests/mini-dtls-fork.c
@@ -56,7 +56,7 @@ pid_t child;
static void terminate(void)
{
int status;
-
+ assert(child);
kill(child, SIGTERM);
wait(&status);
exit(1);
diff --git a/tests/mini-dtls-heartbeat.c b/tests/mini-dtls-heartbeat.c
index c96ee62619..c5ca28b1a7 100644
--- a/tests/mini-dtls-heartbeat.c
+++ b/tests/mini-dtls-heartbeat.c
@@ -205,7 +205,7 @@ static gnutls_session_t initialize_tls_session(void)
static void terminate(void)
{
int status;
-
+ assert(child);
kill(child, SIGTERM);
wait(&status);
exit(1);
diff --git a/tests/mini-dtls-hello-verify.c b/tests/mini-dtls-hello-verify.c
index 1029c86877..8019313987 100644
--- a/tests/mini-dtls-hello-verify.c
+++ b/tests/mini-dtls-hello-verify.c
@@ -167,7 +167,7 @@ pid_t child;
static void terminate(void)
{
int status;
-
+ assert(child);
kill(child, SIGTERM);
wait(&status);
exit(1);
diff --git a/tests/mini-dtls-lowmtu.c b/tests/mini-dtls-lowmtu.c
index a04d6227ef..6f8da5c597 100644
--- a/tests/mini-dtls-lowmtu.c
+++ b/tests/mini-dtls-lowmtu.c
@@ -199,6 +199,7 @@ pid_t child;
static void terminate(void)
{
+ assert(child);
kill(child, SIGTERM);
exit(1);
}
diff --git a/tests/mini-dtls-mtu.c b/tests/mini-dtls-mtu.c
index fa79cd6447..d48c328a07 100644
--- a/tests/mini-dtls-mtu.c
+++ b/tests/mini-dtls-mtu.c
@@ -201,7 +201,7 @@ pid_t child;
static void terminate(void)
{
int status;
-
+ assert(child);
kill(child, SIGTERM);
wait(&status);
exit(1);
diff --git a/tests/mini-dtls-record-asym.c b/tests/mini-dtls-record-asym.c
index 234e51b109..59e7467b13 100644
--- a/tests/mini-dtls-record-asym.c
+++ b/tests/mini-dtls-record-asym.c
@@ -239,7 +239,7 @@ pid_t child;
static void terminate(void)
{
int status;
-
+ assert(child);
kill(child, SIGTERM);
wait(&status);
exit(1);
diff --git a/tests/mini-dtls-record.c b/tests/mini-dtls-record.c
index 451ccbfdb8..bcda720391 100644
--- a/tests/mini-dtls-record.c
+++ b/tests/mini-dtls-record.c
@@ -275,7 +275,7 @@ static void client(int fd)
static void terminate(void)
{
int status;
-
+ assert(child);
kill(child, SIGTERM);
wait(&status);
exit(1);
diff --git a/tests/mini-dtls-srtp.c b/tests/mini-dtls-srtp.c
index 78c03b3d1e..1d40d734c1 100644
--- a/tests/mini-dtls-srtp.c
+++ b/tests/mini-dtls-srtp.c
@@ -184,7 +184,7 @@ static void client(int fd, int profile)
static void terminate(void)
{
int status;
-
+ assert(child);
kill(child, SIGTERM);
wait(&status);
exit(1);
diff --git a/tests/mini-dtls0-9.c b/tests/mini-dtls0-9.c
index 496df46aab..1877f7c485 100644
--- a/tests/mini-dtls0-9.c
+++ b/tests/mini-dtls0-9.c
@@ -178,7 +178,7 @@ pid_t child;
static void terminate(void)
{
int status;
-
+ assert(child);
kill(child, SIGTERM);
wait(&status);
exit(1);
diff --git a/tests/mini-key-material.c b/tests/mini-key-material.c
index 15f74c4247..39493d92f4 100644
--- a/tests/mini-key-material.c
+++ b/tests/mini-key-material.c
@@ -82,8 +82,10 @@ static void terminate(void)
{
int status = 0;
- kill(child, SIGTERM);
- wait(&status);
+ if (child) {
+ kill(child, SIGTERM);
+ wait(&status);
+ }
exit(1);
}
diff --git a/tests/mini-overhead.c b/tests/mini-overhead.c
index 6cd230d2df..4496491884 100644
--- a/tests/mini-overhead.c
+++ b/tests/mini-overhead.c
@@ -214,6 +214,7 @@ static gnutls_session_t initialize_tls_session(const char *prio)
static void terminate(void)
{
+ assert(child);
kill(child, SIGTERM);
exit(1);
}
diff --git a/tests/mini-record-2.c b/tests/mini-record-2.c
index c5436cf984..6a73ad98d8 100644
--- a/tests/mini-record-2.c
+++ b/tests/mini-record-2.c
@@ -248,6 +248,7 @@ pid_t child;
static void terminate(void)
{
+ assert(child);
kill(child, SIGTERM);
exit(1);
}
diff --git a/tests/mini-record-failure.c b/tests/mini-record-failure.c
index a778f36c53..5eb2eff216 100644
--- a/tests/mini-record-failure.c
+++ b/tests/mini-record-failure.c
@@ -179,6 +179,7 @@ pid_t child;
static void terminate(void)
{
+ assert(child);
kill(child, SIGTERM);
exit(1);
}
diff --git a/tests/mini-record-range.c b/tests/mini-record-range.c
index f0f0b25723..4c4242a6ea 100644
--- a/tests/mini-record-range.c
+++ b/tests/mini-record-range.c
@@ -177,6 +177,7 @@ pid_t child;
static void terminate(void)
{
+ assert(child);
kill(child, SIGTERM);
exit(1);
}
diff --git a/tests/mini-record.c b/tests/mini-record.c
index 8a912a425c..4081cdeb7a 100644
--- a/tests/mini-record.c
+++ b/tests/mini-record.c
@@ -214,6 +214,7 @@ pid_t child;
static void terminate(void)
{
+ assert(child);
kill(child, SIGTERM);
exit(1);
}
diff --git a/tests/mini-server-name.c b/tests/mini-server-name.c
index 4f241c66ff..cc431adc11 100644
--- a/tests/mini-server-name.c
+++ b/tests/mini-server-name.c
@@ -148,6 +148,7 @@ pid_t child;
static void terminate(void)
{
+ assert(child);
kill(child, SIGTERM);
exit(1);
}
diff --git a/tests/mini-termination.c b/tests/mini-termination.c
index f0b232cefa..2bb2d4735e 100644
--- a/tests/mini-termination.c
+++ b/tests/mini-termination.c
@@ -200,6 +200,7 @@ pid_t child;
static void terminate(void)
{
+ assert(child);
kill(child, SIGTERM);
exit(1);
}
diff --git a/tests/mini-tls-nonblock.c b/tests/mini-tls-nonblock.c
index 4a58bcdeec..b2c6578b88 100644
--- a/tests/mini-tls-nonblock.c
+++ b/tests/mini-tls-nonblock.c
@@ -218,6 +218,7 @@ pid_t child;
static void terminate(void)
{
+ assert(child);
kill(child, SIGTERM);
exit(1);
}
diff --git a/tests/prf.c b/tests/prf.c
index aa4f36af6a..02a174d5ac 100644
--- a/tests/prf.c
+++ b/tests/prf.c
@@ -346,8 +346,10 @@ static void terminate(void)
{
int status = 0;
- kill(child, SIGTERM);
- wait(&status);
+ if (child) {
+ kill(child, SIGTERM);
+ wait(&status);
+ }
exit(1);
}
diff --git a/tests/record-pad.c b/tests/record-pad.c
index 1402a9ad93..f625163179 100644
--- a/tests/record-pad.c
+++ b/tests/record-pad.c
@@ -181,6 +181,7 @@ pid_t child;
static void terminate(void)
{
+ assert(child);
kill(child, SIGTERM);
exit(1);
}
diff --git a/tests/record-retvals.c b/tests/record-retvals.c
index 73f038c0c9..9d3d131e76 100644
--- a/tests/record-retvals.c
+++ b/tests/record-retvals.c
@@ -257,6 +257,7 @@ pid_t child;
static void terminate(void)
{
+ assert(child);
kill(child, SIGTERM);
exit(1);
}
diff --git a/tests/recv-data-before-handshake.c b/tests/recv-data-before-handshake.c
index 0aedfca47b..98a5645c8c 100644
--- a/tests/recv-data-before-handshake.c
+++ b/tests/recv-data-before-handshake.c
@@ -186,6 +186,7 @@ pid_t child;
static void terminate(void)
{
+ assert(child);
kill(child, SIGTERM);
exit(1);
}
diff --git a/tests/send-data-before-handshake.c b/tests/send-data-before-handshake.c
index d1e6f5b015..5c15dda0ca 100644
--- a/tests/send-data-before-handshake.c
+++ b/tests/send-data-before-handshake.c
@@ -182,6 +182,7 @@ pid_t child;
static void terminate(void)
{
+ assert(child);
kill(child, SIGTERM);
exit(1);
}
diff --git a/tests/session-tickets-missing.c b/tests/session-tickets-missing.c
index 8f5f126977..509e43f639 100644
--- a/tests/session-tickets-missing.c
+++ b/tests/session-tickets-missing.c
@@ -169,6 +169,7 @@ pid_t child;
static void terminate(void)
{
+ assert(child);
kill(child, SIGTERM);
exit(1);
}
diff --git a/tests/session-tickets-ok.c b/tests/session-tickets-ok.c
index d3c9a08516..ce06b222e3 100644
--- a/tests/session-tickets-ok.c
+++ b/tests/session-tickets-ok.c
@@ -140,6 +140,7 @@ pid_t child;
static void terminate(void)
{
+ assert(child);
kill(child, SIGTERM);
exit(1);
}
diff --git a/tests/srp.c b/tests/srp.c
index 64eb52aaf2..6fb0f02cd6 100644
--- a/tests/srp.c
+++ b/tests/srp.c
@@ -186,7 +186,7 @@ pid_t child;
static void terminate(void)
{
int status;
-
+ assert(child);
kill(child, SIGTERM);
wait(&status);
exit(1);
diff --git a/tests/tls-client-with-seccomp.c b/tests/tls-client-with-seccomp.c
index 53e8e97239..dc78737ef7 100644
--- a/tests/tls-client-with-seccomp.c
+++ b/tests/tls-client-with-seccomp.c
@@ -158,7 +158,7 @@ pid_t child;
static void terminate(void)
{
int status;
-
+ assert(child);
kill(child, SIGTERM);
wait(&status);
exit(1);
diff --git a/tests/tls-etm.c b/tests/tls-etm.c
index 7a5d707698..17da1e2a5b 100644
--- a/tests/tls-etm.c
+++ b/tests/tls-etm.c
@@ -180,6 +180,7 @@ pid_t child;
static void terminate(void)
{
+ assert(child);
kill(child, SIGTERM);
exit(1);
}
diff --git a/tests/tls-with-seccomp.c b/tests/tls-with-seccomp.c
index 9aff7a95a3..21340fd95c 100644
--- a/tests/tls-with-seccomp.c
+++ b/tests/tls-with-seccomp.c
@@ -150,7 +150,7 @@ pid_t child;
static void terminate(void)
{
int status;
-
+ assert(child);
kill(child, SIGTERM);
wait(&status);
exit(1);
diff --git a/tests/tls12-rehandshake-cert-2.c b/tests/tls12-rehandshake-cert-2.c
index c1e3013ff1..3a96f5b73a 100644
--- a/tests/tls12-rehandshake-cert-2.c
+++ b/tests/tls12-rehandshake-cert-2.c
@@ -202,6 +202,7 @@ pid_t child;
static void terminate(void)
{
+ assert(child);
kill(child, SIGTERM);
exit(1);
}
diff --git a/tests/tls12-rehandshake-cert-3.c b/tests/tls12-rehandshake-cert-3.c
index 1d3d61fc9a..4fcbc6c3ae 100644
--- a/tests/tls12-rehandshake-cert-3.c
+++ b/tests/tls12-rehandshake-cert-3.c
@@ -167,6 +167,7 @@ pid_t child;
static void terminate(void)
{
+ assert(child);
kill(child, SIGTERM);
exit(1);
}
diff --git a/tests/tls13/key_limits.c b/tests/tls13/key_limits.c
index d76bcde428..e2e533aebe 100644
--- a/tests/tls13/key_limits.c
+++ b/tests/tls13/key_limits.c
@@ -182,6 +182,7 @@ pid_t child;
static void terminate(void)
{
+ assert(child);
kill(child, SIGTERM);
exit(1);
}
diff --git a/tests/tls13/prf-early.c b/tests/tls13/prf-early.c
index cd4813671c..b97dc2424a 100644
--- a/tests/tls13/prf-early.c
+++ b/tests/tls13/prf-early.c
@@ -286,8 +286,10 @@ static void terminate(void)
{
int status = 0;
- kill(child, SIGTERM);
- wait(&status);
+ if (child) {
+ kill(child, SIGTERM);
+ wait(&status);
+ }
exit(1);
}
diff --git a/tests/tls13/prf.c b/tests/tls13/prf.c
index e03544a042..a83fda5ce6 100644
--- a/tests/tls13/prf.c
+++ b/tests/tls13/prf.c
@@ -257,8 +257,10 @@ static void terminate(void)
{
int status = 0;
- kill(child, SIGTERM);
- wait(&status);
+ if (child) {
+ kill(child, SIGTERM);
+ wait(&status);
+ }
exit(1);
}
diff --git a/tests/tlsext-decoding.c b/tests/tlsext-decoding.c
index b0734b4b11..2794d2c5e3 100644
--- a/tests/tlsext-decoding.c
+++ b/tests/tlsext-decoding.c
@@ -174,7 +174,7 @@ pid_t child;
static void terminate(void)
{
int status;
-
+ assert(child);
kill(child, SIGTERM);
wait(&status);
exit(1);