Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tests: fix basic.OutDirectoryIsExecutable #428

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions tests/python/short-test.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#!/usr/bin/python
#!/usr/bin/env python3

import sys

def doSomething():
print 'Hello world'
print('Hello world')


if __name__ == '__main__':
Expand Down
6 changes: 5 additions & 1 deletion tests/tools/basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ def runTest(self):
class OutDirectoryIsExecutable(testbase.KcovTestCase):
def runTest(self):
self.setUp()
rv,o = self.do(testbase.kcov + " echo python -V")
# Running a system executable on Linux may cause ptrace to fails with
# "Operation not permitted", even with ptrace_scope set to 0.
# See https://www.kernel.org/doc/Documentation/security/Yama.txt
executable = testbase.sources + "/tests/python/short-test.py"
rv,o = self.do(testbase.kcov + " echo " + executable)

assert rv == 0
Loading