$OpenBSD: patch-testsuite_driver_testlib_py,v 1.3 2011/04/11 14:30:33 kili Exp $
--- testsuite/driver/testlib.py.orig	Sun Dec 19 12:03:03 2010
+++ testsuite/driver/testlib.py	Sun Dec 19 12:46:34 2010
@@ -1285,6 +1285,13 @@ def compare_outputs( kind, normaliser, extra_normalise
     actual_raw = read_no_crs(actual_file)
     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)
+
     if extra_normaliser(expected_str) != extra_normaliser(actual_str):
         print 'Actual ' + kind + ' output differs from expected:'
 
@@ -1299,13 +1306,13 @@ def compare_outputs( kind, normaliser, extra_normalise
 
         # Ignore whitespace when diffing. We should only get to this
         # point if there are non-whitespace differences
-        r = os.system( 'diff -uw ' + expected_normalised_file + \
+        r = os.system( 'diff -auw ' + expected_normalised_file + \
                                ' ' + actual_normalised_file )
 
         # If for some reason there were no non-whitespace differences,
         # then do a full diff
         if r == 0:
-            r = os.system( 'diff -u ' + expected_normalised_file + \
+            r = os.system( 'diff -au ' + expected_normalised_file + \
                                   ' ' + actual_normalised_file )
 
         if config.accept:
