[exim-cvs] Testsuite: tidying

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Exim Git Commits Mailing List
Dátum:  
Címzett: exim-cvs
Tárgy: [exim-cvs] Testsuite: tidying
Gitweb: http://git.exim.org/exim.git/commitdiff/42ec98804ba4473673997d013f03309dc3e1972d
Commit:     42ec98804ba4473673997d013f03309dc3e1972d
Parent:     c1cc0506c3069a9d93d71321f9578150662ede91
Author:     Jeremy Harris <jgh146exb@???>
AuthorDate: Sat Nov 1 11:37:36 2014 +0000
Committer:  Jeremy Harris <jgh146exb@???>
CommitDate: Sat Nov 1 11:37:36 2014 +0000


    Testsuite: tidying
---
 test/aux-fixed/showenv |    2 +-
 test/runtest           |   12 ++++++++++--
 test/src/fakens.c      |   10 +++++-----
 3 files changed, 16 insertions(+), 8 deletions(-)


diff --git a/test/aux-fixed/showenv b/test/aux-fixed/showenv
index 5d9ef8f..fc377cc 100755
--- a/test/aux-fixed/showenv
+++ b/test/aux-fixed/showenv
@@ -3,7 +3,7 @@
# This script outputs certain information about the environment, for use when
# testing pipe transports.

-name=`whoami 2>/dev/null` || name=`who . . | awk '{print $1}'`
+name=`id -un`

 echo Test pipe script
 echo Running as: $name
diff --git a/test/runtest b/test/runtest
index 8435fcc..c611167 100755
--- a/test/runtest
+++ b/test/runtest
@@ -896,7 +896,7 @@ RESET_AFTER_EXTRA_LINE_READ:
     # As of Exim 4.74, we log when a setgid fails; because we invoke Exim
     # with -be, privileges will have been dropped, so this will always
     # be the case
-    next if /^changing group to \d+ failed: Operation not permitted/;
+    next if /^changing group to \d+ failed: (Operation not permitted|Not owner)/;


     # We might not keep this check; rather than change all the tests, just
     # ignore it as long as it succeeds; then we only need to change the
@@ -1029,6 +1029,14 @@ RESET_AFTER_EXTRA_LINE_READ:
     next;
     }


+  # ======== log ========
+
+  elsif ($is_log)
+    {
+    # Berkeley DB version differences
+    next if / Berkeley DB error: /;
+    }
+
   # ======== All files other than stderr ========


print MUNGED;
@@ -2728,7 +2736,7 @@ $pwcomm = $pwcomm;

$parm_caller_group = getgrgid($parm_caller_gid);

-print "Program caller is $parm_caller, whose group is $parm_caller_group\n";
+print "Program caller is $parm_caller ($parm_caller_uid), whose group is $parm_caller_group ($parm_caller_gid)\n";
print "Home directory is $parm_caller_home\n";

unless (defined $parm_eximgroup)
diff --git a/test/src/fakens.c b/test/src/fakens.c
index ff0f1d4..baabf1d 100644
--- a/test/src/fakens.c
+++ b/test/src/fakens.c
@@ -421,7 +421,7 @@ while (fgets(CS buffer, sizeof(buffer), f) != NULL)

     case ns_t_mx:
     pk = shortfield(&p, pk);
-    if (ep[-1] != '.') sprintf(US ep, "%s.", zone);
+    if (ep[-1] != '.') sprintf(CS ep, "%s.", zone);
     pk = packname(p, pk);
     plen = Ustrlen(p);
     break;
@@ -465,7 +465,7 @@ while (fgets(CS buffer, sizeof(buffer), f) != NULL)
     case ns_t_cname:
     case ns_t_ns:
     case ns_t_ptr:
-    if (ep[-1] != '.') sprintf(US ep, "%s.", zone);
+    if (ep[-1] != '.') sprintf(CS ep, "%s.", zone);
     pk = packname(p, pk);
     plen = Ustrlen(p);
     break;
@@ -516,7 +516,7 @@ if (argc != 4)


/* Find the zones */

-(void)sprintf(US buffer, "%s/../dnszones", argv[1]);
+(void)sprintf(CS buffer, "%s/../dnszones", argv[1]);

d = opendir(CCS buffer);
if (d == NULL)
@@ -587,7 +587,7 @@ if (zonefile == NULL)
return PASS_ON;
}

-(void)sprintf(US buffer, "%s/../dnszones/%s", argv[1], zonefile);
+(void)sprintf(CS buffer, "%s/../dnszones/%s", argv[1], zonefile);

/* Initialize the start of the response packet. We don't have to fake up
everything, because we know that Exim will look only at the answer and
@@ -598,7 +598,7 @@ pk += 12;

/* Open the zone file. */

-f = fopen(US buffer, "r");
+f = fopen(CS buffer, "r");
if (f == NULL)
{
fprintf(stderr, "fakens: failed to open %s: %s\n", buffer, strerror(errno));