[exim-cvs] Testsuite: permit use of IPv6 loopback

Top Page
Delete this message
Reply to this message
Author: Exim Git Commits Mailing List
Date:  
To: exim-cvs
Subject: [exim-cvs] Testsuite: permit use of IPv6 loopback
Gitweb: http://git.exim.org/exim.git/commitdiff/ac9a0d9193d7d7ccd27aa8ebf31eb484182c3db4
Commit:     ac9a0d9193d7d7ccd27aa8ebf31eb484182c3db4
Parent:     cc00f4af38ebcc8255460398f573ba6e6ec842e3
Author:     Jeremy Harris <jgh146exb@???>
AuthorDate: Wed Feb 18 13:37:00 2015 +0000
Committer:  Jeremy Harris <jgh146exb@???>
CommitDate: Wed Feb 18 15:27:17 2015 +0000


    Testsuite: permit use of IPv6 loopback
---
 test/confs/5400                   |    2 +-
 test/dnszones-src/db.test.ex      |    2 ++
 test/log/5400                     |    8 ++++----
 test/runtest                      |    6 +++++-
 test/scripts/4000-scanning/4001   |    2 ++
 test/scripts/5400-cutthrough/5400 |    3 ++-
 test/stdout/4001                  |    8 ++++----
 test/stdout/5400                  |    2 +-
 8 files changed, 21 insertions(+), 12 deletions(-)


diff --git a/test/confs/5400 b/test/confs/5400
index 5948ce8..79465df 100644
--- a/test/confs/5400
+++ b/test/confs/5400
@@ -31,7 +31,7 @@ begin routers

dns:
driver = dnslookup
- domains = localhost.test.ex : thishost.test.ex
+ domains = localhost.test.ex : localhost4.test.ex : thishost.test.ex
self = send
transport = smtp

diff --git a/test/dnszones-src/db.test.ex b/test/dnszones-src/db.test.ex
index 4ec367c..fec2a0d 100644
--- a/test/dnszones-src/db.test.ex
+++ b/test/dnszones-src/db.test.ex
@@ -45,6 +45,8 @@ mx.π        A       V4NET.255.255.255
 ; A non-standard name for localhost


 thishost     A       127.0.0.1
+localhost4   A       127.0.0.1
+


; Something that gives both the IP and the loopback

diff --git a/test/log/5400 b/test/log/5400
index c6f3662..a72dfee 100644
--- a/test/log/5400
+++ b/test/log/5400
@@ -46,9 +46,9 @@
 1999-03-02 09:44:33 10HmbF-0005vi-00 => userx@??? R=all T=smtp H=127.0.0.1 [127.0.0.1] C="250 OK"
 1999-03-02 09:44:33 10HmbF-0005vi-00 => usery@??? R=all T=smtp H=ip4.ip4.ip4.ip4 [ip4.ip4.ip4.ip4] C="250 OK"
 1999-03-02 09:44:33 10HmbF-0005vi-00 Completed
-1999-03-02 09:44:33 rcpt for userx@???
+1999-03-02 09:44:33 rcpt for userx@???
 1999-03-02 09:44:33 rcpt for usery@???
-1999-03-02 09:44:33 10HmbG-0005vi-00 >> usery@??? R=dns T=smtp H=localhost.test.ex [127.0.0.1] C="250 OK"
-1999-03-02 09:44:33 10HmbG-0005vi-00 >> userx@??? R=dns T=smtp H=localhost.test.ex [127.0.0.1] C="250 OK"
-1999-03-02 09:44:33 10HmbG-0005vi-00 <= CALLER@??? U=CALLER P=local-esmtp S=sss for userx@??? usery@???
+1999-03-02 09:44:33 10HmbG-0005vi-00 >> usery@??? R=dns T=smtp H=localhost4.test.ex [127.0.0.1] C="250 OK"
+1999-03-02 09:44:33 10HmbG-0005vi-00 >> userx@??? R=dns T=smtp H=localhost4.test.ex [127.0.0.1] C="250 OK"
+1999-03-02 09:44:33 10HmbG-0005vi-00 <= CALLER@??? U=CALLER P=local-esmtp S=sss for userx@??? usery@???
 1999-03-02 09:44:33 10HmbG-0005vi-00 Completed
