Closed perillo closed 5 months ago
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 65.72%. Comparing base (
692d41c
) to head (402b735
). Report is 3 commits behind head on master.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
For the reason of the ptrace
error with the old test, see
https://bugs.launchpad.net/ubuntu/+source/linux-signed/+bug/1860822
In Linux, process tracing is tied with the process dumping flag. The dumpable flag is cleared at execve(2) time when a setuid or setgid application is executed. This flag persists to child processes created by fork(2) and will only be reset when a process calls execve(2) again.
> stat -L /usr/bin/python3
Access: (0755/-rwxr-xr-x) Uid: ( 0/ root) Gid: ( 0/ root)
stat tests/python/short-test.py
Access: (0750/-rwxr-x---) Uid: ( 1000/ manlio) Gid: ( 1000/ manlio)
The kcov test suite runs correctly on my system, without using sudo and with /proc/sys/kernel/yama/ptrace_scope
set to 1
(the default value).
OK, thanks for the PR and the well-made analysis! Merged!
Commit 4b4cb9c (Merge pull request #426 from perillo/fix-argv-parsing) added a regression test, but the test failed due to
ptrace
errors on Linux. The "Operation not permitted" error was caused bykcov
trying to trace the "/bin/usr/python".The solution is to execute an executable having user permission. Restore the
short-test.py
executable, and use it instead ofpython
.short-test.py
always exits with exit status 0.