test-lib: turn on ASan abort_on_error by default
By default, ASan will exit with code 1 when it sees an error. This means we'll notice a problem when we expected git to succeed, but not in a test_must_fail block. Let's ask it to actually raise SIGABRT instead. That will give us a signal death that test_must_fail will notice. As a bonus, it may also leave a coredump, which can be handy for digging into a failure. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jeff King committed
Jul 10, 2017 at 09:24 UTC
bf1ce904b753b76ac3e20dde68777ce4625b60ed
1 file changed
+1
-1
t/test-lib.sh
+1
-1
@@ -41,7 +41,7 @@ GIT_BUILD_DIR="$TEST_DIRECTORY"/..
41
# the noise level. This needs to happen at the start of the script,
42
# before we even do our "did we build git yet" check (since we don't
43
# want that one to complain to stderr).
44
-: ${ASAN_OPTIONS=detect_leaks=0}
44
+: ${ASAN_OPTIONS=detect_leaks=0:abort_on_error=1}
45
export ASAN_OPTIONS
46
47
################################################################