From: Todd C. Miller Date: Thu, 15 Sep 2016 14:33:01 +0000 (-0600) Subject: Disable Address Sanitizer leak detection for tests which generate X-Git-Tag: SUDO_1_8_18^2~13 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=50d0191de3dd4724b6be2d000acb56e3478c0097;p=sudo Disable Address Sanitizer leak detection for tests which generate parse errors. The parser leaks a bit on error. --- diff --git a/plugins/sudoers/Makefile.in b/plugins/sudoers/Makefile.in index 626965643..ba7f631af 100644 --- a/plugins/sudoers/Makefile.in +++ b/plugins/sudoers/Makefile.in @@ -386,7 +386,8 @@ check: $(TEST_PROGS) visudo testsudoers out="regress/sudoers/$${base}.out"; \ toke="regress/sudoers/$${base}.toke"; \ json="regress/sudoers/$${base}.json"; \ - ./testsudoers -dt <$$t >$$out 2>$$toke || true; \ + ASAN_OPTIONS=detect_leaks=0 \ + ./testsudoers -dt <$$t >$$out 2>$$toke || true; \ if cmp $$out $(srcdir)/$$out.ok >/dev/null; then \ passed=`expr $$passed + 1`; \ echo "$$dir/$$base (parse): OK"; \ diff --git a/plugins/sudoers/regress/testsudoers/test4.sh b/plugins/sudoers/regress/testsudoers/test4.sh index 03947f34c..3eaaa1dac 100755 --- a/plugins/sudoers/regress/testsudoers/test4.sh +++ b/plugins/sudoers/regress/testsudoers/test4.sh @@ -3,6 +3,9 @@ # Test sudoers owner check # +# Avoid warnings about memory leaks when there is a syntax error +ASAN_OPTIONS=detect_leaks=0; export ASAN_OPTIONS + exec 2>&1 ./testsudoers -U 1 root id <$TESTFILE <