]> granicus.if.org Git - sudo/commitdiff
Only inhibit ASAN leak detector for tests that result in a parse
authorTodd C. Miller <Todd.Miller@courtesan.com>
Tue, 14 Feb 2017 22:56:34 +0000 (15:56 -0700)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Tue, 14 Feb 2017 22:56:34 +0000 (15:56 -0700)
error.  The parser cannot currently clean up completely on error.

plugins/sudoers/Makefile.in

index 48e03f7a3a96154ea53acf9911dc94551b15fab3..517e8b4bdfa9d43504e197f8a0f8e8d9eb7d0c51 100644 (file)
@@ -390,7 +390,12 @@ check: $(TEST_PROGS) visudo testsudoers
                out="regress/sudoers/$${base}.out"; \
                toke="regress/sudoers/$${base}.toke"; \
                json="regress/sudoers/$${base}.json"; \
-               ASAN_OPTIONS=detect_leaks=0 \
+               if test -s $$json.ok; then \
+                   ASAN_OPTIONS=; \
+               else \
+                   ASAN_OPTIONS=detect_leaks=0; \
+               fi; \
+               ASAN_OPTIONS=$$ASAN_OPTIONS \
                    ./testsudoers -dt <$$t >$$out 2>$$toke || true; \
                if cmp $$out $(srcdir)/$$out.ok >/dev/null; then \
                    passed=`expr $$passed + 1`; \