pmem / pmemstream

Other
9 stars 13 forks source link

[tests] Use Valgrind macro to indicate that checker is used #266

Closed KFilipek closed 2 years ago

KFilipek commented 2 years ago

This commit involves RUNNING_ON_VALGRIND macro to detect that tests are executed under Valgrind.


This change is Reviewable

KFilipek commented 2 years ago

Reviewable status: 0 of 1 files reviewed, 1 unresolved discussion (waiting on @KFilipek)

_tests/common/valgrind_internal.c line 26 at r1 (raw file):_

        On_drd = 1;

    On_valgrind = On_pmemcheck || On_memcheck || On_helgrind || On_drd || RUNNING_ON_VALGRIND;

Are you sure we need this change? whenever we run a valgrind tool we set up a proper variable (see above PMEMSTREAM_...). Perhaps, pls double check if these variables are set

// https://github.com/pmem/pmemstream/blob/master/tests/cmake/exec_functions.cmake#L114

This change is rather to help debug - just run under Valgrind, as you mentioned, on CI these environment variables are set properly.