mirror of
https://github.com/cuberite/libevent.git
synced 2025-09-10 04:50:37 -04:00
test/regress_be: cover finalizers from inactive to active queue
Right now this will fail with the next assertion: $ regress --no-fork --verbose bufferevent/bufferevent_socket_filter_inactive bufferevent/bufferevent_socket_filter_inactive: [err] ../event.c:862: Assertion TAILQ_EMPTY(&base->activequeues[i]) failed in event_base_free_ Aborted
This commit is contained in:
parent
575ff67885
commit
337684b8e8
@ -1151,6 +1151,23 @@ end:
|
|||||||
bufferevent_free(bev);
|
bufferevent_free(bev);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
test_bufferevent_socket_filter_inactive(void *arg)
|
||||||
|
{
|
||||||
|
struct basic_test_data *data = arg;
|
||||||
|
struct bufferevent *bev = NULL, *bevf = NULL;
|
||||||
|
|
||||||
|
bev = bufferevent_socket_new(data->base, -1, 0);
|
||||||
|
bevf = bufferevent_filter_new(bev, NULL, NULL, 0, NULL, NULL);
|
||||||
|
|
||||||
|
end:
|
||||||
|
if (bevf)
|
||||||
|
bufferevent_free(bevf);
|
||||||
|
if (bev)
|
||||||
|
bufferevent_free(bev);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
struct testcase_t bufferevent_testcases[] = {
|
struct testcase_t bufferevent_testcases[] = {
|
||||||
|
|
||||||
LEGACY(bufferevent, TT_ISOLATED),
|
LEGACY(bufferevent, TT_ISOLATED),
|
||||||
@ -1209,6 +1226,10 @@ struct testcase_t bufferevent_testcases[] = {
|
|||||||
test_bufferevent_connect_fail_eventcb,
|
test_bufferevent_connect_fail_eventcb,
|
||||||
TT_FORK|TT_NEED_BASE, &basic_setup, NULL },
|
TT_FORK|TT_NEED_BASE, &basic_setup, NULL },
|
||||||
|
|
||||||
|
{ "bufferevent_socket_filter_inactive",
|
||||||
|
test_bufferevent_socket_filter_inactive,
|
||||||
|
TT_FORK|TT_NEED_BASE, &basic_setup, NULL },
|
||||||
|
|
||||||
END_OF_TESTCASES,
|
END_OF_TESTCASES,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user