From ea7a952c8aab33d0bb0a2bbd210305d722a5702b Mon Sep 17 00:00:00 2001 From: Richard Levitte Date: Mon, 25 Nov 2019 17:13:10 +0100 Subject: 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 (Merged from https://github.com/openssl/openssl/pull/9294) --- test/recipes/90-test_memleak.t | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'test/recipes/90-test_memleak.t') 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"); -- cgit v1.2.3