Skip to content

Commit

Permalink
Tests: Don't require prctl.
Browse files Browse the repository at this point in the history
  • Loading branch information
nelhage committed Jan 27, 2016
1 parent e7f5e02 commit 05b49ef
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions test/tty-steal.py
Expand Up @@ -6,11 +6,13 @@
print("Skipping tty-stealing tests because $NO_TEST_STEAL is set.")
sys.exit(0)

import prctl

PR_SET_PTRACER_ANY = 0xffffffff
if hasattr(prctl, 'set_ptracer'):
prctl.set_ptracer(PR_SET_PTRACER_ANY)
try:
import prctl
PR_SET_PTRACER_ANY = 0xffffffff
if hasattr(prctl, 'set_ptracer'):
prctl.set_ptracer(PR_SET_PTRACER_ANY)
except ImportError:
print("Unable to import `prctl`, skipping `PR_SET_PTRACER`.")

child = pexpect.spawn("test/victim")
child.setecho(False)
Expand Down

0 comments on commit 05b49ef

Please sign in to comment.