From: Eugene Syromiatnikov Date: Mon, 27 Apr 2026 08:17:34 +0000 (+0200) Subject: test/recipes/90-test_memfail.t: disable mfail before doing count runs X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=371c722b415276d187cf54ec15cac5d9739bbd69;p=thirdparty%2Fopenssl.git test/recipes/90-test_memfail.t: disable mfail before doing count runs mfail allocator hooks installation affect memory allocation counts, so it should be disabled for both "count" and "run" test calls. Fixes: 3cff7c218179 "Add memory allocation failure testing framework" Signed-off-by: Eugene Syromiatnikov Reviewed-by: Matt Caswell Reviewed-by: Nikola Pajkovsky MergeDate: Thu Apr 30 06:59:06 2026 (Merged from https://github.com/openssl/openssl/pull/30991) --- diff --git a/test/recipes/90-test_memfail.t b/test/recipes/90-test_memfail.t index 8ca6b85c550..e4a8a0d47af 100644 --- a/test/recipes/90-test_memfail.t +++ b/test/recipes/90-test_memfail.t @@ -26,6 +26,9 @@ plan skip_all => "$test_name requires allocfail-tests to be enabled" # and parse that to figure out what our values are # my $resultdir = result_dir(); + +$ENV{OPENSSL_TEST_MFAIL_DISABLE} = "1"; + run(test(["handshake-memfail", "count", srctop_dir("test", "certs")], stderr => "$resultdir/hscountinfo.txt")); run(test(["x509-memfail", "count", srctop_file("test", "certs", "servercert.pem")], stderr => "$resultdir/x509countinfo.txt")); @@ -73,8 +76,6 @@ plan skip_all => "could not get malloc counts (one or more count runs failed or # plan tests => $total_malloccount; -$ENV{OPENSSL_TEST_MFAIL_DISABLE} = "1"; - sub run_memfail_test { my $skipcount = $_[0]; my @mallocseq = (1..$_[1]);