summaryrefslogtreecommitdiffstats
path: root/test/recipes/90-test_memleak.t
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2019-11-25 17:13:10 +0100
committerRichard Levitte <levitte@openssl.org>2019-12-10 14:16:12 +0100
commitea7a952c8aab33d0bb0a2bbd210305d722a5702b (patch)
tree03bd1751a361cdaf82794c0039c149863121fce7 /test/recipes/90-test_memleak.t
parent22c22369bc09988eb8c6fdf4f543581a78fd3eb1 (diff)
test/memleaktest.c: Modify for use with address/leak sanitizer
Detects if leak sanitizing is on, and directs the exit code accordingly. Note that this program is designed to fail when leaking, as that's expected, so to make it easy for wrapper scripts, we also make it look like it fails when sanitizing isn't on. Reviewed-by: Paul Dale <paul.dale@oracle.com> (Merged from https://github.com/openssl/openssl/pull/9294)
Diffstat (limited to 'test/recipes/90-test_memleak.t')
-rw-r--r--test/recipes/90-test_memleak.t6
1 files changed, 5 insertions, 1 deletions
diff --git a/test/recipes/90-test_memleak.t b/test/recipes/90-test_memleak.t
index 312087cc80..76f1dcb06d 100644
--- a/test/recipes/90-test_memleak.t
+++ b/test/recipes/90-test_memleak.t
@@ -10,6 +10,10 @@
use OpenSSL::Test;
setup("test_memleak");
+
+plan skip_all => "MacOS currently doesn't support leak sanitizer"
+ if $^O eq 'darwin';
+
plan tests => 2;
-ok(run(test(["memleaktest"])), "running leak test");
+ok(!run(test(["memleaktest"])), "running leak test");
ok(run(test(["memleaktest", "freeit"])), "running no leak test");