Gitweb:
https://git.exim.org/exim.git/commitdiff/22c3450e246798a06554257dc227eaf7f9b48741
Commit: 22c3450e246798a06554257dc227eaf7f9b48741
Parent: cc49c6977b5736353b07e174b0fbb01086097f80
Author: Jeremy Harris <jgh146exb@???>
AuthorDate: Sat Nov 30 16:00:26 2019 +0000
Committer: Jeremy Harris <jgh146exb@???>
CommitDate: Sat Nov 30 16:18:59 2019 +0000
Testsuite: split out ipv6 testcase needing a non-linklocal interface addr
---
test/confs/1023 | 1 +
test/log/1003 | 16 ++++++----------
test/log/1023 | 9 +++++++++
test/runtest | 7 ++++++-
test/scripts/1000-Basic-ipv6/1003 | 10 ----------
test/scripts/1020-Linklocal-ipv6/1023 | 20 ++++++++++++++++++++
test/scripts/1020-Linklocal-ipv6/REQUIRES | 2 ++
7 files changed, 44 insertions(+), 21 deletions(-)
diff --git a/test/confs/1023 b/test/confs/1023
new file mode 120000
index 0000000..2478c95
--- /dev/null
+++ b/test/confs/1023
@@ -0,0 +1 @@
+1003
\ No newline at end of file
diff --git a/test/log/1003 b/test/log/1003
index 2ecb766..4dc4d63 100644
--- a/test/log/1003
+++ b/test/log/1003
@@ -1,25 +1,21 @@
1999-03-02 09:44:33 10HmaY-0005vi-00 <= CALLER@??? U=CALLER P=local S=sss
1999-03-02 09:44:33 10HmaZ-0005vi-00 <= CALLER@??? U=CALLER P=local S=sss
1999-03-02 09:44:33 10HmbA-0005vi-00 <= CALLER@??? U=CALLER P=local S=sss
-1999-03-02 09:44:33 10HmbB-0005vi-00 <= CALLER@??? U=CALLER P=local S=sss
1999-03-02 09:44:33 10HmaX-0005vi-00 <= CALLER@??? U=CALLER P=local S=sss
1999-03-02 09:44:33 Start queue run: pid=pppp -qf
-1999-03-02 09:44:33 10HmaY-0005vi-00 => user4@??? R=client T=send_to_server1 H=127.0.0.1 [127.0.0.1] C="250 OK id=10HmbC-0005vi-00"
+1999-03-02 09:44:33 10HmaY-0005vi-00 => user4@??? R=client T=send_to_server1 H=127.0.0.1 [127.0.0.1] C="250 OK id=10HmbB-0005vi-00"
1999-03-02 09:44:33 10HmaY-0005vi-00 Completed
-1999-03-02 09:44:33 10HmaZ-0005vi-00 => user6@??? R=client T=send_to_server2 H=::1 [::1] C="250 OK id=10HmbD-0005vi-00"
+1999-03-02 09:44:33 10HmaZ-0005vi-00 => user6@??? R=client T=send_to_server3 H=::1 [::1] C="250 OK id=10HmbC-0005vi-00"
1999-03-02 09:44:33 10HmaZ-0005vi-00 Completed
-1999-03-02 09:44:33 10HmbA-0005vi-00 => user6@??? R=client T=send_to_server3 H=::1 [::1] C="250 OK id=10HmbE-0005vi-00"
+1999-03-02 09:44:33 10HmbA-0005vi-00 => user6@??? R=client T=send_to_server4 H=::1 [::1] C="250 OK id=10HmbD-0005vi-00"
1999-03-02 09:44:33 10HmbA-0005vi-00 Completed
-1999-03-02 09:44:33 10HmbB-0005vi-00 => user6@??? R=client T=send_to_server4 H=::1 [::1] C="250 OK id=10HmbF-0005vi-00"
-1999-03-02 09:44:33 10HmbB-0005vi-00 Completed
1999-03-02 09:44:33 10HmaX-0005vi-00 == user6@??? R=client T=send_to_server5 defer (-1): failed to expand "interface" option for send_to_server5 transport: condition name expected, but found ""
1999-03-02 09:44:33 End queue run: pid=pppp -qf
******** SERVER ********
1999-03-02 09:44:33 exim x.yz daemon started: pid=pppp, no queue runs, listening for SMTP on port PORT_D (IPv6 and IPv4)
-1999-03-02 09:44:33 10HmbC-0005vi-00 <= CALLER@??? H=the.local.host.name (myhost.test.ex) [ip4.ip4.ip4.ip4] P=esmtp S=sss id=E10HmaY-0005vi-00@???
-1999-03-02 09:44:33 10HmbD-0005vi-00 <= CALLER@??? H=the.local.host.name (myhost.test.ex) [ip6:ip6:ip6:ip6:ip6:ip6:ip6:ip6] P=esmtp S=sss id=E10HmaZ-0005vi-00@???
+1999-03-02 09:44:33 10HmbB-0005vi-00 <= CALLER@??? H=the.local.host.name (myhost.test.ex) [ip4.ip4.ip4.ip4] P=esmtp S=sss id=E10HmaY-0005vi-00@???
1999-03-02 09:44:33 no host name found for IP address ::1
-1999-03-02 09:44:33 10HmbE-0005vi-00 <= CALLER@??? H=(myhost.test.ex) [::1] P=esmtp S=sss id=E10HmbA-0005vi-00@???
+1999-03-02 09:44:33 10HmbC-0005vi-00 <= CALLER@??? H=(myhost.test.ex) [::1] P=esmtp S=sss id=E10HmaZ-0005vi-00@???
1999-03-02 09:44:33 no host name found for IP address ::1
-1999-03-02 09:44:33 10HmbF-0005vi-00 <= CALLER@??? H=(myhost.test.ex) [::1] P=esmtp S=sss id=E10HmbB-0005vi-00@???
+1999-03-02 09:44:33 10HmbD-0005vi-00 <= CALLER@??? H=(myhost.test.ex) [::1] P=esmtp S=sss id=E10HmbA-0005vi-00@???
diff --git a/test/log/1023 b/test/log/1023
new file mode 100644
index 0000000..d946d9c
--- /dev/null
+++ b/test/log/1023
@@ -0,0 +1,9 @@
+1999-03-02 09:44:33 10HmaX-0005vi-00 <= CALLER@??? U=CALLER P=local S=sss
+1999-03-02 09:44:33 Start queue run: pid=pppp -qf
+1999-03-02 09:44:33 10HmaX-0005vi-00 => user6@??? R=client T=send_to_server2 H=::1 [::1] C="250 OK id=10HmaY-0005vi-00"
+1999-03-02 09:44:33 10HmaX-0005vi-00 Completed
+1999-03-02 09:44:33 End queue run: pid=pppp -qf
+
+******** SERVER ********
+1999-03-02 09:44:33 exim x.yz daemon started: pid=pppp, no queue runs, listening for SMTP on port PORT_D (IPv6 and IPv4)
+1999-03-02 09:44:33 10HmaY-0005vi-00 <= CALLER@??? H=the.local.host.name (myhost.test.ex) [ip6:ip6:ip6:ip6:ip6:ip6:ip6:ip6] P=esmtp S=sss id=E10HmaX-0005vi-00@???
diff --git a/test/runtest b/test/runtest
index be35e15..541d62a 100755
--- a/test/runtest
+++ b/test/runtest
@@ -3458,7 +3458,8 @@ while (not ($parm_ipv4 and $parm_ipv6) and defined($_ = <IFCONFIG>))
$parm_ipv4 = $1;
}
- if (not $parm_ipv6 and /^\s*inet6(?:\saddr)?:?\s?([abcdef\d:]+)(?:%[^ \/]+)?(?:\/\d+)?/i)
+ if ( (not $parm_ipv6 or $parm_ipv6 =~ /%/)
+ and /^\s*inet6(?:\saddr)?:?\s?([abcdef\d:]+)(?:%[^ \/]+)?(?:\/\d+)?/i)
{
next if $1 eq '::' or $1 eq '::1' or $1 =~ /^ff00/i or $1 =~ /^fe80::1/i;
$parm_ipv6 = $1;
@@ -3827,6 +3828,10 @@ DIR: for (my $i = 0; $i < @test_dirs; $i++)
}
unlink("$parm_cwd/test-config");
}
+ elsif (/^ipv6-non-linklocal/)
+ {
+ if ($parm_ipv6 =~ /%/) { $wantthis = 0; last; }
+ }
else
{
tests_exit(-1, "Unknown line in \"scripts/$testdir/REQUIRES\": \"$_\"");
diff --git a/test/scripts/1000-Basic-ipv6/1003 b/test/scripts/1000-Basic-ipv6/1003
index 849d69a..e52a1f5 100644
--- a/test/scripts/1000-Basic-ipv6/1003
+++ b/test/scripts/1000-Basic-ipv6/1003
@@ -9,16 +9,6 @@ exim user4@???
1
interface: <; ::1 ; HOSTIPV4
****
-#
-# This tries to send to ::1 from HOSTIPV6 - which is ok until HOSTIPV6
-# is a link-local addr (with a scope-id specifying the link). Then,
-# it seems, ::1 is not on that link (for Linux, at least). The connect
-# times out and the testcase fails.
-exim user6@???
-
-2
-interface: <; HOSTIPV6 ; HOSTIPV4
-****
exim user6@???
3
diff --git a/test/scripts/1020-Linklocal-ipv6/1023 b/test/scripts/1020-Linklocal-ipv6/1023
new file mode 100644
index 0000000..2e5be66
--- /dev/null
+++ b/test/scripts/1020-Linklocal-ipv6/1023
@@ -0,0 +1,20 @@
+# interface selection (v4 vs v6) in outgoing SMTP, non-linklocal
+need_ipv4
+need_ipv6
+#
+exim -DSERVER=server -bd -oX PORT_D
+****
+#
+# This tries to send to ::1 from HOSTIPV6 - which is ok until HOSTIPV6
+# is a link-local addr (with a scope-id specifying the link). Then,
+# it seems, ::1 is not on that link (for Linux & FreeBSD, at least). The connect
+# times out and the testcase fails.
+exim user6@???
+
+2
+interface: <; HOSTIPV6 ; HOSTIPV4
+****
+exim -qf
+****
+killdaemon
+no_msglog_check
diff --git a/test/scripts/1020-Linklocal-ipv6/REQUIRES b/test/scripts/1020-Linklocal-ipv6/REQUIRES
new file mode 100644
index 0000000..f8edd3e
--- /dev/null
+++ b/test/scripts/1020-Linklocal-ipv6/REQUIRES
@@ -0,0 +1,2 @@
+support IPv6
+ipv6-non-linklocal