diff options
author | Nick Mathewson <nickm@torproject.org> | 2018-07-03 09:48:03 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2018-07-03 09:48:03 -0400 |
commit | 4c094436c50a489d2ecdd09b8dfb7dc9a3c97389 (patch) | |
tree | b718d951b9f226c85654b0254c16a7fe5fd8ace0 | |
parent | 9aeef05f8f56f16c9ff7e147ca313cc7bab88eda (diff) | |
parent | a4e8f945077b8eebbbd5be85f89b1631305ce1cc (diff) | |
download | tor-4c094436c50a489d2ecdd09b8dfb7dc9a3c97389.tar.gz tor-4c094436c50a489d2ecdd09b8dfb7dc9a3c97389.zip |
Merge branch 'maint-0.3.2' into maint-0.3.3
-rw-r--r-- | changes/bug26535.029 | 5 | ||||
-rw-r--r-- | changes/bug26535.032 | 5 | ||||
-rw-r--r-- | src/test/hs_ntor_ref.py | 7 | ||||
-rwxr-xr-x | src/test/ntor_ref.py | 9 |
4 files changed, 21 insertions, 5 deletions
diff --git a/changes/bug26535.029 b/changes/bug26535.029 new file mode 100644 index 0000000000..111b539f17 --- /dev/null +++ b/changes/bug26535.029 @@ -0,0 +1,5 @@ + o Minor bugfixes (testing, compatibility): + - When running the ntor_ref.py test, make sure only to pass strings + (rather than "bytes" objects) to the Python subprocess module. + Python 3 on Windows seems to require this. Fixes bug 26535; bugfix on + 0.2.5.5-alpha. diff --git a/changes/bug26535.032 b/changes/bug26535.032 new file mode 100644 index 0000000000..395d08d816 --- /dev/null +++ b/changes/bug26535.032 @@ -0,0 +1,5 @@ + o Minor bugfixes (testing, compatibility): + - When running the hs_ntor_ref.py test, make sure only to pass strings + (rather than "bytes" objects) to the Python subprocess module. + Python 3 on Windows seems to require this. Fixes bug 26535; bugfix on + 0.3.1.1-alpha. diff --git a/src/test/hs_ntor_ref.py b/src/test/hs_ntor_ref.py index 2ed9324e1f..542b02d2e0 100644 --- a/src/test/hs_ntor_ref.py +++ b/src/test/hs_ntor_ref.py @@ -234,8 +234,11 @@ Utilities for communicating with the little-t-tor ntor wrapper to conduct the integration tests """ -PROG = b"./src/test/test-hs-ntor-cl" -enhex=lambda s: binascii.b2a_hex(s) +PROG = "./src/test/test-hs-ntor-cl" +if sys.version_info[0] >= 3: + enhex=lambda s: binascii.b2a_hex(s).decode("ascii") +else: + enhex=lambda s: binascii.b2a_hex(s) dehex=lambda s: binascii.a2b_hex(s.strip()) def tor_client1(intro_auth_pubkey_str, intro_enc_pubkey, diff --git a/src/test/ntor_ref.py b/src/test/ntor_ref.py index c753588f97..51f218f512 100755 --- a/src/test/ntor_ref.py +++ b/src/test/ntor_ref.py @@ -336,13 +336,16 @@ def test_tor(): Call the test-ntor-cl command-line program to make sure we can interoperate with Tor's ntor program """ - enhex=lambda s: binascii.b2a_hex(s) + if sys.version_info[0] >= 3: + enhex=lambda s: binascii.b2a_hex(s).decode("ascii") + else: + enhex=lambda s: binascii.b2a_hex(s) dehex=lambda s: binascii.a2b_hex(s.strip()) - PROG = b"./src/test/test-ntor-cl" + PROG = "./src/test/test-ntor-cl" def tor_client1(node_id, pubkey_B): " returns (msg, state) " - p = subprocess.Popen([PROG, b"client1", enhex(node_id), + p = subprocess.Popen([PROG, "client1", enhex(node_id), enhex(pubkey_B.serialize())], stdout=subprocess.PIPE) return map(dehex, p.stdout.readlines()) |