Commit 371c722b41 for openssl.org

commit 371c722b415276d187cf54ec15cac5d9739bbd69
Author: Eugene Syromiatnikov <esyr@openssl.org>
Date:   Mon Apr 27 10:17:34 2026 +0200

    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 <esyr@openssl.org>

    Reviewed-by: Matt Caswell <matt@openssl.foundation>
    Reviewed-by: Nikola Pajkovsky <nikolap@openssl.org>
    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 8ca6b85c55..e4a8a0d47a 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]);