$OpenBSD: patch-testsuite_driver_testlib_py,v 1.12 2021/06/09 04:22:20 gnezdo Exp $
Index: testsuite/driver/testlib.py
--- testsuite/driver/testlib.py.orig
+++ testsuite/driver/testlib.py
@@ -1925,6 +1925,13 @@ def compare_outputs(way: WayName,
     actual_raw = read_no_crs(actual_path)
     actual_str = normaliser(actual_raw)
 
+    # Strip OpenBSDs linker warnings about strcpy(3) & friends.
+    if config.os == 'openbsd':
+        actual_str = re.sub('.*: In function .*:\n+(.*:[0-9]+:[0-9]+:\n)?:? *warning: .* is .* misused, please use .*\n',
+                            '', actual_str)
+        actual_str = re.sub('.*/libgmp\.so\.[0-9]*\.[0-9]*: warning: .* is .* misused, please use .*\n',
+                            '', actual_str)
+
     # See Note [Output comparison].
     if whitespace_normaliser(expected_str) == whitespace_normaliser(actual_str):
         return True
@@ -1941,7 +1948,7 @@ def compare_outputs(way: WayName,
 
         if config.verbose >= 1 and _expect_pass(way):
             # See Note [Output comparison].
-            r = runCmd('diff -uw "{0}" "{1}"'.format(null2unix_null(expected_normalised_path),
+            r = runCmd('diff -auw "{0}" "{1}"'.format(null2unix_null(expected_normalised_path),
                                                         actual_normalised_path),
                         stdout=diff_file,
                         print_output=True)
@@ -1949,7 +1956,7 @@ def compare_outputs(way: WayName,
             # If for some reason there were no non-whitespace differences,
             # then do a full diff
             if r == 0:
-                r = runCmd('diff -u "{0}" "{1}"'.format(null2unix_null(expected_normalised_path),
+                r = runCmd('diff -au "{0}" "{1}"'.format(null2unix_null(expected_normalised_path),
                                                            actual_normalised_path),
                            stdout=diff_file,
                            print_output=True)
