diff mbox series

[20/50] tests: Modify cfg80211 test sets for python3

Message ID 20190124074630.4192-21-masashi.honma@gmail.com
State Changes Requested
Headers show
Series Use python3 compatible codes for hwsim tests | expand

Commit Message

Masashi Honma Jan. 24, 2019, 7:46 a.m. UTC
Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
---
 tests/hwsim/test_cfg80211.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/tests/hwsim/test_cfg80211.py b/tests/hwsim/test_cfg80211.py
index b21296140..0890984fc 100644
--- a/tests/hwsim/test_cfg80211.py
+++ b/tests/hwsim/test_cfg80211.py
@@ -19,7 +19,7 @@  from wpasupplicant import WpaSupplicant
 
 def nl80211_command(dev, cmd, attr):
     res = dev.request("VENDOR ffffffff {} {}".format(nl80211_cmd[cmd],
-                                                     binascii.hexlify(attr)))
+                                                     binascii.hexlify(attr).decode()))
     if "FAIL" in res:
         raise Exception("nl80211 command failed")
     return binascii.unhexlify(res)
@@ -70,7 +70,7 @@  def test_cfg80211_tx_frame(dev, apdev, params):
 
     dev[0].p2p_start_go(freq='2412')
     go = WpaSupplicant(dev[0].group_ifname)
-    frame = binascii.unhexlify("d0000000020000000100" + go.own_addr().translate(None, ':') + "02000000010000000409506f9a090001dd5e506f9a0902020025080401001f0502006414060500585804510b0906000200000000000b1000585804510b0102030405060708090a0b0d1d000200000000000108000000000000000000101100084465766963652041110500585804510bdd190050f204104a0001101012000200011049000600372a000120")
+    frame = binascii.unhexlify("d0000000020000000100" + go.own_addr().replace(':', '') + "02000000010000000409506f9a090001dd5e506f9a0902020025080401001f0502006414060500585804510b0906000200000000000b1000585804510b0102030405060708090a0b0d1d000200000000000108000000000000000000101100084465766963652041110500585804510bdd190050f204104a0001101012000200011049000600372a000120")
     ifindex = int(go.get_driver_status_field("ifindex"))
     res = nl80211_frame(go, ifindex, frame, freq=2422, duration=500,
                         offchannel_tx_ok=True)