Skip to content

Commit f9ed75d

Browse files
committed
attempt to get reasons
1 parent 3c1f41e commit f9ed75d

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

test/mip_tap_test.c

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,15 +65,20 @@ static char *host_ip;
6565

6666
static int s_num_tests = 0;
6767

68-
#define ABORT() \
69-
usleep(500000); /* 500 ms, GH print reason */ \
68+
#ifdef NO_SLEEP_ABORT
69+
#define ABORT() abort()
70+
#else
71+
#define ABORT() \
72+
sleep(2); /* 2s, GH print reason */ \
7073
abort();
74+
#endif
7175

7276
#define ASSERT(expr) \
7377
do { \
7478
s_num_tests++; \
7579
if (!(expr)) { \
7680
printf("FAILURE %s:%d: %s\n", __FILE__, __LINE__, #expr); \
81+
fflush(stdout); \
7782
ABORT(); \
7883
} \
7984
} while (0)

test/mip_test.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ static int s_seg_sent = 0;
2121
s_num_tests++; \
2222
if (!(expr)) { \
2323
printf("FAILURE %s:%d: %s\n", __FILE__, __LINE__, #expr); \
24+
fflush(stdout); \
2425
ABORT(); \
2526
} \
2627
} while (0)

test/unit_test.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ static int s_num_tests = 0;
1818
s_num_tests++; \
1919
if (!(expr)) { \
2020
printf("FAILURE %s:%d: %s\n", __FILE__, __LINE__, #expr); \
21+
fflush(stdout); \
2122
ABORT(); \
2223
} \
2324
} while (0)

0 commit comments

Comments
 (0)