[exim-cvs] Testsuite: testcases for bug 2538

Startseite
Nachricht löschen
Nachricht beantworten
Autor: Exim Git Commits Mailing List
Datum:  
To: exim-cvs
Betreff: [exim-cvs] Testsuite: testcases for bug 2538
Gitweb: https://git.exim.org/exim.git/commitdiff/4bcc0ff50b9dd7fceded6164b554861dab8ea751
Commit:     4bcc0ff50b9dd7fceded6164b554861dab8ea751
Parent:     e68def51cb753d730249565e630b549a73857ec1
Author:     Jeremy Harris <jgh146exb@???>
AuthorDate: Sun Mar 8 15:20:10 2020 +0000
Committer:  Jeremy Harris <jgh146exb@???>
CommitDate: Sun Mar 8 15:49:50 2020 +0000


    Testsuite: testcases for bug 2538
---
 test/confs/0092              |  3 +++
 test/log/0092                |  3 +++
 test/scripts/0000-Basic/0092 | 40 ++++++++++++++++++++++++++++++++++++++++
 test/stderr/0092             | 17 +++++++++--------
 test/stdout/0092             |  4 ++++
 5 files changed, 59 insertions(+), 8 deletions(-)


diff --git a/test/confs/0092 b/test/confs/0092
index e5cdf11..cdcf523 100644
--- a/test/confs/0092
+++ b/test/confs/0092
@@ -14,8 +14,11 @@ primary_hostname = myhost.test.ex
# ----- Main settings -----

OPT = 2s
+
+.ifndef COM
smtp_receive_timeout = OPT
receive_timeout = 2s
+.endif


begin acl
diff --git a/test/log/0092 b/test/log/0092
index c5ce71a..e4c3725 100644
--- a/test/log/0092
+++ b/test/log/0092
@@ -4,3 +4,6 @@
1999-03-02 09:44:33 10HmaX-0005vi-00 timed out while reading local message
1999-03-02 09:44:33 SMTP command timeout on connection from CALLER
1999-03-02 09:44:33 SMTP data timeout (message abandoned) on connection from local process F=<CALLER@???>
+1999-03-02 09:44:33 SMTP command timeout on connection from CALLER
+1999-03-02 09:44:33 SMTP command timeout on connection from CALLER
+1999-03-02 09:44:33 timed out while reading local message
diff --git a/test/scripts/0000-Basic/0092 b/test/scripts/0000-Basic/0092
index 1534317..d22feeb 100644
--- a/test/scripts/0000-Basic/0092
+++ b/test/scripts/0000-Basic/0092
@@ -1,16 +1,24 @@
# SMTP incoming timeout + receive_timeout
+#
+# stdin-smtp, no cmds, smtp command timeout 2s
1
3 exim -bs
****
+#
+# stdin-smtp, cmds then pause in dataphase, smtp command timeout 2s
1
3 exim -bs
mail from: userx@???
rcpt to: userx@???
data
****
+#
+# stdin-smtp, no cmds, smtp command timeout 2s
1
3 exim -bh V4NET.0.0.1
****
+#
+# stdin-smtp, cmds then pause in dataphase, smtp command timeout 2s
1
3 exim -bh V4NET.0.0.1
mail from:userx@???
@@ -18,6 +26,9 @@ rcpt to:userx@???
data
The quick brown fox
****
+#
+# stdin-smtp, cmds then pause in dataphase, smtp command timeout 2s
+# late-expansion of smtp_receive_timeout
1
3 exim -d+expand '-DOPT=${if eq {V4NET.0.0.1} {$sender_host_address} {2} {30}}s' -bh V4NET.0.0.1
mail from:userx@???
@@ -25,24 +36,53 @@ rcpt to:userx@???
data
The quick brown fox
****
+#
+# cmdline mail, no stdin, receive_timeout 2s
1
3 exim userx@???
****
+#
+# cmdline mail, some data then pause, receive_timeout 2s
1
3 exim userx@???
The quick brown fox
jumps over the lazy dog.
****
+#
+# stdin-smtp, cmds then pause before dataphase, smtp command timeout 2s
1
3 exim -bh V4NET.0.0.1
mail from: userx@???
rcpt to: verify@???
****
+#
+# stdin-bsmtp, no stdin, smtp command timeout 2s
2
3 exim -bS
****
+#
+# stdin-bsmtp, some data then pause, smtp command timeout 2s
2
3 exim -bS
mail from: userx@???
rcpt to: userx@???
data
+****
+#
+# stdin-smtp, no cmds, smtp command timeout 2s set by cmdline
+1
+3 exim -DCOM=y -bs -os 2s
+****
+1
+3 exim -DCOM=y -os 2s -bs
+****
+#
+# cmdline mail, no stdin, receive_timeout 2s set by cmdline
+1
+3 exim -DCOM=y -or 2s userx@???
+****
+#
+# stdin-bsmtp, no stdin, receive_timeout 2s set by cmdline
+# should not timeout
+3 exim -DCOM=y -bS -or 2s
+****
diff --git a/test/stderr/0092 b/test/stderr/0092
index 7db741e..e07e849 100644
--- a/test/stderr/0092
+++ b/test/stderr/0092
@@ -16,16 +16,16 @@ LOG: SMTP command timeout on connection from [V4NET.0.0.1]
>>> host in helo_try_verify_hosts? no (option unset)
>>> host in helo_accept_junk_hosts? no (option unset)
>>> using ACL "check_recipient"

