[exim-cvs] The test architecture can't support having the te…

Top Page
Delete this message
Reply to this message
Author: Exim Git Commits Mailing List
Date:  
To: exim-cvs
Subject: [exim-cvs] The test architecture can't support having the testsuite user and the Exim user the same. restrict it in runtest and add a note about it in the README
Gitweb: http://git.exim.org/exim.git;a=commit;h=a56f166d182394d5e339bb50bc1725a3f98c768a
Commit:     a56f166d182394d5e339bb50bc1725a3f98c768a
Parent:     04a45836676516936d791202928e249b711c03ee
Author:     John Jetmore <jetmore@???>
AuthorDate: Fri Jul 16 22:53:24 2010 -0400
Committer:  John Jetmore <jetmore@???>
CommitDate: Fri Jul 16 22:53:24 2010 -0400


    The test architecture can't support having the testsuite user and the Exim user the same.  restrict it in runtest and add a note about it in the README
---
 test/README  |    5 +++--
 test/runtest |    6 ++++++
 2 files changed, 9 insertions(+), 2 deletions(-)


diff --git a/test/README b/test/README
index c139832..e9cc10d 100644
--- a/test/README
+++ b/test/README
@@ -65,8 +65,9 @@ In order to run this test suite, the following requirements must be met:
       Defaults timestamp_timeout=480


     in /etc/sudoers, a password lasts for 8 hours (a working day). It is
-    probably not a good idea to run the tests as the Exim user, as this is
-    recognized as special by Exim.
+    not permitted to run the tests as the Exim user because the test suite
+    tracks the two users independently.  Using the same user would result
+    in false positives on some tests.


 (3) The login under which you run the tests must be in the exim group so that
     it has access to logs, spool files, etc. The login should not be one of the
diff --git a/test/runtest b/test/runtest
index 43b3590..d65d0b5 100755
--- a/test/runtest
+++ b/test/runtest
@@ -2621,6 +2621,12 @@ if (system("cp $parm_exim_dir/eximstats eximdir") != 0)


 print "Exim user is $parm_eximuser ($parm_exim_uid)\n";
 print "Exim group is $parm_eximgroup ($parm_exim_gid)\n";
+
+if ($parm_caller_uid eq $parm_exim_uid) {
+  tests_exit(-1, "Exim user ($parm_eximuser,$parm_exim_uid) cannot be "
+                ."the same as caller ($parm_caller,$parm_caller_uid)");
+}
+
 print "The Exim user needs access to the test suite directory. Checking ...";


if (($rc = system("sudo bin/checkaccess $parm_cwd/eximdir/exim $parm_eximuser $parm_eximgroup")) != 0)