Open kloczek opened 3 years ago
It seems to me this cannot work on Fedora, because sysctl kernel/core_pattern
is set to kernel.core_pattern = |/usr/lib/systemd/systemd-coredump %P %u %g %s %t %c %h
. That means it does not create core dumps in current directory, where is kyua looking for them.
I think it should read sysctl kernel.core_pattern, if it starts with |, just skip the stacktrace tests. It is possible to skip tests using variable run_coredump_tests=false, according to commit 9db79a61e0a968098f86edecb203938dd3363a39. That is part of 0.13 release, but there is no simple way to pass it to make check.
It seems the variable does not help much.
<mock-chroot> sh-5.1# pwd
/builddir/build/BUILD/kyua-0.13/utils
<mock-chroot> sh-5.1# ../local-kyua --variable run_coredump_tests=false --loglevel debug debug stacktrace_test:dump_stacktrace__ok
Looking for 'exited with signal [0-9]* and dumped' in 'Process with PID 19163 exited with signal 6 and dumped core; attempting to gather stack trace'
Looking for '^frame 1$' in 'Process with PID 19163 exited with signal 6 and dumped core; attempting to gather stack trace'
Looking for '^frame 1$' in 'Cannot find any core file'
20210209-174925 D 19162 utils/env.cpp:152: Setting environment variable 'PATH' to '.'
20210209-174925 D 19162 utils/env.cpp:114: Environment variable 'TMPDIR' is '/tmp/kyua.i092k4/2/work'
20210209-174925 D 19162 utils/stacktrace.cpp:257: Raising soft core size limit to 18446744073709551615 (hard value)
20210209-174925 D 19162 utils/process/child.cpp:289: Spawned process 19163: stdout=/tmp/kyua.i092k4/2/work/kyua.yQqzY7/1/stdout.txt, stderr=/tmp/kyua.i092k4/2/work/kyua.yQqzY7/1/stderr.txt
20210209-174925 D 19162 utils/signals/timer.cpp:254: Installing first timer; firing on 1612893025441919us; now is 1612892965441919us
20210209-174925 I 19162 utils/process/executor.cpp:782: Spawned subprocess with exec_handle 19163
20210209-174925 D 19162 utils/process/operations.cpp:99: Waiting for pid=19163
20210209-174925 I 19162 utils/process/executor.cpp:634: Waited for subprocess with exec_handle 19163
20210209-174925 D 19162 utils/signals/timer.cpp:319: Unprogramming timer; previously firing on 1612893025441919us
20210209-174925 D 19162 utils/signals/timer.cpp:276: Unprogramming all timers
20210209-174925 D 19162 utils/env.cpp:92: Environment variable 'PATH' is '.'
20210209-174925 D 19162 utils/stacktrace.cpp:226: Attempting core file candidate /tmp/kyua.i092k4/2/work/kyua.yQqzY7/1/work/short.core: not found
20210209-174925 D 19162 utils/stacktrace.cpp:226: Attempting core file candidate /tmp/kyua.i092k4/2/work/kyua.yQqzY7/1/work/core.19163: not found
20210209-174925 D 19162 utils/stacktrace.cpp:226: Attempting core file candidate /cores/core.19163: not found
20210209-174925 W 19162 utils/signals/programmer.cpp:107: Destroying still-programmed signals::programmer object
20210209-174925 W 19162 utils/signals/programmer.cpp:107: Destroying still-programmed signals::programmer object
20210209-174925 W 19162 utils/signals/programmer.cpp:107: Destroying still-programmed signals::programmer object
Files left in work directory after failure: fake-gdb, kyua.yQqzY7
stacktrace_test:dump_stacktrace__ok -> failed: Line 419: atf::utils::grep_file("^frame 1$", exit_handle.stderr_file().str()) not met
Used sed -e 's/name="stacktrace_test"/&,required_configs="enable_stacktrace"/' -i utils/Kyuafile
from spec file. Current tests are failing on Fedora Rawhide, on 32b platforms and on ppc64le.