From 0288c50a848a19822b9d693681c53d5db1fc8ae6 Mon Sep 17 00:00:00 2001 From: Jeremy Harris Date: Thu, 22 Dec 2022 14:58:57 +0000 Subject: Testsuite: fix munging for leading-space on PID --- test/runtest | 6 ++---- test/stderr/0609 | 30 +++++++++++++++--------------- test/stderr/2201 | 2 +- 3 files changed, 18 insertions(+), 20 deletions(-) (limited to 'test') diff --git a/test/runtest b/test/runtest index 38e03b3ac..49789319b 100755 --- a/test/runtest +++ b/test/runtest @@ -1076,12 +1076,10 @@ RESET_AFTER_EXTRA_LINE_READ: ) /x; - # Lines with a leading pid - s/^(\d+)\s(?!(?:previous message|in\s|bytes remain in))/new_value($1, "p%s", \$next_pid) . ' '/e; + # Lines with a leading pid. Only handle >= 4-digit PIDs to avoid converting SMTP respose codes + s/^(\s*\d{4,})\s(?!(?:previous message|in\s|bytes remain in|SMTP accept process running))/new_value($1, "p%s", \$next_pid) . ' '/e; # Debugging lines for Exim terminations and process-generation - - s/^\s*\K(\d+)(?=\sexec\s.*\s-oPX$)/new_value($1, "%s", \$next_pid)/xe; next if /(?:postfork: | fork(?:ing|ed) for )/; # IP address lookups use gethostbyname() when IPv6 is not supported, diff --git a/test/stderr/0609 b/test/stderr/0609 index 71f78c4de..676809138 100644 --- a/test/stderr/0609 +++ b/test/stderr/0609 @@ -23,7 +23,7 @@ p1235 using ACL "delay4_accept" p1235 processing "accept" (TESTSUITE/test-config 24) p1235 check delay = 4s p1235 delay modifier requests 4-second delay -p1236 SMTP accept process running +1 SMTP accept process running Listening... p1235 accept: condition test succeeded in ACL "delay4_accept" p1235 end of ACL "delay4_accept": ACCEPT @@ -32,23 +32,23 @@ p1235 SMTP connection from (test) [127.0.0.1] closed by QUIT p1235 >>>>>>>>>>>>>>>> Exim pid=p1235 (daemon-accept) terminating with rc=0 >>>>>>>>>>>>>>>> child p1235 ended: status=0x0 normal exit, 0 -p1237 SMTP accept processes now running +0 SMTP accept processes now running Listening... Connection request from 127.0.0.1 port sssss LOG: smtp_connection MAIN SMTP connection from [127.0.0.1] (TCP/IP connection count = 1) -p1238 Process p1238 is handling incoming connection from [127.0.0.1] -p1238 Process p1238 is ready for new message -p1238 using ACL "delay4_accept" -p1238 processing "accept" (TESTSUITE/test-config 24) -p1238 check delay = 4s -p1238 delay modifier requests 4-second delay -p1238 delay cancelled by peer close -p1238 accept: condition test succeeded in ACL "delay4_accept" -p1238 end of ACL "delay4_accept": ACCEPT -p1238 LOG: lost_incoming_connection MAIN -p1238 unexpected disconnection while reading SMTP command from (test) [127.0.0.1] D=qqs -p1238 >>>>>>>>>>>>>>>> Exim pid=p1238 (daemon-accept) terminating with rc=1 >>>>>>>>>>>>>>>> -p1236 SMTP accept process running +p1236 Process p1236 is handling incoming connection from [127.0.0.1] +p1236 Process p1236 is ready for new message +p1236 using ACL "delay4_accept" +p1236 processing "accept" (TESTSUITE/test-config 24) +p1236 check delay = 4s +p1236 delay modifier requests 4-second delay +p1236 delay cancelled by peer close +p1236 accept: condition test succeeded in ACL "delay4_accept" +p1236 end of ACL "delay4_accept": ACCEPT +p1236 LOG: lost_incoming_connection MAIN +p1236 unexpected disconnection while reading SMTP command from (test) [127.0.0.1] D=qqs +p1236 >>>>>>>>>>>>>>>> Exim pid=p1236 (daemon-accept) terminating with rc=1 >>>>>>>>>>>>>>>> +1 SMTP accept process running SIGTERM/SIGINT seen >>>>>>>>>>>>>>>> Exim pid=p1234 (daemon) terminating with rc=0 >>>>>>>>>>>>>>>> diff --git a/test/stderr/2201 b/test/stderr/2201 index 07b9ac520..dfc55b9a8 100644 --- a/test/stderr/2201 +++ b/test/stderr/2201 @@ -213,7 +213,7 @@ Listening... Connection request from 127.0.0.1 port sssss p1238 Process p1238 is handling incoming connection from [127.0.0.1] p1238 Process p1238 is ready for new message -p1240 SMTP accept process running +1 SMTP accept process running Listening... p1238 dnslists check: rbl.test.ex/V4NET.11.12.14 p1238 new DNS lookup for 14.12.11.V4NET.rbl.test.ex -- cgit v1.2.1