From: Stefan Metzmacher Date: Thu, 21 Jun 2018 22:10:08 +0000 (+0200) Subject: pthreadpool: explicitly use max_thread=unlimited for pthreadpool_tevent_init() tests X-Git-Tag: ldb-1.5.0~335 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=53a9f3cac646c1034a15d2b54531b9be46dde923;p=thirdparty%2Fsamba.git pthreadpool: explicitly use max_thread=unlimited for pthreadpool_tevent_init() tests Currently 0 also means unlimited, but that will change soon, to force no thread and strict sync processing. Signed-off-by: Stefan Metzmacher Reviewed-by: Ralph Boehme --- diff --git a/lib/pthreadpool/tests.c b/lib/pthreadpool/tests.c index f0ae0aa4a93..d57754603a2 100644 --- a/lib/pthreadpool/tests.c +++ b/lib/pthreadpool/tests.c @@ -3,6 +3,7 @@ #include #include #include +#include #include #include #include @@ -407,7 +408,7 @@ static int test_tevent_1(void) strerror(ret)); return ret; } - ret = pthreadpool_tevent_init(ev, 0, &pool); + ret = pthreadpool_tevent_init(ev, UINT_MAX, &pool); if (ret != 0) { fprintf(stderr, "pthreadpool_tevent_init failed: %s\n", strerror(ret)); diff --git a/lib/pthreadpool/tests_cmocka.c b/lib/pthreadpool/tests_cmocka.c index 9753d212e1c..33952442e1d 100644 --- a/lib/pthreadpool/tests_cmocka.c +++ b/lib/pthreadpool/tests_cmocka.c @@ -22,6 +22,7 @@ #include #include #include +#include #include #include @@ -46,7 +47,7 @@ static int setup_pthreadpool_tevent(void **state) t->ev = tevent_context_init(t); assert_non_null(t->ev); - ret = pthreadpool_tevent_init(t->ev, 0, &t->pool); + ret = pthreadpool_tevent_init(t->ev, UINT_MAX, &t->pool); assert_return_code(ret, 0); *state = t;