From f9ed75d6b3c14e20d75a98ed7d1f7a0549f0aab5 Mon Sep 17 00:00:00 2001 From: "Sergio R. Caprile" Date: Wed, 23 Jul 2025 10:53:00 -0300 Subject: [PATCH] attempt to get reasons --- test/mip_tap_test.c | 9 +++++++-- test/mip_test.c | 1 + test/unit_test.c | 1 + 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/test/mip_tap_test.c b/test/mip_tap_test.c index 1b62b322..c54682af 100644 --- a/test/mip_tap_test.c +++ b/test/mip_tap_test.c @@ -65,15 +65,20 @@ static char *host_ip; static int s_num_tests = 0; -#define ABORT() \ - usleep(500000); /* 500 ms, GH print reason */ \ +#ifdef NO_SLEEP_ABORT +#define ABORT() abort() +#else +#define ABORT() \ + sleep(2); /* 2s, GH print reason */ \ abort(); +#endif #define ASSERT(expr) \ do { \ s_num_tests++; \ if (!(expr)) { \ printf("FAILURE %s:%d: %s\n", __FILE__, __LINE__, #expr); \ + fflush(stdout); \ ABORT(); \ } \ } while (0) diff --git a/test/mip_test.c b/test/mip_test.c index 32ca2d77..5acae37b 100644 --- a/test/mip_test.c +++ b/test/mip_test.c @@ -21,6 +21,7 @@ static int s_seg_sent = 0; s_num_tests++; \ if (!(expr)) { \ printf("FAILURE %s:%d: %s\n", __FILE__, __LINE__, #expr); \ + fflush(stdout); \ ABORT(); \ } \ } while (0) diff --git a/test/unit_test.c b/test/unit_test.c index 296e735d..895d6bc5 100644 --- a/test/unit_test.c +++ b/test/unit_test.c @@ -18,6 +18,7 @@ static int s_num_tests = 0; s_num_tests++; \ if (!(expr)) { \ printf("FAILURE %s:%d: %s\n", __FILE__, __LINE__, #expr); \ + fflush(stdout); \ ABORT(); \ } \ } while (0)