Search for: Advanced

[Bug-mailfromd] Testsuite problems on Debian s390x and two small patches

Hi Sergey!

Some yars ago I told you, that I'm working on packaging mailfromd for
Debian, now it's done and a first version of mailfromd 8.10 is
available in the unstable archive of Debian.

Doing so, I found a typo ("unknow" instead of "unknown") in
src/savsrv.c, a patch is attached (01_unknow_typo.patch)

Today I run into a second typo: In src/builtin/geoip2.c you use
WRDSF_DELIM instead of MU_WRDSF_DELIM.  A patch
(02_MU_WRDSF_DELIM.patch) is attached (don't ask me, why I didn't run
into this earlier, seems to depend on dependencies, whether this code
is used at all).

My package builds on most architectures without problems, but on some
of them the testsuite runs into problems (see
https://buildd.debian.org/status/package.php?p=mailfromd).  From these
architectures currently only s390x is relevant for Debian since Debian
ships this architecture (the others with problems are not release
relevant, so they can be ignored at the moment).

I logged in to a s390x machine myself now and have to admit, that the
problems of the autobuilder are reproducible on this server.  The
following tests currently fail:

   3: vercmp01.at:17     vercmp: invalid 1st argument
      vercmp vercmp01
   4: vercmp02.at:17     vercmp: invalid 2nd argument
      vercmp vercmp02
   6: resolv_ptr.at:17   PTR lookup
      dns resolv resolv_ptr
  10: resolv_ptr_val.at:17 PTR validate
      dns resolv resolv_ptr_val
  37: invip.at:17        Catching exceptions: invip
      exceptions catch invip
  38: invcidr.at:17      Catching exceptions: invcidr
      exceptions catch invcidr
  40: invip2.at:17       Catching exceptions: invip (2)
      exceptions catch invip2
  41: invcidr2.at:17     Catching exceptions: invcidr (2)
      exceptions catch invcidr2
  43: trycatch02.at:17   Try-catch: returning from catch
      try catch return try-catch trycatch try-catch02 trycatch02
  44: trycatch03.at:17   Try-catch: passing through try
      try catch try-catch trycatch try-catch03 trycatch03
  45: trycatch04.at:17   Try-catch: passing through catch
      try catch try-catch trycatch try-catch04 trycatch04
  47: trycatch06.at:17   Try-catch: break from catch
      try catch break try-catch trycatch try-catch06 trycatch06
  49: trycatch08.at:17   Try-catch: next from catch
      try catch next loop try-catch trycatch try-catch08 trycatch08
  51: trycatch10.at:17   Try-catch: break from nested catch
      try catch break try-catch trycatch try-catch10 trycatch10
  53: trycatch12.at:17   Try-catch: next from nested catch
      try catch next loop try-catch trycatch try-catch12 trycatch12
  55: trycatch14.at:17   Try-catch: break from a loop within catch
      try catch break try-catch trycatch try-catch14 trycatch14
  57: trycatch16.at:17   Try-catch: next in a loop within catch
      try catch break loop try-catch trycatch try-catch16 trycatch16
  71: dns_query.at:57    dns_query: ptr
      dns dns_query dns_query_ptr
  75: resolve.at:17      Resolve
      dns resolve
  76: rescname.at:17     Resolve cname
      dns rescname
  77: hostname.at:17     Resolve hostname
      dns hostname
  78: hasmx.at:17        Hasmx call
      dns hasmx
  79: ismx.at:17         Ismx call
      dns ismx
  87: poll01.at:17       poll: Non-existing sender
      poll non-exist poll01
  88: poll02.at:17       poll: Tempfail
      poll tempfail poll02
 102: switchs1.at:17     String switch: Branch 1,2 val jeden
      switch strswitch switchs1
 103: switchs2.at:17     String switch: Branch 1,2 val dwa
      switch strswitch switchs2
 104: switchs3.at:17     String switch: Branch 3
      switch strswitch switchs3
 113: hdr-gete.at:17     current_header(name,ind) - exception
      curhdr current_header_e
 118: eof.at:17          EOF exception

I didn't yet understand what happens on all of them, but here are my
first inspection results:

3, 4, 113, and 118 don't show the file name of the script in the
output of RUNTIME ERROR message (the line number is correctly shown),
so there seems to be some issue with the ENV_LOC_FILE macro in

6 and 10 are problems with the resolv test binary which doesn't return
a ptr respectively ptr_val, while "dig -x @"
and "dig -x @" are okay, so this shouldn't be
a network issue on the server.

71 looks similar, since it also fails on a PTR record.

Puh, I'm not deep enough in the testsuite stuff nor in the mailfromd
usage, so it will take more time to debug and understand all these
different test failures on the s390x host.

I attached testsuite.log and testsuite.dir from the s390x host as
s390x-testsuite.tar.gz, maybe you are interested in what goes wrong on
this architecture.

I will later try to deeper understand what's going wrong on s390x,
but at the moment my head is full and needs some fresh air...


From: Roland Rosenfeld <roland@xxxxxxxxxx>
Date: Sat, 06 Feb 2021 16:24:22 +0100
Subject: Fix typo in "unknown".

--- a/src/savsrv.c
+++ b/src/savsrv.c
@@ -297,7 +297,7 @@ addq(int argc, char **argv, const char *
 		} else if (!strcasecmp(attr, "mailfrom")) {
 			mailfrom = val;
 		} else {
-			*errp = "unknow attribute";
+			*errp = "unknown attribute";
 			return NULL;
From: Roland Rosenfeld <roland@xxxxxxxxxx>
Date: Sat, 22 May 2021 15:56:57 +0200
Subject: Add missing MU_ prefix to WRDSF_DELIM

--- a/src/builtin/geoip2.c
+++ b/src/builtin/geoip2.c
@@ -355,7 +355,7 @@ get_string_arg(env, 0, &ip);
 	ws.ws_delim = ".";
-	rc = mu_wordsplit(pathstr, &ws, WRDSF_DELIM);
+	rc = mu_wordsplit(pathstr, &ws, MU_WRDSF_DELIM);
 	if (rc != 0) {
 		char const *errstr = mu_wordsplit_strerror(&ws);

Attachment: s390x-testsuite.tar.gz
Description: application/tar-gz