mirror of
https://github.com/libevent/libevent.git
synced 2025-01-31 09:12:55 +08:00
Merge branch 'test/fixes' -- more small fixes
* test/fixes: test: mark http/timeout_read_server as retriable test: reset some static vars to avoid affecting other tests test: fix printing number of retries for FAILED message test: add debugging for bufferevent/bufferevent_connect_fail_eventcb* test: suppress logging for buffer/add_file_leak1
This commit is contained in:
commit
c6a74ee04f
@ -2968,7 +2968,7 @@ struct testcase_t evbuffer_testcases[] = {
|
||||
{ "file_segment_add_cleanup_cb", test_evbuffer_file_segment_add_cleanup_cb, 0, NULL, NULL },
|
||||
{ "pullup_with_empty", test_evbuffer_pullup_with_empty, 0, NULL, NULL },
|
||||
#ifndef EVENT__DISABLE_MM_REPLACEMENT
|
||||
{ "add_file_leak1", test_evbuffer_add_file_leak1, 0, NULL, NULL },
|
||||
{ "add_file_leak1", test_evbuffer_add_file_leak1, TT_NO_LOGS, NULL, NULL },
|
||||
#endif
|
||||
|
||||
#define ADDFILE_TEST(name, parameters) \
|
||||
|
@ -750,8 +750,8 @@ end:
|
||||
static void
|
||||
reader_eventcb_simple(struct bufferevent *bev, short what, void *ctx)
|
||||
{
|
||||
TT_BLATHER(("Read eventcb simple invoked on %d.",
|
||||
(int)bufferevent_getfd(bev)));
|
||||
TT_BLATHER(("Read eventcb simple invoked on %d (what=%hd).",
|
||||
(int)bufferevent_getfd(bev), what));
|
||||
n_events_invoked++;
|
||||
}
|
||||
|
||||
@ -866,6 +866,10 @@ test_bufferevent_connect_fail_eventcb(void *arg)
|
||||
|
||||
fake_listener = fake_listener_create(&localhost);
|
||||
|
||||
n_strings_read = 0;
|
||||
n_reads_invoked = 0;
|
||||
n_events_invoked = 0;
|
||||
|
||||
tt_int_op(n_events_invoked, ==, 0);
|
||||
|
||||
bev = bufferevent_socket_new(data->base, -1, flags);
|
||||
|
@ -6113,7 +6113,7 @@ struct testcase_t http_testcases[] = {
|
||||
HTTP_OPT(max_connections, SKIP_UNDER_WINDOWS),
|
||||
|
||||
HTTP(timeout_read_client),
|
||||
HTTP(timeout_read_server),
|
||||
HTTP_OPT(timeout_read_server, TT_RETRIABLE),
|
||||
|
||||
#ifdef EVENT__HAVE_OPENSSL
|
||||
HTTPS(basic),
|
||||
|
@ -550,7 +550,8 @@ tinytest_main(int c, const char **v, struct testgroup_t *groups)
|
||||
struct testgroup_t *group = &groups[i];
|
||||
for (j = 0; group->cases[j].name; ++j) {
|
||||
struct testcase_t *testcase = &group->cases[j];
|
||||
int attempts = (testcase->flags & TT_RETRIABLE) ? opt_retries : 0;
|
||||
int retriable = testcase->flags & TT_RETRIABLE;
|
||||
int attempts = retriable ? opt_retries : 0;
|
||||
int test_ret_err;
|
||||
|
||||
if (!(testcase->flags & TT_ENABLED_))
|
||||
@ -575,7 +576,8 @@ tinytest_main(int c, const char **v, struct testgroup_t *groups)
|
||||
case OK: ++n_ok; break;
|
||||
case SKIP: ++n_skipped; break;
|
||||
default:
|
||||
printf("\n [FAILED %s%s (%i retries)]\n", group->prefix, testcase->name, opt_retries);
|
||||
printf("\n [FAILED %s%s (%i retries)]\n",
|
||||
group->prefix, testcase->name, retriable ? opt_retries : 0);
|
||||
++n_bad;
|
||||
break;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user