diff --git a/test/regress.h b/test/regress.h index 643b82ba..43cb4eaf 100644 --- a/test/regress.h +++ b/test/regress.h @@ -95,6 +95,7 @@ extern int libevent_tests_running_in_debug_mode; #define TT_NO_LOGS (TT_FIRST_USER_FLAG<<5) #define TT_ENABLE_IOCP_FLAG (TT_FIRST_USER_FLAG<<6) #define TT_ENABLE_IOCP (TT_ENABLE_IOCP_FLAG|TT_NEED_THREADS) +#define TT_ENABLE_DEBUG_MODE (TT_ENABLE_IOCP_FLAG<<7) /* All the flags that a legacy test needs. */ #define TT_ISOLATED TT_FORK|TT_NEED_SOCKETPAIR|TT_NEED_BASE diff --git a/test/regress_main.c b/test/regress_main.c index c9372825..07f25678 100644 --- a/test/regress_main.c +++ b/test/regress_main.c @@ -197,6 +197,11 @@ basic_test_setup(const struct testcase_t *testcase) if (testcase->flags & TT_ENABLE_IOCP_FLAG) return (void*)TT_SKIP; #endif + + if (testcase->flags & TT_ENABLE_DEBUG_MODE) { + event_enable_debug_mode(); + libevent_tests_running_in_debug_mode = 1; + } if (testcase->flags & TT_NEED_THREADS) { if (!(testcase->flags & TT_FORK))