forked from iovisor/bcc
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
python3 fixes and testing support (iovisor#1916)
* python3: check ksymname calls with _assert_is_bytes Fixes a bytes/string concatenation error when get/fix_syscall_fnname is called from a python3 system. * python3: use env python invocation in tools In order to facilitate testing, but not necessarily as an example of good practice, I am changing the invocation of the test tools to use `/usr/bin/env python`, so that we can control which python (2 vs 3) gets invoked for the test. On the buildbots, I plan to add an optional `ln -s /usr/bin/python3 /usr/local/bin/python` on systems that have python3-bcc package built. This way, we get more test coverage. Having a cmake mechanism to enable both python2 and python3 testing could be a further enhancement. * tools/memleak: add an explicit stdout.flush to print loop The stdout flush behavior seems to have changed in python3, breaking one of the tests. I think it makes sense to flush stdout at the end of each timed interval loop anyway, so adding that to the tool itself. * tests: add b'' strings and fix dangling handles Add b'' strings in a few places in the test tools, and fix one dangling process handle in the memleak test tool runner.
- Loading branch information
1 parent
b84714a
commit a296e1e
Showing
9 changed files
with
33 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#!/usr/bin/python | ||
#!/usr/bin/env python | ||
# | ||
# USAGE: test_usdt.py | ||
# | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#!/usr/bin/python | ||
#!/usr/bin/env python | ||
# | ||
# USAGE: test_usdt2.py | ||
# | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#!/usr/bin/python | ||
#!/usr/bin/env python | ||
# | ||
# USAGE: test_usdt3.py | ||
# | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters