From: Jakub Zelenka Date: Fri, 8 May 2026 14:42:01 +0000 (+0200) Subject: Add mfail test for new BIO dgram mem X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8ee58cad2f487088ba150ed012fe8a78725b3f24;p=thirdparty%2Fopenssl.git Add mfail test for new BIO dgram mem Reviewed-by: Matt Caswell Reviewed-by: Frederik Wedel-Heinen Reviewed-by: Nikola Pajkovsky Reviewed-by: Eugene Syromiatnikov MergeDate: Mon May 11 08:09:16 2026 (Merged from https://github.com/openssl/openssl/pull/31121) --- diff --git a/test/bio_dgram_test.c b/test/bio_dgram_test.c index 23b47b3adb0..fab840537ca 100644 --- a/test/bio_dgram_test.c +++ b/test/bio_dgram_test.c @@ -776,6 +776,22 @@ err: return testresult; } #endif /* !defined(OPENSSL_NO_CHACHA) */ + +static int test_bio_dgram_mfail(void) +{ + BIO *bio; + + MFAIL_start(); + bio = BIO_new(BIO_s_dgram_mem()); + MFAIL_end(); + + if (bio == NULL) + return 0; + + BIO_free(bio); + return 1; +} + #endif /* !defined(OPENSSL_NO_DGRAM) && !defined(OPENSSL_NO_SOCK) */ int setup_tests(void) @@ -790,6 +806,7 @@ int setup_tests(void) #if !defined(OPENSSL_NO_CHACHA) ADD_ALL_TESTS(test_bio_dgram_pair, 3); #endif + ADD_MFAIL_TEST(test_bio_dgram_mfail); #endif return 1;