From: Jeremy Harris Date: Sat, 13 Aug 2022 19:42:07 +0000 (+0100) Subject: Testsuite: use more reliable IP for TFO testcases X-Git-Tag: exim-4.97-RC0~254 X-Git-Url: https://git.exim.org/exim.git/commitdiff_plain/9af85efb7be828ea239d51731571b25094211cf6 Testsuite: use more reliable IP for TFO testcases --- diff --git a/test/confs/1090 b/test/confs/1090 index 4a7b25f3c..410fd663c 100644 --- a/test/confs/1090 +++ b/test/confs/1090 @@ -34,7 +34,7 @@ begin transports send_to_server: driver = smtp allow_localhost - hosts = 127.0.0.1 + hosts = HOSTIPV4 port = PORT_D hosts_try_fastopen = * diff --git a/test/confs/4058 b/test/confs/4058 index 0502c55b2..e2f55d1d0 100644 --- a/test/confs/4058 +++ b/test/confs/4058 @@ -40,7 +40,7 @@ server: client: driver = manualroute - route_data = 127.0.0.1::PORT_D + route_data = HOSTIPV4::PORT_D self = send transport = smtp diff --git a/test/log/1090 b/test/log/1090 index cadf41ee4..23ff08b8f 100644 --- a/test/log/1090 +++ b/test/log/1090 @@ -1,15 +1,15 @@ -2017-07-30 18:51:05.712 10HmaX-0005vi-00 <= CALLER@myhost.test.ex U=CALLER P=local S=sss for a@test.ex -2017-07-30 18:51:05.712 10HmaX-0005vi-00 => a@test.ex R=client T=send_to_server H=127.0.0.1 [127.0.0.1] C="250 OK id=10HmaY-0005vi-00" +2017-07-30 18:51:05.712 10HmaX-0005vi-00 <= CALLER@myhost.test.ex U=CALLER P=local S=sss for no_cookie@test.ex +2017-07-30 18:51:05.712 10HmaX-0005vi-00 => no_cookie@test.ex R=client T=send_to_server H=ip4.ip4.ip4.ip4 [ip4.ip4.ip4.ip4] C="250 OK id=10HmaY-0005vi-00" 2017-07-30 18:51:05.712 10HmaX-0005vi-00 Completed -2017-07-30 18:51:05.712 10HmaZ-0005vi-00 <= CALLER@myhost.test.ex U=CALLER P=local S=sss for b@test.ex -2017-07-30 18:51:05.712 10HmaZ-0005vi-00 => b@test.ex R=client T=send_to_server H=127.0.0.1 [127.0.0.1] TFO C="250 OK id=10HmbA-0005vi-00" +2017-07-30 18:51:05.712 10HmaZ-0005vi-00 <= CALLER@myhost.test.ex U=CALLER P=local S=sss for with_cookie@test.ex +2017-07-30 18:51:05.712 10HmaZ-0005vi-00 => with_cookie@test.ex R=client T=send_to_server H=ip4.ip4.ip4.ip4 [ip4.ip4.ip4.ip4] TFO C="250 OK id=10HmbA-0005vi-00" 2017-07-30 18:51:05.712 10HmaZ-0005vi-00 Completed ******** SERVER ******** 2017-07-30 18:51:05.712 exim x.yz daemon started: pid=p1234, no queue runs, listening for SMTP on port PORT_D -2017-07-30 18:51:05.712 10HmaY-0005vi-00 <= CALLER@myhost.test.ex H=localhost (myhost.test.ex) [127.0.0.1] P=esmtp S=sss id=E10HmaX-0005vi-00@myhost.test.ex for a@test.ex -2017-07-30 18:51:05.712 10HmaY-0005vi-00 => :blackhole: R=server +2017-07-30 18:51:05.712 10HmaY-0005vi-00 <= CALLER@myhost.test.ex H=the.local.host.name (myhost.test.ex) [ip4.ip4.ip4.ip4] P=esmtp S=sss id=E10HmaX-0005vi-00@myhost.test.ex for no_cookie@test.ex +2017-07-30 18:51:05.712 10HmaY-0005vi-00 => :blackhole: R=server 2017-07-30 18:51:05.712 10HmaY-0005vi-00 Completed -2017-07-30 18:51:05.712 10HmbA-0005vi-00 <= CALLER@myhost.test.ex H=localhost (myhost.test.ex) [127.0.0.1] TFO P=esmtp S=sss id=E10HmaZ-0005vi-00@myhost.test.ex for b@test.ex -2017-07-30 18:51:05.712 10HmbA-0005vi-00 => :blackhole: R=server +2017-07-30 18:51:05.712 10HmbA-0005vi-00 <= CALLER@myhost.test.ex H=the.local.host.name (myhost.test.ex) [ip4.ip4.ip4.ip4] TFO P=esmtp S=sss id=E10HmaZ-0005vi-00@myhost.test.ex for with_cookie@test.ex +2017-07-30 18:51:05.712 10HmbA-0005vi-00 => :blackhole: R=server 2017-07-30 18:51:05.712 10HmbA-0005vi-00 Completed diff --git a/test/log/4058 b/test/log/4058 index 3a68e7899..585cb4a6f 100644 --- a/test/log/4058 +++ b/test/log/4058 @@ -1,43 +1,43 @@ 2017-07-30 18:51:05.712 10HmaX-0005vi-00 <= CALLER@the.local.host.name U=CALLER P=local S=sss for nocache@test.ex 2017-07-30 18:51:05.712 Start queue run: pid=p1234 -2017-07-30 18:51:05.712 10HmaX-0005vi-00 => nocache@test.ex R=client T=smtp H=127.0.0.1 [127.0.0.1] L C="250 OK id=10HmaY-0005vi-00" +2017-07-30 18:51:05.712 10HmaX-0005vi-00 => nocache@test.ex R=client T=smtp H=ip4.ip4.ip4.ip4 [ip4.ip4.ip4.ip4] L C="250 OK id=10HmaY-0005vi-00" 2017-07-30 18:51:05.712 10HmaX-0005vi-00 Completed 2017-07-30 18:51:05.712 End queue run: pid=p1234 2017-07-30 18:51:05.712 10HmaZ-0005vi-00 <= CALLER@the.local.host.name U=CALLER P=local S=sss for hascache@test.ex 2017-07-30 18:51:05.712 Start queue run: pid=p1235 -2017-07-30 18:51:05.712 10HmaZ-0005vi-00 => hascache@test.ex R=client T=smtp H=127.0.0.1 [127.0.0.1] TFO* L* C="250 OK id=10HmbA-0005vi-00" +2017-07-30 18:51:05.712 10HmaZ-0005vi-00 => hascache@test.ex R=client T=smtp H=ip4.ip4.ip4.ip4 [ip4.ip4.ip4.ip4] TFO* L* C="250 OK id=10HmbA-0005vi-00" 2017-07-30 18:51:05.712 10HmaZ-0005vi-00 Completed 2017-07-30 18:51:05.712 End queue run: pid=p1235 2017-07-30 18:51:05.712 10HmbB-0005vi-00 <= CALLER@the.local.host.name U=CALLER P=local S=sss for nocache@test.ex 2017-07-30 18:51:05.712 Start queue run: pid=p1236 -2017-07-30 18:51:05.712 10HmbB-0005vi-00 => nocache@test.ex R=client T=smtp H=127.0.0.1 [127.0.0.1] TFO L K C="250- 3nn byte chunk, total 3nn\\n250 OK id=10HmbC-0005vi-00" +2017-07-30 18:51:05.712 10HmbB-0005vi-00 => nocache@test.ex R=client T=smtp H=ip4.ip4.ip4.ip4 [ip4.ip4.ip4.ip4] TFO L K C="250- 3nn byte chunk, total 3nn\\n250 OK id=10HmbC-0005vi-00" 2017-07-30 18:51:05.712 10HmbB-0005vi-00 Completed 2017-07-30 18:51:05.712 End queue run: pid=p1236 2017-07-30 18:51:05.712 10HmbD-0005vi-00 <= CALLER@the.local.host.name U=CALLER P=local S=sss for chunking@test.ex 2017-07-30 18:51:05.712 Start queue run: pid=p1237 -2017-07-30 18:51:05.712 10HmbD-0005vi-00 => chunking@test.ex R=client T=smtp H=127.0.0.1 [127.0.0.1] TFO* L* K C="250- 3nn byte chunk, total 3nn\\n250 OK id=10HmbE-0005vi-00" +2017-07-30 18:51:05.712 10HmbD-0005vi-00 => chunking@test.ex R=client T=smtp H=ip4.ip4.ip4.ip4 [ip4.ip4.ip4.ip4] TFO* L* K C="250- 3nn byte chunk, total 3nn\\n250 OK id=10HmbE-0005vi-00" 2017-07-30 18:51:05.712 10HmbD-0005vi-00 Completed 2017-07-30 18:51:05.712 End queue run: pid=p1237 ******** SERVER ******** 2017-07-30 18:51:05.712 exim x.yz daemon started: pid=p1238, no queue runs, listening for SMTP on port PORT_D -2017-07-30 18:51:05.712 10HmaY-0005vi-00 <= CALLER@the.local.host.name H=localhost (the.local.host.name) [127.0.0.1] P=esmtp L. S=sss id=E10HmaX-0005vi-00@the.local.host.name for nocache@test.ex +2017-07-30 18:51:05.712 10HmaY-0005vi-00 <= CALLER@the.local.host.name H=the.local.host.name [ip4.ip4.ip4.ip4] P=esmtp L. S=sss id=E10HmaX-0005vi-00@the.local.host.name for nocache@test.ex 2017-07-30 18:51:05.712 Start queue run: pid=p1239 2017-07-30 18:51:05.712 10HmaY-0005vi-00 => :blackhole: R=server 2017-07-30 18:51:05.712 10HmaY-0005vi-00 Completed 2017-07-30 18:51:05.712 End queue run: pid=p1239 -2017-07-30 18:51:05.712 10HmbA-0005vi-00 <= CALLER@the.local.host.name H=localhost (the.local.host.name) [127.0.0.1] TFO* P=esmtp L* S=sss id=E10HmaZ-0005vi-00@the.local.host.name for hascache@test.ex +2017-07-30 18:51:05.712 10HmbA-0005vi-00 <= CALLER@the.local.host.name H=the.local.host.name [ip4.ip4.ip4.ip4] TFO* P=esmtp L* S=sss id=E10HmaZ-0005vi-00@the.local.host.name for hascache@test.ex 2017-07-30 18:51:05.712 Start queue run: pid=p1240 2017-07-30 18:51:05.712 10HmbA-0005vi-00 => :blackhole: R=server 2017-07-30 18:51:05.712 10HmbA-0005vi-00 Completed 2017-07-30 18:51:05.712 End queue run: pid=p1240 2017-07-30 18:51:05.712 exim x.yz daemon started: pid=p1241, no queue runs, listening for SMTP on port PORT_D -2017-07-30 18:51:05.712 10HmbC-0005vi-00 <= CALLER@the.local.host.name H=localhost (the.local.host.name) [127.0.0.1] TFO P=esmtp L. K S=sss id=E10HmbB-0005vi-00@the.local.host.name for nocache@test.ex +2017-07-30 18:51:05.712 10HmbC-0005vi-00 <= CALLER@the.local.host.name H=the.local.host.name [ip4.ip4.ip4.ip4] TFO P=esmtp L. K S=sss id=E10HmbB-0005vi-00@the.local.host.name for nocache@test.ex 2017-07-30 18:51:05.712 Start queue run: pid=p1242 2017-07-30 18:51:05.712 10HmbC-0005vi-00 => :blackhole: R=server 2017-07-30 18:51:05.712 10HmbC-0005vi-00 Completed 2017-07-30 18:51:05.712 End queue run: pid=p1242 -2017-07-30 18:51:05.712 10HmbE-0005vi-00 <= CALLER@the.local.host.name H=localhost (the.local.host.name) [127.0.0.1] TFO* P=esmtp L* K S=sss id=E10HmbD-0005vi-00@the.local.host.name for chunking@test.ex +2017-07-30 18:51:05.712 10HmbE-0005vi-00 <= CALLER@the.local.host.name H=the.local.host.name [ip4.ip4.ip4.ip4] TFO* P=esmtp L* K S=sss id=E10HmbD-0005vi-00@the.local.host.name for chunking@test.ex 2017-07-30 18:51:05.712 Start queue run: pid=p1243 2017-07-30 18:51:05.712 10HmbE-0005vi-00 => :blackhole: R=server 2017-07-30 18:51:05.712 10HmbE-0005vi-00 Completed diff --git a/test/scripts/1090-TCP-Fast-Open/1090 b/test/scripts/1090-TCP-Fast-Open/1090 index d2c7b75f9..840579b7a 100644 --- a/test/scripts/1090-TCP-Fast-Open/1090 +++ b/test/scripts/1090-TCP-Fast-Open/1090 @@ -30,7 +30,7 @@ # FreeBSD: tried this setup, but we only get the banner captured 100ms after 3rd-ack: # #kenv net.inet.ip.fw.default_to_accept=1 # #kldload ipfw dummynet -# #ipfw add 00097 pipe 1 ip from 127.0.0.1 to 127.0.0.1 +# #ipfw add 00097 pipe 1 ip from HOSTIPV4 to HOSTIPV4 # #ipfw pipe 1 config delay 50ms # Also, the VM managed to lose the ipv4 & 6 addrs on its main interface # after a while - so not usable in production @@ -54,7 +54,7 @@ system ("[ -e /proc/sys/net/ipv4/tcp_fastopen_blackhole_timeout_sec ] && echo 0 # the client ACK). # # The client log => line should have a "TFO" element. -# The server log <= line for a@test.ex should not. +# The server log <= line for no_cookie@test.ex should not. # # First clear any previously-obtained cookie: sudo perl @@ -63,7 +63,7 @@ $_ = ; if (/^FreeBSD/) { system("sysctl net.inet.tcp.fastopen.client_enable=0"); system("sysctl net.inet.tcp.fastopen.client_enable=1"); } else { -system ("ip tcp_metrics delete 127.0.0.1"); +system ("ip tcp_metrics delete HOSTIPV4"); } **** @@ -73,16 +73,16 @@ system ("ip tcp_metrics delete 127.0.0.1"); exim -DSERVER=server -bd -oX PORT_D **** # -exim a@test.ex +exim no_cookie@test.ex Testing **** sleep 3 # -# The server log <= line for b@test.ex should have a "TFO" element, but +# The server log <= line for with_cookie@test.ex should have a "TFO" element, but # this will only be obtained when the above delay is inserted into the # loopback net path. # -exim b@test.ex +exim with_cookie@test.ex Testing **** sleep 3 diff --git a/test/scripts/4058-pipe-conn-tfo/4058 b/test/scripts/4058-pipe-conn-tfo/4058 index 5f0257810..2a0639095 100644 --- a/test/scripts/4058-pipe-conn-tfo/4058 +++ b/test/scripts/4058-pipe-conn-tfo/4058 @@ -6,7 +6,7 @@ # Disable TFO blackhole-detection as we seem to be running afoul of that sudo perl system ("tc qdisc add dev lo root netem delay 50ms"); -system ("ip tcp_metrics delete 127.0.0.1"); +system ("ip tcp_metrics delete HOSTIPV4"); system ("[ -e /proc/sys/net/ipv4/tcp_fastopen_blackhole_timeout_sec ] && echo 0 > /proc/sys/net/ipv4/tcp_fastopen_blackhole_timeout_sec"); **** #