From 09e0175c00b7ca009074c3db47bf0e949ad828d9 Mon Sep 17 00:00:00 2001 From: Ivan Maidanski Date: Thu, 14 Jun 2018 01:11:49 +0300 Subject: [PATCH] Fix multi-threaded gctest for the case of NTHREADS is set to zero (fix of commit 347c1f0d0) * tests/test.c [THREADS] (run_one_test): If !GC_thread_is_registered() then FAIL only if GC_is_init_called(). --- tests/test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test.c b/tests/test.c index b9a4cbd7..232aae28 100644 --- a/tests/test.c +++ b/tests/test.c @@ -1291,7 +1291,7 @@ void run_one_test(void) # endif GC_FREE(0); # ifdef THREADS - if (!GC_thread_is_registered()) { + if (!GC_thread_is_registered() && GC_is_init_called()) { GC_printf("Current thread is not registered with GC\n"); FAIL; } -- 2.50.1