[exim-cvs] Testsuite: munge for error message sizes in retry…

Góra strony
Delete this message
Reply to this message
Autor: Exim Git Commits Mailing List
Data:  
Dla: exim-cvs
Temat: [exim-cvs] Testsuite: munge for error message sizes in retry records
Gitweb: https://git.exim.org/exim.git/commitdiff/86e280ca236af22136ad21cc8da30ed82afb0a02
Commit:     86e280ca236af22136ad21cc8da30ed82afb0a02
Parent:     9bf74b9c298f6968417fe88a68ccdf2179db1403
Author:     Jeremy Harris <jgh146exb@???>
AuthorDate: Mon Jul 1 09:05:51 2024 +0100
Committer:  Jeremy Harris <jgh146exb@???>
CommitDate: Mon Jul 1 10:05:49 2024 +0100


    Testsuite: munge for error message sizes in retry records
---
 test/runtest     | 22 +++++++++++++---------
 test/stderr/0388 |  4 ++--
 test/stderr/0398 | 10 +++++-----
 test/stderr/0432 |  8 ++++----
 test/stderr/5005 |  8 ++++----
 5 files changed, 28 insertions(+), 24 deletions(-)


diff --git a/test/runtest b/test/runtest
index 0c5f69a93..a23d29cdc 100755
--- a/test/runtest
+++ b/test/runtest
@@ -1434,6 +1434,19 @@ RESET_AFTER_EXTRA_LINE_READ:
     # so convert them all to "0"
     s%(?<!lsearch)[^ ](?=TESTSUITE/aux-fixed/(?:0414.list[12]|0464.domains)$)%0%;


+    # Environment cleaning
+    next if /\w+ in keep_environment\? (yes|no)/;
+
+    # Sizes vary with test hostname
+    s/^cmd buf flush \d+ bytes/cmd buf flush ddd bytes/;
+
+    # Different platforms put different error messages into retry records
+    s/dbfn_write: key=.* datalen \K\d{2,3}$/nn/;
+    s/dbfn_read: size \K\d{2,3}(?= return$)/nnn/;
+
+    # Spool filesystem free space changes on different systems.
+    s/((?:spool|log) directory space =) -?\d+K (inodes =)\s*-?\d+/$1 nnnnnK $2 nnnnn/;
+
     # CONTENT_SCAN
     next if /try option acl_(?:not_)?smtp_mime$/;


@@ -1484,15 +1497,6 @@ RESET_AFTER_EXTRA_LINE_READ:
     next if /in tls_resumption_hosts\?/;
     next if /RE '.outlook.com/;


