mirror of
https://github.com/apache/httpd.git
synced 2025-08-01 16:41:19 +00:00
Minor CI changes:
- Add --enable-reduced-exports test. - test running apachectl -V in the TEST_INSTALL case - test running httpd -V in the SKIP_TESTING case - rejig to exit if SKIP_TESTING, un-nest the if block around testing (no functional change from this part) Github: closes #405 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1915513 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
5
.github/workflows/linux.yml
vendored
5
.github/workflows/linux.yml
vendored
@ -248,6 +248,11 @@ jobs:
|
||||
TEST_INSTALL=1
|
||||
TEST_MOD_TLS=1
|
||||
CLEAR_CACHE=1
|
||||
- name: Configured w/reduced exports
|
||||
config: --enable-reduced-exports --enable-maintainer-mode
|
||||
env: |
|
||||
SKIP_TESTING=1
|
||||
TEST_INSTALL=1
|
||||
# -------------------------------------------------------------------------
|
||||
### TODO if: *condition_not_24x
|
||||
### TODO: Fails because :i386 packages are not being found.
|
||||
|
@ -86,6 +86,8 @@ make $MFLAGS
|
||||
if test -v TEST_INSTALL; then
|
||||
make install
|
||||
pushd $PREFIX
|
||||
# Basic sanity tests of the installed server.
|
||||
./bin/apachectl -V
|
||||
test `./bin/apxs -q PREFIX` = $PREFIX
|
||||
test `$PWD/bin/apxs -q PREFIX` = $PREFIX
|
||||
./bin/apxs -g -n foobar
|
||||
@ -93,32 +95,43 @@ if test -v TEST_INSTALL; then
|
||||
popd
|
||||
fi
|
||||
|
||||
if ! test -v SKIP_TESTING; then
|
||||
set +e
|
||||
RV=0
|
||||
if test -v SKIP_TESTING; then
|
||||
# Check that httpd was built successfully, nothing more.
|
||||
./httpd -V
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if test -v TEST_MALLOC; then
|
||||
###############################################################
|
||||
### Everything below is only run if SKIP_TESTING was not set ##
|
||||
###############################################################
|
||||
|
||||
: Running tests...
|
||||
|
||||
set +e
|
||||
RV=0
|
||||
|
||||
if test -v TEST_MALLOC; then
|
||||
# Enable enhanced glibc malloc debugging, see mallopt(3)
|
||||
export MALLOC_PERTURB_=65 MALLOC_CHECK_=3
|
||||
export LIBC_FATAL_STDERR_=1
|
||||
fi
|
||||
fi
|
||||
|
||||
if test -v TEST_UBSAN; then
|
||||
if test -v TEST_UBSAN; then
|
||||
export UBSAN_OPTIONS="log_path=$PWD/ubsan.log"
|
||||
fi
|
||||
fi
|
||||
|
||||
if test -v TEST_ASAN; then
|
||||
if test -v TEST_ASAN; then
|
||||
export ASAN_OPTIONS="log_path=$PWD/asan.log:detect_leaks=0"
|
||||
fi
|
||||
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
|
||||
# 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 NO_TEST_FRAMEWORK; then
|
||||
if ! test -v NO_TEST_FRAMEWORK; then
|
||||
if test -v WITH_TEST_SUITE; then
|
||||
make check TESTS="${TESTS}" TEST_CONFIG="${TEST_ARGS}" | tee test.log
|
||||
RV=${PIPESTATUS[0]}
|
||||
@ -166,9 +179,9 @@ if ! test -v SKIP_TESTING; then
|
||||
if test $RV -eq 0 && test -n "`ls test/perl-framework/t/core{,.*} 2>/dev/null`"; then
|
||||
RV=4
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if test -v TEST_SSL -a $RV -eq 0; then
|
||||
if test -v TEST_SSL -a $RV -eq 0; then
|
||||
pushd test/perl-framework
|
||||
# Test loading encrypted private keys
|
||||
./t/TEST -defines "TEST_SSL_DES3_KEY TEST_SSL_PASSPHRASE_EXEC" t/ssl
|
||||
@ -198,9 +211,9 @@ if ! test -v SKIP_TESTING; then
|
||||
fi
|
||||
done
|
||||
popd
|
||||
fi
|
||||
fi
|
||||
|
||||
if test -v LITMUS -a $RV -eq 0; then
|
||||
if test -v LITMUS -a $RV -eq 0; then
|
||||
pushd test/perl-framework
|
||||
mkdir -p t/htdocs/modules/dav
|
||||
./t/TEST -start
|
||||
@ -210,21 +223,21 @@ if ! test -v SKIP_TESTING; then
|
||||
RV=$?
|
||||
./t/TEST -stop
|
||||
popd
|
||||
fi
|
||||
fi
|
||||
|
||||
if test -v TEST_CORE -a $RV -eq 0; then
|
||||
if test -v TEST_CORE -a $RV -eq 0; then
|
||||
# Run HTTP/2 tests.
|
||||
MPM=event py.test-3 test/modules/core
|
||||
RV=$?
|
||||
fi
|
||||
fi
|
||||
|
||||
if test -v TEST_PROXY -a $RV -eq 0; then
|
||||
if test -v TEST_PROXY -a $RV -eq 0; then
|
||||
# Run proxy tests.
|
||||
py.test-3 test/modules/proxy
|
||||
RV=$?
|
||||
fi
|
||||
fi
|
||||
|
||||
if test -v TEST_H2 -a $RV -eq 0; then
|
||||
if test -v TEST_H2 -a $RV -eq 0; then
|
||||
# Build the test clients
|
||||
(cd test/clients && make)
|
||||
# Run HTTP/2 tests.
|
||||
@ -234,9 +247,9 @@ if ! test -v SKIP_TESTING; then
|
||||
MPM=worker py.test-3 test/modules/http2
|
||||
RV=$?
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if test -v TEST_MD -a $RV -eq 0; then
|
||||
if test -v TEST_MD -a $RV -eq 0; then
|
||||
# Run ACME tests.
|
||||
# need the go based pebble as ACME test server
|
||||
# which is a package on debian sid, but not on focal
|
||||
@ -253,53 +266,52 @@ if ! test -v SKIP_TESTING; then
|
||||
|
||||
py.test-3 test/modules/md
|
||||
RV=$?
|
||||
fi
|
||||
fi
|
||||
|
||||
if test -v TEST_MOD_TLS -a $RV -eq 0; then
|
||||
if test -v TEST_MOD_TLS -a $RV -eq 0; then
|
||||
# Run mod_tls tests. The underlying librustls was build
|
||||
# and installed before we configured the server (see top of file).
|
||||
# This will be replaved once librustls is available as a package.
|
||||
py.test-3 test/modules/tls
|
||||
RV=$?
|
||||
fi
|
||||
fi
|
||||
|
||||
# Catch cases where abort()s get logged to stderr by libraries but
|
||||
# only cause child processes to terminate e.g. during shutdown,
|
||||
# which may not otherwise trigger test failures.
|
||||
# Catch cases where abort()s get logged to stderr by libraries but
|
||||
# only cause child processes to terminate e.g. during shutdown,
|
||||
# which may not otherwise trigger test failures.
|
||||
|
||||
# "glibc detected": printed with LIBC_FATAL_STDERR_/MALLOC_CHECK_
|
||||
# glibc will abort when malloc errors are detected. This will get
|
||||
# caught by the segfault grep as well.
|
||||
# "glibc detected": printed with LIBC_FATAL_STDERR_/MALLOC_CHECK_
|
||||
# glibc will abort when malloc errors are detected. This will get
|
||||
# caught by the segfault grep as well.
|
||||
|
||||
# "pool concurrency check": printed by APR built with
|
||||
# --enable-thread-debug when an APR pool concurrency check aborts
|
||||
# "pool concurrency check": printed by APR built with
|
||||
# --enable-thread-debug when an APR pool concurrency check aborts
|
||||
|
||||
for phrase in 'Segmentation fault' 'glibc detected' 'pool concurrency check:' 'Assertion.*failed'; do
|
||||
for phrase in 'Segmentation fault' 'glibc detected' 'pool concurrency check:' 'Assertion.*failed'; do
|
||||
# Ignore IO/debug logs
|
||||
if grep -v ':\(debug\|trace[12345678]\)\]' test/perl-framework/t/logs/error_log | grep -q "$phrase"; then
|
||||
grep --color=always -C5 "$phrase" test/perl-framework/t/logs/error_log
|
||||
RV=2
|
||||
fi
|
||||
done
|
||||
done
|
||||
|
||||
if test -v TEST_UBSAN && test -n "`ls ubsan.log.* 2>/dev/null`"; then
|
||||
if test -v TEST_UBSAN && test -n "`ls ubsan.log.* 2>/dev/null`"; then
|
||||
cat ubsan.log.*
|
||||
RV=3
|
||||
fi
|
||||
fi
|
||||
|
||||
if test -v TEST_ASAN && test -n "`ls asan.log.* 2>/dev/null`"; then
|
||||
if test -v TEST_ASAN && test -n "`ls asan.log.* 2>/dev/null`"; then
|
||||
cat asan.log.*
|
||||
|
||||
# ASan can report memory leaks, fail on errors only
|
||||
if grep -q "ERROR: AddressSanitizer:" `ls asan.log.*`; then
|
||||
RV=4
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
for core in `ls test/perl-framework/t/core{,.*} test/gen/apache/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
|
||||
done
|
||||
|
||||
exit $RV
|
||||
fi
|
||||
exit $RV
|
||||
|
Reference in New Issue
Block a user