From 74ba91b16caf0fee6e90ef0269a20eae82e8f6b2 Mon Sep 17 00:00:00 2001
From: Jeremy Harris <jgh146exb@wizmail.org>
Date: Thu, 20 Oct 2016 21:49:50 +0100
Subject: [PATCH] Testsuite: munge for platform errno variance

---
 test/log/5700                 | 2 +-
 test/runtest                  | 3 +++
 test/scripts/5700-events/5700 | 1 +
 3 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/test/log/5700 b/test/log/5700
index 37eace605..6c21ac007 100644
--- a/test/log/5700
+++ b/test/log/5700
@@ -41,7 +41,7 @@
 1999-03-02 09:44:33 10HmaZ-0005vi-00 . [127.0.0.1] -> [127.0.0.1]:1224
 1999-03-02 09:44:33 10HmaZ-0005vi-00 H=127.0.0.1 [127.0.0.1]: SMTP timeout after EHLO the.local.host.name: Connection timed out
 1999-03-02 09:44:33 10HmaZ-0005vi-00 event msg:host:defer
-1999-03-02 09:44:33 10HmaZ-0005vi-00 . host deferral ip <127.0.0.1> port <1224> fqdn <127.0.0.1> local_part <userx> domain <domain1> errno <110> errstr <SMTP timeout after EHLO the.local.host.name: Connection timed out> router <others> transport <smtp>
+1999-03-02 09:44:33 10HmaZ-0005vi-00 . host deferral ip <127.0.0.1> port <1224> fqdn <127.0.0.1> local_part <userx> domain <domain1> errno <EEE> errstr <SMTP timeout after EHLO the.local.host.name: Connection timed out> router <others> transport <smtp>
 1999-03-02 09:44:33 10HmaZ-0005vi-00 == userx@domain1 R=others T=smtp defer (dd): Connection timed out H=127.0.0.1 [127.0.0.1]: SMTP timeout after EHLO the.local.host.name
 1999-03-02 09:44:33 10HmaZ-0005vi-00 ** userx@domain1: retry timeout exceeded
 1999-03-02 09:44:33 10HmaZ-0005vi-00 userx@domain1: error ignored
diff --git a/test/runtest b/test/runtest
index 62281656d..96b6715f3 100755
--- a/test/runtest
+++ b/test/runtest
@@ -1443,6 +1443,9 @@ $munges =
     { 'stdout' => 's/^\d\d:\d\d:\d\d\s+\d+ //;
                   s/Process \d+ is ready for new message/Process pppp is ready for new message/'
     },
+
+    'timeout_errno' =>		# actual errno differs Solaris vs. Linux
+    { 'mainlog' => 's/(host deferral .* errno) <\d+> /$1 <EEE> /' },
   };
 
 
diff --git a/test/scripts/5700-events/5700 b/test/scripts/5700-events/5700
index 8fb2010f2..1fe31cbfc 100644
--- a/test/scripts/5700-events/5700
+++ b/test/scripts/5700-events/5700
@@ -2,6 +2,7 @@
 # (EXPERIMENTAL_EVENT)
 #
 need_ipv4
+munge timeout_errno
 #
 exim -odq userx@domain1
 A deliverable message
-- 
2.30.2