1 EXIM'S BEHAVIOUR CHANGES WHEN RUNNING IN THE TEST HARNESS
2 ---------------------------------------------------------
4 When Exim is running in its test harness, via the scripts in the exim-testsuite
5 distribution, its behaviour is altered in a few ways, in order to make the
6 regression testing work properly. The documentation for the test suite
7 describes how a copy of the Exim binary is taken and patched in order to get it
8 to run in the test harness. This document briefly lists the behavioural changes
9 that result. They come into play when the Boolean variable running_in_test_
16 Exim does not give up its root privilege when called with -C or -D, nor does it
17 insist on the caller being an admin user when starting a daemon, a queue
18 runner, or requesting debug output.
24 In a number of places, typically when a subprocess has been forked, there are
25 short pauses of half or one second in one of the processes. This allows the
26 other process to "go first"; it ensures that debugging or logging output always
27 appears in the same order.
33 The daemon always writes a pid file when running in the test harness.
39 The cram_md5 authenticator always uses the same challenge string.
45 After a quota error, the "time since last read" for the file is forced to 10s,
52 Memory management debugging output contains only the store pool and the size
53 (other information is too variable). New memory is initialized to contain F0 in
60 There's a facility (-Tqt) for fudging queue times for testing retry logic.
66 Exim never writes to syslog in the test harness. Attempts to do so are silently
67 ignored. None of the tests actually specify syslog logging for any actual log
68 lines, but there is one that tests the inability to open the main and panic
69 logs, which by default then tries to write to syslog.
72 SMTP connection timeout
73 -----------------------
75 In order to be able to test timeout handling, a "connection refused" error is
76 converted into a timeout if the timeout value is set to 999999s.
82 The seed for the pseudo-random number generator is set to a fixed value in the
83 test harness, to ensure repeatability.
89 When Exim is submitting a bounce message to itself, unless the configuration
90 has set queue_only, it uses -odi so that the bounce is delivered before the
91 subprocess returns. This avoids a race that might put log lines in an arbitrary
98 The real DNS resolver is never called. Instead, a fake resolver, which runs as
99 a separate program, is used. It is part of the test suite and is documented
100 there. This ensures complete control over the exact results of any DNS lookups.
102 An attempt to look up a PTR record for 99.99.99.99 or an IP address for a host
103 whose name ends with .test.again.dns always yields a "try again" error.
105 A fake function is called instead of gethostbyname(). It recognizes the name
106 "manyhome.test.ex" and generates a humungous number of IP addresses. It also
107 recognizes an unqualified "localhost" and forces it to the appropriate loopback
108 address (IPv4 or IPv6, as required). IP addresses are treated as literals. For
109 other names, it does a DNS lookup (which of course actually calls the fake
110 resolver) to find the host name.
116 If unknown_login is set, it forces the login name, thus overriding the actual
117 login for the test suite caller. When this happens, unknown_username provides a
118 user name if it is set; otherwise an empty string is used.
124 If -bh is used and both the sending host port and the incoming interface port
125 are supplied, an ident (RFC 1413) call is made for testing purposes.
131 Debugging output from the function that waits for the clock to tick at an
132 appropriate resolution (before completing the arrival of a message, for
133 example) is suppressed because the fractions of seconds that it contains will