]> git.ipfire.org Git - thirdparty/git.git/commitdiff
test-lib: turn on ASan abort_on_error by default
authorJeff King <peff@peff.net>
Mon, 10 Jul 2017 13:24:39 +0000 (09:24 -0400)
committerJunio C Hamano <gitster@pobox.com>
Mon, 10 Jul 2017 17:02:28 +0000 (10:02 -0700)
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>
t/test-lib.sh

index c42791eb9124e117c5cd25f347c81d88e19dd192..fc3bc1989c8f0687af40b84690cac0ac498f5c3f 100644 (file)
@@ -41,7 +41,7 @@ GIT_BUILD_DIR="$TEST_DIRECTORY"/..
 # the noise level. This needs to happen at the start of the script,
 # before we even do our "did we build git yet" check (since we don't
 # want that one to complain to stderr).
-: ${ASAN_OPTIONS=detect_leaks=0}
+: ${ASAN_OPTIONS=detect_leaks=0:abort_on_error=1}
 export ASAN_OPTIONS
 
 ################################################################