]> granicus.if.org Git - gc/commitdiff
Fix multi-threaded gctest for the case of NTHREADS is set to zero
authorIvan Maidanski <ivmai@mail.ru>
Wed, 13 Jun 2018 22:11:49 +0000 (01:11 +0300)
committerIvan Maidanski <ivmai@mail.ru>
Sun, 8 Jul 2018 21:06:25 +0000 (00:06 +0300)
(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

index b9a4cbd77822ac45bc82bc3bf31f1412b37f5cf4..232aae2821d46dc97ece3580e2fc94cf97179941 100644 (file)
@@ -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;
       }