From 041010427e44762226e96a5d9cf4ce88af253134 Mon Sep 17 00:00:00 2001 From: Lukas Slebodnik Date: Wed, 10 Aug 2016 07:44:28 +0200 Subject: [PATCH] dyndns-tests: Fix false positive failures The child process finished faster then it has handled by parent and therefore it timed out. It's the similar solution as in b3074dca3acebd91437ef13d3329d6d65d655215 [ RUN ] dyndns_test_error (Fri Jul 29 16:12:00:621444 2016) [sssd] [nsupdate_child_timeout] (0x0020): Timeout reached for dynamic DNS update Could not run the test - check test fixtures [ ERROR ] dyndns_test_error --- src/tests/cmocka/test_dyndns.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/tests/cmocka/test_dyndns.c b/src/tests/cmocka/test_dyndns.c index b8404ef1018c1ec9720e506807bcf3f3df379a2d..4f8706545cdb41df0d92e45e92d3279c63909695 100644 --- a/src/tests/cmocka/test_dyndns.c +++ b/src/tests/cmocka/test_dyndns.c @@ -75,6 +75,7 @@ void __wrap_execv(const char *path, char *const argv[]) case MOCK_NSUPDATE_ERR: DEBUG(SSSDBG_FUNC_DATA, "nsupdate error test case\n"); err = 1; + usleep(50000); /* 50 miliseconds */ break; case MOCK_NSUPDATE_TIMEOUT: DEBUG(SSSDBG_FUNC_DATA, "nsupdate timeout test case\n"); @@ -1059,7 +1060,7 @@ int main(int argc, const char *argv[]) } } poptFreeContext(pc); - + debug_level = 8; DEBUG_CLI_INIT(debug_level); /* Even though normally the tests should clean up after themselves -- 2.9.2