-    # Environment cleaning
-    next if /\w+ in keep_environment\? (yes|no)/;
-
-    # Sizes vary with test hostname
-    s/^cmd buf flush \d+ bytes/cmd buf flush ddd bytes/;
-
-    # Spool filesystem free space changes on different systems.
-    s/((?:spool|log) directory space =) -?\d+K (inodes =)\s*-?\d+/$1 nnnnnK $2 nnnnn/;
-
     # Non-TLS builds have different expansions for received_header_text
     if (s/(with \$received_protocol)\}\} \$\{if def:tls_cipher \{\(\$tls_cipher\)\n$/$1/)
       {
diff --git a/test/stderr/0388 b/test/stderr/0388
index 78be65faf..12755aa4f 100644
--- a/test/stderr/0388
+++ b/test/stderr/0388
@@ -167,7 +167,7 @@ failing_interval=ttt message_age=ttt
 Writing retry data for R:x@y
   first failed=dddd last try=dddd next try=+1 expired=1
   errno=-44 more_errno=dd,A H=127.0.0.1 [127.0.0.1]: SMTP error from remote mail server after RCPT TO:<x@y>: 451 Temporary error
- dbfn_write: key=R:x@y datalen 148
+ dbfn_write: key=R:x@y datalen nn
  *@V4NET.0.0.0 in "*"?
   list element: *
   address match test: subject=*@V4NET.0.0.0 pattern=*
@@ -183,7 +183,7 @@ on queue longer than maximum retry
 Writing retry data for T:[V4NET.0.0.0]:V4NET.0.0.0:PORT_S
   first failed=dddd last try=dddd next try=+0 expired=0
   errno=dd more_errno=dd,A Network Error
- dbfn_write: key=T:[V4NET.0.0.0]:V4NET.0.0.0:PORT_S datalen 70
+ dbfn_write: key=T:[V4NET.0.0.0]:V4NET.0.0.0:PORT_S datalen nn
 timed out: all retries expired
 LOG: MAIN
   ** x@y: retry timeout exceeded
diff --git a/test/stderr/0398 b/test/stderr/0398
index 745b5bb12..bb31becd4 100644
--- a/test/stderr/0398
+++ b/test/stderr/0398
@@ -143,7 +143,7 @@ Attempting full verification using callout
  returned from EXIM_DBOPEN: 0xAAAAAAAA
  opened hints database TESTSUITE/spool/db/callout: flags=O_RDWR
  dbfn_read: key=remote
- dbfn_read: size 40 return
+ dbfn_read: size nnn return
  callout cache: found domain record for remote
  dbfn_read: key=qq@remote
  dbfn_read: null return
@@ -178,10 +178,10 @@ cmdlog: '220:EHLO:250:MAIL:250:RCPT:550:QUIT:250'
  EXIM_DBOPEN: file <TESTSUITE/spool/db/callout> dir <TESTSUITE/spool/db> flags=O_RDWR
  returned from EXIM_DBOPEN: 0xAAAAAAAA
  opened hints database TESTSUITE/spool/db/callout: flags=O_RDWR
- dbfn_write: key=remote datalen 40
+ dbfn_write: key=remote datalen nn
  wrote callout cache domain record for remote:
    result=1 postmaster=0 random=0
- dbfn_write: key=qq@remote datalen 16
+ dbfn_write: key=qq@remote datalen nn
  wrote negative callout cache address record for qq@remote
  EXIM_DBCLOSE(0xAAAAAAAA)
  closed hints database
@@ -276,10 +276,10 @@ Attempting full verification using callout
  returned from EXIM_DBOPEN: 0xAAAAAAAA
  opened hints database TESTSUITE/spool/db/callout: flags=O_RDWR
  dbfn_read: key=remote
- dbfn_read: size 40 return
+ dbfn_read: size nnn return
  callout cache: found domain record for remote
  dbfn_read: key=qq@remote
- dbfn_read: size 16 return
+ dbfn_read: size nnn return
  callout cache: found address record for qq@remote
  callout cache: address record is negative
  EXIM_DBCLOSE(0xAAAAAAAA)
diff --git a/test/stderr/0432 b/test/stderr/0432
index 2e0719788..1f17d175d 100644
--- a/test/stderr/0432
+++ b/test/stderr/0432
@@ -131,10 +131,10 @@ cmdlog: '220:EHLO:250:MAIL:250:RCPT:250:QUIT:220'
  EXIM_DBOPEN: file <TESTSUITE/spool/db/callout> dir <TESTSUITE/spool/db> flags=O_RDWR
  returned from EXIM_DBOPEN: 0xAAAAAAAA
  opened hints database TESTSUITE/spool/db/callout: flags=O_RDWR
- dbfn_write: key=y datalen 40
+ dbfn_write: key=y datalen nn
  wrote callout cache domain record for y:
    result=1 postmaster=0 random=0
- dbfn_write: key=x@y datalen 16
+ dbfn_write: key=x@y datalen nn
  wrote positive callout cache address record for x@y
  EXIM_DBCLOSE(0xAAAAAAAA)
  closed hints database
@@ -218,10 +218,10 @@ Attempting full verification using callout
  returned from EXIM_DBOPEN: 0xAAAAAAAA
  opened hints database TESTSUITE/spool/db/callout: flags=O_RDWR
  dbfn_read: key=y
- dbfn_read: size 40 return
+ dbfn_read: size nnn return
  callout cache: found domain record for y
  dbfn_read: key=x@y
- dbfn_read: size 16 return
+ dbfn_read: size nnn return
  callout cache: found address record for x@y
  callout cache: address record is positive
  EXIM_DBCLOSE(0xAAAAAAAA)
diff --git a/test/stderr/5005 b/test/stderr/5005
index 6620345bf..779cc0a23 100644
--- a/test/stderr/5005
+++ b/test/stderr/5005
@@ -564,7 +564,7 @@ failing_interval=ttt message_age=ttt
 Writing retry data for T:userx@???
   first failed=dddd last try=dddd next try=+86400 expired=0
   errno=-22 more_errno=dd mailbox is full (MTA-imposed quota exceeded while writing to tmp/MAILDIR.myhost.test.ex)
- dbfn_write: key=T:userx@??? datalen 154
+ dbfn_write: key=T:userx@??? datalen nn
  EXIM_DBCLOSE(0xAAAAAAAA)
  closed hints database
 end of retry processing
@@ -698,7 +698,7 @@ search_tidyup called
  returned from EXIM_DBOPEN: 0xAAAAAAAA
  opened hints database TESTSUITE/spool/db/retry: flags=O_RDONLY
  dbfn_read: key=T:userx@???
- dbfn_read: size 154 return
+ dbfn_read: size nnn return
 retry record exists: age=ttt (max 1w)
   time to retry = tttt expired = 0
  EXIM_DBCLOSE(0xAAAAAAAA)
@@ -758,12 +758,12 @@ Deferred addresses:
   userx@??? in "*"? yes (matched "*")
 retry for T:userx@??? = * 0 0
  dbfn_read: key=T:userx@???
- dbfn_read: size 154 return
+ dbfn_read: size nnn return
 failing_interval=ttt message_age=ttt
 Writing retry data for T:userx@???
   first failed=dddd last try=dddd next try=+86400 expired=0
   errno=-22 more_errno=dd mailbox is full (MTA-imposed quota exceeded while writing to tmp/MAILDIR.myhost.test.ex)
- dbfn_write: key=T:userx@??? datalen 154
+ dbfn_write: key=T:userx@??? datalen nn
  EXIM_DBCLOSE(0xAAAAAAAA)
  closed hints database
 end of retry processing


--
## subscription configuration (requires account):
## https://lists.exim.org/mailman3/postorius/lists/exim-cvs.lists.exim.org/
## unsubscribe (doesn't require an account):
## exim-cvs-unsubscribe@???
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/