Eliminate TSan warnings for print_proc variables assignment (gctest)
authorIvan Maidanski <ivmai@mail.ru>
Fri, 6 Oct 2017 08:14:23 +0000 (11:14 +0300)
committerIvan Maidanski <ivmai@mail.ru>
Fri, 6 Oct 2017 08:14:23 +0000 (11:14 +0300)
commitad8ff65ac2167f4943c0db7aac34e754eb4360b8
tree5e335b8b0bd82cef92204401393b48a38fc99c5d
parent49d7fe77033f0bdabd50a2912cd58effd85452c1
Eliminate TSan warnings for print_proc variables assignment (gctest)

Now GC_is_valid_displacement_print_proc and GC_is_visible_print_proc
are set only once (before the first invocation of run_one_test).

* tests/test.c [DBG_HDRS_ALL] (set_print_procs): New macro (defined
to (void)0).
* tests/test.c [!DBG_HDRS_ALL] (set_print_procs): New function (which
sets GC_is_valid_displacement_print_proc and GC_is_visible_print_proc).
* tests/test.c (fail_count, fail_proc1, TEST_FAIL_COUNT): Do not
define if DBG_HDRS_ALL.
* tests/test.c [!DBG_HDRS_ALL] (run_one_test): Do not set
GC_is_valid_displacement_print_proc and GC_is_visible_print_proc.
* tests/test.c (main): Call set_print_procs() before run_one_test().
* tests/test.c [PCR] (test): Likewise.
tests/test.c