From: Volker Lendecke Date: Mon, 5 Jun 2017 05:29:11 +0000 (+0200) Subject: tevent: Add tevent_re_initialise to threaded test X-Git-Tag: samba-4.6.10~22 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1375ed8b1cf94f0d5e9d8d08d4c42b67a9914395;p=thirdparty%2Fsamba.git tevent: Add tevent_re_initialise to threaded test Signed-off-by: Volker Lendecke Reviewed-by: Jeremy Allison (cherry picked from commit ca715762418284a1a2acc81d40e9e429e407ce14) --- diff --git a/lib/tevent/testsuite.c b/lib/tevent/testsuite.c index 4783ab41153..ee29e5bf8c7 100644 --- a/lib/tevent/testsuite.c +++ b/lib/tevent/testsuite.c @@ -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");