]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: Modify pmksa_cache test sets for python3
authorMasashi Honma <masashi.honma@gmail.com>
Thu, 24 Jan 2019 07:46:19 +0000 (16:46 +0900)
committerJouni Malinen <j@w1.fi>
Sat, 26 Jan 2019 11:15:40 +0000 (13:15 +0200)
Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
tests/hwsim/test_pmksa_cache.py

index 9353ae1dda0e8b36477d069e6501f432ac273f9e..5e46c1176dcc857e5fbf1e8f5ea58548f7170d2d 100644 (file)
@@ -1038,8 +1038,8 @@ def test_rsn_preauth_processing(dev, apdev):
                          socket.htons(0x88c7))
     sock.bind(("lo", socket.htons(0x88c7)))
 
-    foreign = "\x02\x03\x04\x05\x06\x07"
-    proto = "\x88\xc7"
+    foreign = b"\x02\x03\x04\x05\x06\x07"
+    proto = b"\x88\xc7"
     tests = []
     # RSN: too short pre-auth packet (len=14)
     tests += [ _bssid + foreign + proto ]
@@ -1077,9 +1077,9 @@ def test_rsn_preauth_local_errors(dev, apdev):
                          socket.htons(0x88c7))
     sock.bind(("lo", socket.htons(0x88c7)))
 
-    foreign = "\x02\x03\x04\x05\x06\x07"
-    foreign2 = "\x02\x03\x04\x05\x06\x08"
-    proto = "\x88\xc7"
+    foreign = b"\x02\x03\x04\x05\x06\x07"
+    foreign2 = b"\x02\x03\x04\x05\x06\x08"
+    proto = b"\x88\xc7"
 
     with alloc_fail(hapd, 1, "ap_sta_add;rsn_preauth_receive"):
         sock.send(_bssid + foreign + proto + struct.pack('>BBH', 2, 1, 0))