diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/modules/http2/test_600_h2proxy.py | 6 | ||||
-rw-r--r-- | test/pyhttpd/conf/mime.types | 2 | ||||
-rw-r--r-- | test/pyhttpd/env.py | 5 | ||||
-rwxr-xr-x | test/travis_before_linux.sh | 24 | ||||
-rwxr-xr-x | test/travis_run_linux.sh | 27 |
5 files changed, 37 insertions, 27 deletions
diff --git a/test/modules/http2/test_600_h2proxy.py b/test/modules/http2/test_600_h2proxy.py index 040aef6..18d5d1d 100644 --- a/test/modules/http2/test_600_h2proxy.py +++ b/test/modules/http2/test_600_h2proxy.py @@ -78,8 +78,8 @@ class TestH2Proxy: conf.install() assert env.apache_restart() == 0 url = env.mkurl("https", "cgi", f"/h2proxy/{env.http_port}/hello.py") - # httpd 2.5.0 disables reuse, not matter the config - if enable_reuse == "on" and not env.httpd_is_at_least("2.5.0"): + # httpd 2.4.59 disables reuse, not matter the config + if enable_reuse == "on" and not env.httpd_is_at_least("2.4.59"): # reuse is not guaranteed for each request, but we expect some # to do it and run on a h2 stream id > 1 reused = False @@ -132,7 +132,7 @@ class TestH2Proxy: assert int(r.json[0]["port"]) == env.http_port assert r.response["status"] == 200 exp_port = env.http_port if enable_reuse == "on" \ - and not env.httpd_is_at_least("2.5.0")\ + and not env.httpd_is_at_least("2.4.59")\ else env.http_port2 assert int(r.json[1]["port"]) == exp_port diff --git a/test/pyhttpd/conf/mime.types b/test/pyhttpd/conf/mime.types index b90b165..2db5c09 100644 --- a/test/pyhttpd/conf/mime.types +++ b/test/pyhttpd/conf/mime.types @@ -1,6 +1,6 @@ # This file maps Internet media types to unique file extension(s). # Although created for httpd, this file is used by many software systems -# and has been placed in the public domain for unlimited redisribution. +# and has been placed in the public domain for unlimited redistribution. # # The table below contains both registered and (common) unregistered types. # A type that has no unique extension can be ignored -- they are listed diff --git a/test/pyhttpd/env.py b/test/pyhttpd/env.py index d79ff6f..1d4e8b1 100644 --- a/test/pyhttpd/env.py +++ b/test/pyhttpd/env.py @@ -575,8 +575,13 @@ class HttpdTestEnv: with open(self._test_conf, 'w') as fd: fd.write('\n'.join(self._httpd_base_conf)) fd.write('\n') + fd.write(f"CoreDumpDirectory {self._server_dir}\n") if self._verbosity >= 2: fd.write(f"LogLevel core:trace5 {self.mpm_module}:trace5 http:trace5\n") + if self._verbosity >= 3: + fd.write(f"LogLevel dumpio:trace7\n") + fd.write(f"DumpIoOutput on\n") + fd.write(f"DumpIoInput on\n") if self._log_interesting: fd.write(self._log_interesting) fd.write('\n\n') diff --git a/test/travis_before_linux.sh b/test/travis_before_linux.sh index 23214f5..2722c6a 100755 --- a/test/travis_before_linux.sh +++ b/test/travis_before_linux.sh @@ -71,11 +71,6 @@ function install_apx() { # Blow away the cached install root if the cached install is stale # or doesn't match the expected configuration. grep -q "${version} ${revision} ${config} CC=$CC" ${HOME}/root/.key-${name} || rm -rf ${prefix} - # TEST_H2 APR cache seems to be broken, do not use. - # Unknown why this happens on this CI job only and how to fix it - if test -v TEST_H2; then - rm -rf ${prefix} - fi if test -d ${prefix}; then return 0 @@ -93,10 +88,11 @@ function install_apx() { } # Allow to load $HOME/build/apache/httpd/.gdbinit -echo "add-auto-load-safe-path $HOME/build/apache/httpd/.gdbinit" >> $HOME/.gdbinit +echo "add-auto-load-safe-path $HOME/work/httpd/httpd/.gdbinit" >> $HOME/.gdbinit -# Prepare perl-framework test environment -if ! test -v SKIP_TESTING; then +# Unless either SKIP_TESTING or NO_TEST_FRAMEWORK are set, install +# CPAN modules required to run the Perl test framework. +if ! test -v SKIP_TESTING -o -v NO_TEST_FRAMEWORK; then # Clear CPAN cache if necessary if [ -v CLEAR_CACHE ]; then rm -rf ~/perl5; fi @@ -176,3 +172,15 @@ if test -v APU_VERSION; then install_apx apr-util ${APU_VERSION} "${APU_CONFIG}" --with-apr=$HOME/build/apr-${APR_VERSION} ldd $HOME/root/apr-util-${APU_VERSION}/lib/libaprutil-?.so || true fi + +# Since librustls is not a package (yet) on any platform, we +# build the version we want from source +if test -v TEST_MOD_TLS -a -v RUSTLS_VERSION; then + if ! test -d $HOME/root/rustls; then + RUSTLS_HOME="$HOME/build/rustls-ffi" + git clone -q --depth=1 -b "$RUSTLS_VERSION" https://github.com/rustls/rustls-ffi.git "$RUSTLS_HOME" + pushd "$RUSTLS_HOME" + make install DESTDIR="$HOME/root/rustls" + popd + fi +fi diff --git a/test/travis_run_linux.sh b/test/travis_run_linux.sh index e953fbd..373e666 100755 --- a/test/travis_run_linux.sh +++ b/test/travis_run_linux.sh @@ -31,9 +31,9 @@ fi PREFIX=${PREFIX:-$HOME/build/httpd-root} -# For trunk, "make check" is sufficient to run the test suite. -# For 2.4.x, the test suite must be run manually -if test ! -v SKIP_TESTING; then +# If perl-framework testing is required it is checked out here by +# _before_linux.sh: +if test -d test/perl-framework; then CONFIG="$CONFIG --enable-load-all-modules" if grep -q ^check: Makefile.in; then CONFIG="--with-test-suite=test/perl-framework $CONFIG" @@ -54,16 +54,9 @@ else CONFIG="$CONFIG --with-apr-util=/usr" fi -# Since librustls is not a package (yet) on any platform, we -# build the version we want from source -if test -v TEST_MOD_TLS; then - RUSTLS_HOME="$HOME/build/rustls-ffi" - RUSTLS_VERSION="v0.10.0" - git clone -b "$RUSTLS_VERSION" https://github.com/rustls/rustls-ffi.git "$RUSTLS_HOME" - pushd "$RUSTLS_HOME" - make install DESTDIR="$PREFIX" - popd - CONFIG="$CONFIG --with-tls --with-rustls=$PREFIX" +# Pick up the rustls install built previously. +if test -v TEST_MOD_TLS -a RUSTLS_VERSION; then + CONFIG="$CONFIG --with-tls --with-rustls=$HOME/root/rustls" fi if test -v TEST_OPENSSL3; then @@ -106,11 +99,15 @@ if ! test -v SKIP_TESTING; then fi if test -v TEST_ASAN; then - export ASAN_OPTIONS="log_path=$PWD/asan.log" + export ASAN_OPTIONS="log_path=$PWD/asan.log:detect_leaks=0" fi # Try to keep all potential coredumps from all processes sudo sysctl -w kernel.core_uses_pid=1 2>/dev/null || true + # Systemd based systems might process core dumps via systemd-coredump. + # But we want to have local unprocessed files. + sudo sysctl -w kernel.core_pattern=core || true + ulimit -c unlimited 2>/dev/null || true if test -v WITH_TEST_SUITE; then make check TESTS="${TESTS}" TEST_CONFIG="${TEST_ARGS}" @@ -259,7 +256,7 @@ if ! test -v SKIP_TESTING; then fi fi - for core in `ls test/perl-framework/t/core{,.*} 2>/dev/null`; do + for core in `ls test/perl-framework/t/core{,.*} test/gen/apache/core{,.*} 2>/dev/null`; do gdb -ex 'thread apply all backtrace full' -batch ./httpd "$core" RV=5 done |