Add FOR_VALGRIND ifdef for testing