summaryrefslogtreecommitdiff
path: root/tests/24-live-arg_allow.py
diff options
context:
space:
mode:
authorPaul Moore <paul@paul-moore.com>2017-02-03 08:52:01 -0500
committerPaul Moore <paul@paul-moore.com>2017-02-03 08:52:01 -0500
commitce5aea6a4ae7523b57ec13e2e6150aa5d83c1b4e (patch)
treeb83759c9f007fc76620c0498f07333d31c7123c2 /tests/24-live-arg_allow.py
parentf6a4e747ca16d6a7acfafe934aa4d0671b4fa70e (diff)
downloadlibseccomp-ce5aea6a4ae7523b57ec13e2e6150aa5d83c1b4e.tar.gz
python: add support for Python 3.x
This patch adds the necessary tweaks to support building against Python v2.x and v3.x. In the process we also fix some problems with the Python live tests; it is unclear when they broke, but they are working now. Tested on Python v2.7.13 and v3.6.0. Signed-off-by: Paul Moore <paul@paul-moore.com>
Diffstat (limited to 'tests/24-live-arg_allow.py')
-rwxr-xr-xtests/24-live-arg_allow.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/24-live-arg_allow.py b/tests/24-live-arg_allow.py
index 019c8a8..51e6110 100755
--- a/tests/24-live-arg_allow.py
+++ b/tests/24-live-arg_allow.py
@@ -35,7 +35,7 @@ def test():
quit(1)
util.install_trap()
- fd = os.open("/dev/null", os.O_WRONLY|os.O_CREAT, 0600)
+ fd = os.open("/dev/null", os.O_WRONLY|os.O_CREAT)
f = SyscallFilter(TRAP)
# NOTE: additional syscalls required for python
@@ -48,7 +48,7 @@ def test():
f.load()
try:
- if not os.write(fd, "testing") == len("testing"):
+ if not os.write(fd, b"testing") == len("testing"):
raise IOError("failed to write the full test string")
quit(160)
except OSError as ex: