Mercurial > dropbear
comparison test/test_aslr.py @ 1863:b550845e500b
Use venv for test_aslr
Otherwise we can't find the psutil dependency
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Sun, 30 Jan 2022 13:37:20 +0800 |
parents | 2b3a8026a6ce |
children | d940f8007a45 |
comparison
equal
deleted
inserted
replaced
1862:6f265a35159a | 1863:b550845e500b |
---|---|
6 def test_reexec(request, dropbear): | 6 def test_reexec(request, dropbear): |
7 """ | 7 """ |
8 Tests that two consecutive connections have different address layouts. | 8 Tests that two consecutive connections have different address layouts. |
9 This indicates that re-exec makes ASLR work | 9 This indicates that re-exec makes ASLR work |
10 """ | 10 """ |
11 cmd = (Path(request.node.fspath).parent / "parent_dropbear_map.py").resolve() | 11 map_script = (Path(request.node.fspath).parent / "parent_dropbear_map.py").resolve() |
12 # run within the same venv, for python deps | |
13 activate = own_venv_command() | |
14 cmd = f"{activate}; {map_script}" | |
15 print(cmd) | |
12 r = dbclient(request, cmd, capture_output=True, text=True) | 16 r = dbclient(request, cmd, capture_output=True, text=True) |
13 map1 = r.stdout.rstrip() | 17 map1 = r.stdout.rstrip() |
14 print(r.stderr, file=sys.stderr) | 18 print(r.stderr, file=sys.stderr) |
15 r.check_returncode() | 19 r.check_returncode() |
16 | 20 |