diff --git a/test/runtest b/test/runtest
index c6d9c72..2baf2ca 100755
--- a/test/runtest
+++ b/test/runtest
@@ -1325,6 +1325,9 @@ $munges =
     'optional_cert_hostnames' =>
     { 'stderr' => '/in tls_verify_cert_hostnames\? no/' },


+    'loopback' =>
+    { 'stdout' => 's/[[](127\.0\.0\.1|::1)]/[IP_LOOPBACK_ADDR]/' },
+
   };



@@ -1342,7 +1345,7 @@ $munges =
 #  [4] TRUE if this is a log file whose deliveries must be sorted
 #  [5] an optional custom munge command
 #
-# Arguments: Optionally, name of a custom munge to run.
+# Arguments: Optionally, name of a single custom munge to run.
 # Returns:   0 if the output compared equal
 #            1 if re-run needed (files may have been updated)


@@ -3405,6 +3408,7 @@ foreach $test (@test_list)
$stdout_skip = 0;
$rmfiltertest = 0;
$is_ipv6test = 0;
+ $TEST_STATE->{munge} = "";

# Remove the associative arrays used to hold checked mail files and msglogs

diff --git a/test/scripts/4000-scanning/4001 b/test/scripts/4000-scanning/4001
index 25a676e..1dcbd1f 100644
--- a/test/scripts/4000-scanning/4001
+++ b/test/scripts/4000-scanning/4001
@@ -1,5 +1,7 @@
# content scan interface: f-protd
#
+munge loopback
+#
server PORT_S
<GET
<
diff --git a/test/scripts/5400-cutthrough/5400 b/test/scripts/5400-cutthrough/5400
index 79072d7..2d851a6 100644
--- a/test/scripts/5400-cutthrough/5400
+++ b/test/scripts/5400-cutthrough/5400
@@ -1,5 +1,6 @@
# cutthrough_delivery basic operation
need_ipv4
+munge loopback
#
server PORT_S
220 ESMTP
@@ -401,7 +402,7 @@ QUIT
exim -bs
EHLO myhost.test.ex
MAIL FROM:<CALLER@???>
-RCPT TO:<userx@???>
+RCPT TO:<userx@???>
RCPT TO:<usery@???>
DATA

diff --git a/test/stdout/4001 b/test/stdout/4001
index 40cf7a9..6d66c7d 100644
--- a/test/stdout/4001
+++ b/test/stdout/4001
@@ -45,14 +45,14 @@

******** SERVER ********
Listening on port 1224 ...
-Connection request from [127.0.0.1]
+Connection request from [IP_LOOPBACK_ADDR]
<GET TESTSUITE/spool/scan/10HmaZ-0005vi-00/10HmaZ-0005vi-00.eml HTTP/1.0
<
><summary code="11">
>*eof

End of script
Listening on port 1224 ...
-Connection request from [127.0.0.1]
+Connection request from [IP_LOOPBACK_ADDR]
<GET TESTSUITE/spool/scan/10HmaX-0005vi-00/10HmaX-0005vi-00.eml HTTP/1.0
<
>

@@ -64,12 +64,12 @@ Connection request from [127.0.0.1]
>*eof

End of script
Listening on port 1224 ...
-Connection request from [127.0.0.1]
+Connection request from [IP_LOOPBACK_ADDR]
<GET TESTSUITE/spool/scan/10HmaY-0005vi-00/10HmaY-0005vi-00.eml HTTP/1.0
*sleep 3
End of script
Listening on port 1224 ...
-Connection request from [127.0.0.1]
+Connection request from [IP_LOOPBACK_ADDR]
<GET TESTSUITE/spool/scan/10HmbA-0005vi-00/10HmbA-0005vi-00.eml HTTP/1.0
*sleep 3
End of script
diff --git a/test/stdout/5400 b/test/stdout/5400
index 3452a9c..05f2ef0 100644
--- a/test/stdout/5400
+++ b/test/stdout/5400
@@ -489,7 +489,7 @@ EHLO myhost.test.ex
250 OK
MAIL FROM:<CALLER@???>
250 Sender OK
-RCPT TO:<userx@???>
+RCPT TO:<userx@???>
250 ok rcpt-1
RCPT TO:<usery@???>
250 ok rcpt-2