Specifically: test-memcheck is a test to test that valgrind *fails with an error* when run against a program that generates a known-bad memory access. So, for the test to pass, valgrind needs to return 1; which it does, but this normally indicates that a test has *failed*, so we need to invert the test success condition.
Which fail_on_success.sh does. Is it's name confusing?
Specifically: test-memcheck is a test to test that valgrind *fails with an error* when run against a program that generates a known-bad memory access. So, for the test to pass, valgrind needs to return 1; which it does, but this normally indicates that a test has *failed*, so we need to invert the test success condition.
Which fail_on_success.sh does. Is it's name confusing?