->>> processing "accept" (TESTSUITE/test-config 24)
+>>> processing "accept" (TESTSUITE/test-config 27)
>>> check hosts = :
>>> host in ":"? no (end of list)
>>> accept: condition test failed in ACL "check_recipient"

->>> processing "deny" (TESTSUITE/test-config 25)
+>>> processing "deny" (TESTSUITE/test-config 28)
>>> message: unrouteable address
>>> check recipients = verify@???
>>> userx@??? in "verify@???"? no (end of list)
>>> deny: condition test failed in ACL "check_recipient"

->>> processing "accept" (TESTSUITE/test-config 28)
+>>> processing "accept" (TESTSUITE/test-config 31)
>>> check domains = +local_domains
>>> test.ex in "test.ex : *.test.ex"? yes (matched "test.ex")
>>> test.ex in "+local_domains"? yes (matched "+local_domains")

@@ -84,17 +84,17 @@ log directory space = nnnnnK inodes = nnnnn check_space = 10240K inodes = 100
SMTP>> 250 OK

SMTP<< rcpt to:userx@???
using ACL "check_recipient"
-processing "accept" (TESTSUITE/test-config 24)
+processing "accept" (TESTSUITE/test-config 27)
check hosts = :
host in ":"? no (end of list)
accept: condition test failed in ACL "check_recipient"
-processing "deny" (TESTSUITE/test-config 25)
+processing "deny" (TESTSUITE/test-config 28)
message: unrouteable address
check recipients = verify@???
address match test: subject=userx@??? pattern=verify@???
userx@??? in "verify@???"? no (end of list)
deny: condition test failed in ACL "check_recipient"
-processing "accept" (TESTSUITE/test-config 28)
+processing "accept" (TESTSUITE/test-config 31)
check domains = +local_domains
test.ex in "test.ex : *.test.ex"? yes (matched "test.ex")
test.ex in "+local_domains"? yes (matched "+local_domains")
@@ -121,11 +121,11 @@ exim: timed out while reading - message abandoned
>>> host in helo_try_verify_hosts? no (option unset)
>>> host in helo_accept_junk_hosts? no (option unset)
>>> using ACL "check_recipient"

->>> processing "accept" (TESTSUITE/test-config 24)
+>>> processing "accept" (TESTSUITE/test-config 27)
>>> check hosts = :
>>> host in ":"? no (end of list)
>>> accept: condition test failed in ACL "check_recipient"

->>> processing "deny" (TESTSUITE/test-config 25)
+>>> processing "deny" (TESTSUITE/test-config 28)
>>> message: unrouteable address
>>> check recipients = verify@???
>>> test.ex in "test.ex"? yes (matched "test.ex")

@@ -161,3 +161,4 @@ The SMTP transaction started in line 0.
The error was detected in line 3.
0 previous messages were successfully processed.
The rest of the batch was abandoned.
+exim: timed out while reading - message abandoned
diff --git a/test/stdout/0092 b/test/stdout/0092
index 6e8d057..a4df25c 100644
--- a/test/stdout/0092
+++ b/test/stdout/0092
@@ -47,3 +47,7 @@ Error detected in line 0
421 SMTP incoming data timeout - message abandoned
Transaction started in line 0
Error detected in line 3
+220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000
+421 myhost.test.ex: SMTP command timeout - closing connection
+220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000
+421 myhost.test.ex: SMTP command timeout - closing connection