From 17d167c2b4b1b07952ccaa70966a5bb0578921f4 Mon Sep 17 00:00:00 2001 From: Alexander Bushnev Date: Thu, 16 Jan 2025 11:16:16 +0100 Subject: [PATCH] Add debug logging --- tests/z_api_matching_test.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tests/z_api_matching_test.c b/tests/z_api_matching_test.c index 02efb6a20..be42c0e38 100644 --- a/tests/z_api_matching_test.c +++ b/tests/z_api_matching_test.c @@ -107,7 +107,7 @@ void on_drop(void* context) { } void test_matching_sub(bool background) { - printf("test_matching_sub: background=%d\n", background); + fprintf(stderr, "test_matching_sub: background=%d\n", background); context_t context = {0}; _context_init(&context); @@ -161,23 +161,30 @@ void test_matching_sub(bool background) { z_publisher_drop(z_publisher_move(&pub)); + fprintf(stderr, "test_matching_sub 0\n"); z_sleep_s(10); _context_wait(&context, DROP, 10); + fprintf(stderr, "test_matching_sub 1\n"); if (!background) { z_matching_listener_drop(z_matching_listener_move(&matching_listener)); } + fprintf(stderr, "test_matching_sub 2\n"); z_sleep_s(10); + fprintf(stderr, "test_matching_sub \n"); assert_ok(zp_stop_read_task(z_loan_mut(s1))); assert_ok(zp_stop_read_task(z_loan_mut(s2))); assert_ok(zp_stop_lease_task(z_loan_mut(s1))); assert_ok(zp_stop_lease_task(z_loan_mut(s2))); + fprintf(stderr, "test_matching_sub 3\n"); z_session_drop(z_session_move(&s1)); z_session_drop(z_session_move(&s2)); + fprintf(stderr, "test_matching_sub 4\n"); _context_drop(&context); + fprintf(stderr, "test_matching_sub 5\n"); } static void _check_status(z_owned_publisher_t* pub, bool expected) {