From 175a134b94dd3a3d77e6c3237408f102f2659288 Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Sun, 13 Oct 2024 10:15:59 -0700 Subject: UDP/sanitizer: Don't be strict about message loss in sanitizer or coverage runs. --- src/sp/transport/udp/udp_tran_test.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/sp/transport/udp/udp_tran_test.c b/src/sp/transport/udp/udp_tran_test.c index 304df097..3b46c618 100644 --- a/src/sp/transport/udp/udp_tran_test.c +++ b/src/sp/transport/udp/udp_tran_test.c @@ -291,10 +291,13 @@ test_udp_multi_small_burst(void) NUTS_TRUE(sz == 95); } NUTS_TRUE(actual <= expect); +#if !defined(NNG_SANITIZER) && !defined(NNG_COVERAGE) + // Under sanitizer runs we lose a lot, maybe even majority, of packets NUTS_TRUE( - actual / expect > 0.80); // maximum reasonable packet loss of 20% + actual / expect > 0.50); // maximum reasonable packet loss of 20% NUTS_MSG("Packet loss: %.02f (got %.f of %.f)", 1.0 - actual / expect, actual, expect); +#endif NUTS_CLOSE(s0); NUTS_CLOSE(s1); } -- cgit v1.2.3-70-g09d2