summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorHugo Landau <hlandau@openssl.org>2023-01-05 10:51:14 +0000
committerHugo Landau <hlandau@openssl.org>2023-01-27 14:19:15 +0000
commitc8e7f842b002f6c5081ff1519a9fe40d81cdeadd (patch)
treead36593cae620ef234444d9f4e8740bcc2fa01ed /test
parent522fb49dbcd283c00c77ebcc7a650c54ac6eba5b (diff)
downloadopenssl-new-c8e7f842b002f6c5081ff1519a9fe40d81cdeadd.tar.gz
QUIC TSERVER: Fix probable nondeterminism in some OS network stacks
Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/19897)
Diffstat (limited to 'test')
-rw-r--r--test/quic_tserver_test.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/test/quic_tserver_test.c b/test/quic_tserver_test.c
index c6c5c719e9..e743adbeab 100644
--- a/test/quic_tserver_test.c
+++ b/test/quic_tserver_test.c
@@ -214,11 +214,18 @@ static int test_tserver(void)
if (!TEST_false(ret))
goto err;
- if (!TEST_int_eq(SSL_get_error(c_ssl, ret), SSL_ERROR_ZERO_RETURN))
- goto err;
+ /*
+ * Allow the implementation to take as long as it wants to finally
+ * notice EOS. Account for varied timings in OS networking stacks.
+ */
+ if (SSL_get_error(c_ssl, ret) != SSL_ERROR_WANT_READ) {
+ if (!TEST_int_eq(SSL_get_error(c_ssl, ret),
+ SSL_ERROR_ZERO_RETURN))
+ goto err;
- /* DONE */
- break;
+ /* DONE */
+ break;
+ }
}
/*