Commit 0fff009050 for openssl.org

commit 0fff0090507a205e6d37072d6ea151b68d0f74b6
Author: Bob Beck <beck@openssl.org>
Date:   Mon Aug 31 10:44:19 2026 -0600

    Don't let stderr block when filling up.

    Always discard stderr if we are not keeping it.

    Fixes: #32128
    Reviewed-by: Saša NedvÄ›dický <sashan@openssl.org>
    Reviewed-by: Norbert Pocs <norbertp@openssl.org>
    Merge-date: Thu Sep  3 06:39:06 2026
    Merged-from: https://github.com/openssl/openssl/pull/32615

diff --git a/util/perl/OpenSSL/Test.pm b/util/perl/OpenSSL/Test.pm
index 14d7389461..fab84f8d7a 100644
--- a/util/perl/OpenSSL/Test.pm
+++ b/util/perl/OpenSSL/Test.pm
@@ -1329,11 +1329,13 @@ sub __decorate_cmd {

     my $display_cmd = "$cmdstr$stdin$stdout$stderr";

-    # VMS program output escapes TAP::Parser
-    if ($^O eq 'VMS') {
-        $stderr=" 2> ".$null
-            unless $stderr || !$ENV{HARNESS_ACTIVE} || $ENV{HARNESS_VERBOSE};
-    }
+    # Under a non-verbose harness nothing drains the command's stderr, so a
+    # chatty command can fill the pipe buffer and then block forever waiting
+    # for a reader that never comes.  Send it to the null device unless the
+    # recipe asked for a specific redirection.  On VMS this also keeps
+    # program output from escaping TAP::Parser.
+    $stderr=" 2> ".$null
+        unless $stderr || !$ENV{HARNESS_ACTIVE} || $ENV{HARNESS_VERBOSE};

     $cmdstr .= "$stdin$stdout$stderr";