From 1fb52d3f5b0add55c6ca714d57706ebdcd891662 Mon Sep 17 00:00:00 2001 From: evgeny Date: Fri, 23 Oct 2026 21:54:15 +0200 Subject: [PATCH] Report active resources when callback teardown is unbalanced --- tests/test_etcp_stcp.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/test_etcp_stcp.c b/tests/test_etcp_stcp.c index 35f810cc..6af520f1 100644 --- a/tests/test_etcp_stcp.c +++ b/tests/test_etcp_stcp.c @@ -339,6 +339,10 @@ static void callback_close_case(int reality, int side, unsigned action, unsigned etcp_conn_ref_free(test.retained); for (int i = 0; i < 2; i++) if (endpoints[i].inst) stop_endpoint(i); uasync_drain_immediate(ua); + if (ua->timer_alloc_count != ua->timer_free_count || ua->socket_alloc_count != ua->socket_free_count) { + debug_set_category_level(DEBUG_CATEGORY_SYS, DEBUG_LEVEL_INFO); + uasync_print_resources(ua, "callback close imbalance"); + } CHECK(ua->timer_alloc_count == ua->timer_free_count && ua->socket_alloc_count == ua->socket_free_count); uasync_destroy(ua, 0); CHECK(u_get_allocated_count() == allocated);