tevent: Add tevent_re_initialise to threaded test
authorVolker Lendecke <vl@samba.org>
Mon, 5 Jun 2017 05:29:11 +0000 (07:29 +0200)
committerJeremy Allison <jra@samba.org>
Thu, 8 Jun 2017 18:38:19 +0000 (20:38 +0200)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
lib/tevent/testsuite.c

index 4783ab41153687180b5683004dd10c80092c7c63..ee29e5bf8c763ac2dfa19db72303584669a177a5 100644 (file)
@@ -1207,6 +1207,14 @@ static bool test_multi_tevent_threaded_2(struct torture_context *test,
        ev = tevent_context_init(test);
        torture_assert(test, ev != NULL, "tevent_context_init failed");
 
+       /*
+        * tevent_re_initialise used to have a bug where it did not
+        * re-initialise the thread support after taking it
+        * down. Excercise that code path.
+        */
+       ret = tevent_re_initialise(ev);
+       torture_assert(test, ret == 0, "tevent_re_initialise failed");
+
        tctx = tevent_threaded_context_create(ev, ev);
        torture_assert(test, tctx != NULL,
                       "tevent_threaded_context_create failed");