From cad2189e8077d374fa68e47f6ea223b617dc11a3 Mon Sep 17 00:00:00 2001 From: jordan Date: Fri, 7 Mar 2025 08:08:37 -0500 Subject: [PATCH] tests quic: fix error handling. --- tests/quic.c | 5 +++-- tests/unit.c | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/quic.c b/tests/quic.c index b87ef63f3..58c435f5a 100644 --- a/tests/quic.c +++ b/tests/quic.c @@ -1775,9 +1775,10 @@ int QuicTest(void) #endif /* HAVE_SESSION_TICKET */ leave: - if (ret != TEST_SUCCESS) + if (ret != TEST_SUCCESS) { printf(" FAILED: some tests did not pass.\n"); + } printf(" End QUIC Tests\n"); #endif - return ret; + return ret == TEST_SUCCESS ? 0 : -1; } diff --git a/tests/unit.c b/tests/unit.c index 4f98418e4..432ce61fb 100644 --- a/tests/unit.c +++ b/tests/unit.c @@ -245,7 +245,7 @@ int unit_test(int argc, char** argv) #endif /* WOLFSSL_W64_WRAPPER */ #ifdef WOLFSSL_QUIC - if ((ret = QuicTest()) != TEST_SUCCESS) { + if ((ret = QuicTest()) != 0) { printf("quic test failed with %d\n", ret); goto exit; }