Fix the test_xxx macros, and generate coredump if the test fails