From 1bd95da937dfbab4db194669a66fc837a7345784 Mon Sep 17 00:00:00 2001 From: "Craig E. Despeaux" Date: Tue, 4 Feb 2014 14:09:31 -0500 Subject: [PATCH] Fix test failures with CK_FORK=no --- src/test/check_getdns_cancel_callback.h | 33 +++++++++++++++++++++++++ src/test/check_getdns_context_destroy.h | 8 ++++++ 2 files changed, 41 insertions(+) diff --git a/src/test/check_getdns_cancel_callback.h b/src/test/check_getdns_cancel_callback.h index dd055a8f..52063eb0 100644 --- a/src/test/check_getdns_cancel_callback.h +++ b/src/test/check_getdns_cancel_callback.h @@ -33,6 +33,8 @@ struct event_base *event_base = NULL; getdns_transaction_t transaction_id = 0; + callback_called = 0; /* Initialize counter */ + CONTEXT_CREATE(TRUE); EVENT_BASE_CREATE; @@ -62,6 +64,8 @@ struct event_base *event_base = NULL; getdns_transaction_t transaction_id = 0; + callback_called = 0; /* Initialize counter */ + CONTEXT_CREATE(TRUE); EVENT_BASE_CREATE; @@ -108,6 +112,13 @@ int odd = 0; int even = 0; + /* + * Initialize counters + */ + callback_called = 0; + callback_completed = 0; + callback_canceled = 0; + CONTEXT_CREATE(TRUE); EVENT_BASE_CREATE; @@ -180,6 +191,14 @@ int odd = 0; int even = 0; + /* + * Initialize counters + */ + callback_called = 0; + callback_completed = 0; + callback_canceled = 0; + + CONTEXT_CREATE(TRUE); EVENT_BASE_CREATE; @@ -255,6 +274,13 @@ int odd = 0; int even = 0; + /* + * Initialize counters + */ + callback_called = 0; + callback_completed = 0; + callback_canceled = 0; + CONTEXT_CREATE(TRUE); EVENT_BASE_CREATE; @@ -334,6 +360,13 @@ int odd = 0; int even = 0; + /* + * Initialize counters + */ + callback_called = 0; + callback_completed = 0; + callback_canceled = 0; + CONTEXT_CREATE(TRUE); EVENT_BASE_CREATE; diff --git a/src/test/check_getdns_context_destroy.h b/src/test/check_getdns_context_destroy.h index 8c4e45f0..70271749 100644 --- a/src/test/check_getdns_context_destroy.h +++ b/src/test/check_getdns_context_destroy.h @@ -44,6 +44,8 @@ struct event_base *event_base = NULL; getdns_transaction_t transaction_id = 0; + callback_called = 0; /* Initialize counter */ + CONTEXT_CREATE(TRUE); EVENT_BASE_CREATE; @@ -69,6 +71,8 @@ struct event_base *event_base = NULL; getdns_transaction_t transaction_id = 0; + callback_called = 0; /* Initialize counter */ + CONTEXT_CREATE(TRUE); EVENT_BASE_CREATE; @@ -97,6 +101,8 @@ struct getdns_dict *address = NULL; getdns_transaction_t transaction_id = 0; + callback_called = 0; /* Initialize counter */ + CONTEXT_CREATE(TRUE); EVENT_BASE_CREATE; @@ -129,6 +135,8 @@ struct event_base *event_base = NULL; getdns_transaction_t transaction_id = 0; + callback_called = 0; /* Initialize counter */ + CONTEXT_CREATE(TRUE); EVENT_BASE_CREATE;