diff options
author | Paul Moore <paul@paul-moore.com> | 2017-02-03 08:52:01 -0500 |
---|---|---|
committer | Paul Moore <paul@paul-moore.com> | 2017-02-03 08:52:01 -0500 |
commit | ce5aea6a4ae7523b57ec13e2e6150aa5d83c1b4e (patch) | |
tree | b83759c9f007fc76620c0498f07333d31c7123c2 /tests/24-live-arg_allow.py | |
parent | f6a4e747ca16d6a7acfafe934aa4d0671b4fa70e (diff) | |
download | libseccomp-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-x | tests/24-live-arg_allow.py | 4 |
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: |