On (10/08/16 08:09), Lukas Slebodnik wrote:
>ehlo,
>
>yesterdat, I build a sssd in copr for various distributions
>and the dyndns-tests failed for me few time.
>We had a similar failures also in CI
>http://sssd-ci.duckdns.org/logs/job/50/54/fedora_rawhide/ci-build-coverage/dyndns-tests.log
>
>Attached patch should fix it.
>
And now with a subject :-)

LS
>From 041010427e44762226e96a5d9cf4ce88af253134 Mon Sep 17 00:00:00 2001
From: Lukas Slebodnik <[email protected]>
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

_______________________________________________
sssd-devel mailing list
[email protected]
https://lists.fedorahosted.org/admin/lists/[email protected]

Reply via email to