Skip to content

Commit

Permalink
travis: generate/show coredumps from pytests.
Browse files Browse the repository at this point in the history
  • Loading branch information
ylavic committed Feb 9, 2022
1 parent 9c9d9cc commit a3f2d7f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions test/pyhttpd/env.py
Original file line number Diff line number Diff line change
Expand Up @@ -443,6 +443,7 @@ def install_test_conf(self, lines: List[str]):
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\n")
if self._log_interesting:
Expand Down
3 changes: 2 additions & 1 deletion test/travis_run_linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ if ! test -v SKIP_TESTING; then

# Try to keep all potential coredumps from all processes
sudo sysctl -w kernel.core_uses_pid=1 2>/dev/null || true
ulimit -c unlimited 2>/dev/null || true

if ! test -v NO_TEST_FRAMEWORK; then
if test -v WITH_TEST_SUITE; then
Expand Down Expand Up @@ -266,7 +267,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
Expand Down

0 comments on commit a3f2d7f

Please sign in to comment.