$OpenBSD: patch-tests_suites_host_test_function,v 1.8 2021/07/15 03:26:29 bket Exp $

Can't take the address of stdout.

Index: tests/suites/host_test.function
--- tests/suites/host_test.function.orig
+++ tests/suites/host_test.function
@@ -402,9 +402,6 @@ int execute_tests( int argc , const char ** argv )
     /* Store for proccessed integer params. */
     int32_t int_params[50];
     void *pointer;
-#if defined(__unix__) || (defined(__APPLE__) && defined(__MACH__))
-    int stdout_fd = -1;
-#endif /* __unix__ || __APPLE__ __MACH__ */
 
 #if defined(MBEDTLS_MEMORY_BUFFER_ALLOC_C) && \
     !defined(TEST_SUITE_MEMORY_BUFFER_ALLOC)
@@ -553,21 +550,6 @@ int execute_tests( int argc , const char ** argv )
                 test_info.result = TEST_RESULT_SUCCESS;
                 test_info.paramfail_test_state = PARAMFAIL_TESTSTATE_IDLE;
 
-#if defined(__unix__) || (defined(__APPLE__) && defined(__MACH__))
-                /* Suppress all output from the library unless we're verbose
-                 * mode
-                 */
-                if( !option_verbose )
-                {
-                    stdout_fd = redirect_output( stdout, "/dev/null" );
-                    if( stdout_fd == -1 )
-                    {
-                        /* Redirection has failed with no stdout so exit */
-                        exit( 1 );
-                    }
-                }
-#endif /* __unix__ || __APPLE__ __MACH__ */
-
                 function_id = strtoul( params[0], NULL, 10 );
                 if ( (ret = check_test( function_id )) == DISPATCH_TEST_SUCCESS )
                 {
@@ -577,14 +559,6 @@ int execute_tests( int argc , const char ** argv )
                         ret = dispatch_test( function_id, (void **)( params + 1 ) );
                     }
                 }
-
-#if defined(__unix__) || (defined(__APPLE__) && defined(__MACH__))
-                if( !option_verbose && restore_output( stdout, stdout_fd ) )
-                {
-                        /* Redirection has failed with no stdout so exit */
-                        exit( 1 );
-                }
-#endif /* __unix__ || __APPLE__ __MACH__ */
 
             }
 
