You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by jo...@apache.org on 2026/09/16 19:25:25 UTC
svn commit: r1938297 - in httpd/httpd/trunk/test: modules/md pyhttpd
Author: jorton
Date: Wed Sep 16 19:25:25 2026
New Revision: 1938297
Log:
* test/pyhttpd/env.py (apache_fail): Check the exit code of the
"start" result rather than comparing the ExecResult to 0, which
never matched, so a started server was never waited for and could
race with the next test.
* test/modules/md/test_300_conf_validate.py (test_md_300_011a,
test_md_300_021): Expect the server to start, since an unmanaged
vhost name only logs a warning; this was hidden by the broken
apache_fail() check.
Co-Authored-By: Claude Opus 5 (1M context) <no...@anthropic.com>
GitHub: closes #759
Modified:
httpd/httpd/trunk/test/modules/md/test_300_conf_validate.py
httpd/httpd/trunk/test/pyhttpd/env.py
Modified: httpd/httpd/trunk/test/modules/md/test_300_conf_validate.py
==============================================================================
--- httpd/httpd/trunk/test/modules/md/test_300_conf_validate.py Wed Sep 16 18:38:59 2026 (r1938296)
+++ httpd/httpd/trunk/test/modules/md/test_300_conf_validate.py Wed Sep 16 19:25:25 2026 (r1938297)
@@ -204,8 +204,7 @@ class TestConf:
"not-forbidden.org", "test3.not-forbidden.org", "test4.not-forbidden.org"
])
conf.install()
- assert env.apache_fail() == 0
- env.apache_stop()
+ assert env.apache_restart() == 0, f'{env.apachectl_stderr}'
env.httpd_error_log.ignore_recent([
"AH10040" # A requested MD certificate will not match ServerName
])
@@ -344,13 +343,13 @@ class TestConf:
"not.secret.com", "secret.com"
])
conf.install()
- assert env.apache_fail() == 0
- # this is unreliable on debian
- #assert env.httpd_error_log.scan_recent(
- # re.compile(r'.*Virtual Host not.secret.com:0 matches Managed Domain \'secret.com\', '
- # 'but the name/alias not.secret.com itself is not managed. A requested '
- # 'MD certificate will not match ServerName.*'), timeout=10
- #)
+ assert env.apache_restart() == 0, f'{env.apachectl_stderr}'
+ env.httpd_error_log.ignore_recent(
+ lognos = [
+ "AH10040", # A requested MD certificate will not match ServerName
+ "AH10105" # MD secret.com does not match any VirtualHost with 'SSLEngine on'
+ ]
+ )
# test case: use MDRequireHttps in an <if> construct, but not in <Directory
def test_md_300_022(self, env):
Modified: httpd/httpd/trunk/test/pyhttpd/env.py
==============================================================================
--- httpd/httpd/trunk/test/pyhttpd/env.py Wed Sep 16 18:38:59 2026 (r1938296)
+++ httpd/httpd/trunk/test/pyhttpd/env.py Wed Sep 16 19:25:25 2026 (r1938297)
@@ -1009,12 +1009,10 @@ class HttpdTestEnv:
rv = self._win_start()
return 0 if rv != 0 else (0 if self.is_dead() else -1)
self._run_apachectl("stop")
- rv = self._run_apachectl("start")
- if rv == 0:
- rv = 0 if self.is_dead() else -1
- else:
- rv = 0
- return rv
+ r = self._run_apachectl("start")
+ if r.exit_code == 0:
+ return 0 if self.is_dead() else -1
+ return 0
def apache_hard_restart(self) -> int:
"""Restart without the "graceful" flag, so the MPM starts over."""