]> git.ipfire.org Git - thirdparty/openssl.git/commit
Fix test failure in 30-test_evp_pkey_provided.t
authorBernd Edlinger <bernd.edlinger@hotmail.de>
Fri, 10 Jan 2025 18:58:46 +0000 (19:58 +0100)
committerTomas Mraz <tomas@openssl.org>
Wed, 15 Jan 2025 08:16:43 +0000 (09:16 +0100)
commitf5aa0fadea4c11b4fea988832ac706a96b58e0fa
treecddd3e836fd8786120457a3d4c1792bea4159232
parent66f481d98fcea6ad5385d1729b190398b4e2f5a5
Fix test failure in 30-test_evp_pkey_provided.t

In this test there is a random test output corruption.
`make test TESTS=test_evp_pkey_provided V=1` has some random output,
that can with a certain probability start a line with "ok" or so:

    # Setting up a OSSL_ENCODER context with passphrase
    # Testing with no encryption
jLixONcRPi/m64CGie4KKKDuGeTjtYwfima3BNYCGlgbLGeK3yYxBfZb9JjviOJ4
    # nHaNsRsONTAKyg==

This happens because large random data is output to bio_out
but some data remains buffered, and then test_note() is used to print
some comments on the bio_err file.  This causes output corruption that
confuses the TAP parser.
Fix that by flushing any pending output with test_flush_stdout() first.

Fixes #23992

Reviewed-by: Saša Nedvědický <sashan@openssl.org>
Reviewed-by: Paul Dale <ppzgs1@gmail.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/26383)

(cherry picked from commit c37f564bb8e25f825ff722642aaf735e8d74abb4)
test/testutil/tests.c