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)
# 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"));
#
plan tests => $total_malloccount;
-$ENV{OPENSSL_TEST_MFAIL_DISABLE} = "1";
-
sub run_memfail_test {
my $skipcount = $_[0];
my @mallocseq = (1..$_[1]);