From db98b587361f7202a3c7310a3efd5c07d2eae14a Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Tue, 27 Dec 2016 17:07:11 +0200 Subject: [PATCH] tests: Remove trailing whitespace Signed-off-by: Jouni Malinen --- tests/hwsim/netlink.py | 2 +- tests/hwsim/rfkill.py | 2 +- tests/hwsim/test_ap_eap.py | 6 +++--- tests/hwsim/test_ap_track.py | 2 +- tests/hwsim/test_ap_wps.py | 2 +- tests/hwsim/test_dbus.py | 2 +- tests/hwsim/test_eap_proto.py | 4 ++-- tests/hwsim/test_p2ps.py | 2 +- 8 files changed, 11 insertions(+), 11 deletions(-) diff --git a/tests/hwsim/netlink.py b/tests/hwsim/netlink.py index 82b6fa22d..eef79090c 100644 --- a/tests/hwsim/netlink.py +++ b/tests/hwsim/netlink.py @@ -163,7 +163,7 @@ class Connection(object): contents = self.descriptor.recv(16384) # XXX: python doesn't give us message flags, check # len(contents) vs. msglen for TRUNC - msglen, msg_type, flags, seq, pid = struct.unpack("IHHII", + msglen, msg_type, flags, seq, pid = struct.unpack("IHHII", contents[:16]) msg = Message(msg_type, flags, seq, contents[16:]) msg.pid = pid diff --git a/tests/hwsim/rfkill.py b/tests/hwsim/rfkill.py index cf73f4fb1..d85d68e1a 100755 --- a/tests/hwsim/rfkill.py +++ b/tests/hwsim/rfkill.py @@ -84,7 +84,7 @@ class RFKill(object): @property def soft_blocked(self): return self.blocked[0] - + @soft_blocked.setter def soft_blocked(self, block): if block: diff --git a/tests/hwsim/test_ap_eap.py b/tests/hwsim/test_ap_eap.py index a82ea088e..073382900 100644 --- a/tests/hwsim/test_ap_eap.py +++ b/tests/hwsim/test_ap_eap.py @@ -2039,7 +2039,7 @@ def test_ap_wpa2_eap_tls_diff_ca_trust(dev, apdev): ev = dev[0].wait_event(["CTRL-EVENT-EAP-PROPOSED-METHOD vendor=0 method=21"], timeout=15) if ev is None: raise Exception("EAP-TTLS not re-started") - + ev = dev[0].wait_disconnected(timeout=15) if "reason=23" not in ev: raise Exception("Proper reason code for disconnection not reported") @@ -2066,7 +2066,7 @@ def test_ap_wpa2_eap_tls_diff_ca_trust2(dev, apdev): ev = dev[0].wait_event(["CTRL-EVENT-EAP-PROPOSED-METHOD vendor=0 method=21"], timeout=15) if ev is None: raise Exception("EAP-TTLS not re-started") - + ev = dev[0].wait_disconnected(timeout=15) if "reason=23" not in ev: raise Exception("Proper reason code for disconnection not reported") @@ -2089,7 +2089,7 @@ def test_ap_wpa2_eap_tls_diff_ca_trust3(dev, apdev): ev = dev[0].wait_event(["CTRL-EVENT-EAP-PROPOSED-METHOD vendor=0 method=21"], timeout=15) if ev is None: raise Exception("EAP-TTLS not re-started") - + ev = dev[0].wait_disconnected(timeout=15) if "reason=23" not in ev: raise Exception("Proper reason code for disconnection not reported") diff --git a/tests/hwsim/test_ap_track.py b/tests/hwsim/test_ap_track.py index 69c96d824..8965af9e6 100644 --- a/tests/hwsim/test_ap_track.py +++ b/tests/hwsim/test_ap_track.py @@ -53,7 +53,7 @@ def _test_ap_track_sta(dev, apdev): raise Exception("Station missing from 2.4 GHz tracking") if addr2 in track: raise Exception("Unexpected station included in 2.4 GHz tracking") - + track = hapd2.request("TRACK_STA_LIST") if addr0 not in track or addr2 not in track: raise Exception("Station missing from 5 GHz tracking") diff --git a/tests/hwsim/test_ap_wps.py b/tests/hwsim/test_ap_wps.py index eeb8da2ca..4f1d0ec03 100644 --- a/tests/hwsim/test_ap_wps.py +++ b/tests/hwsim/test_ap_wps.py @@ -6271,7 +6271,7 @@ def decrypt_attr_encr_settings(authkey, keywrapkey, data): for i in range(-pad_len, -1): if decrypted[i] != decrypted[-1]: raise Exception("Invalid PS value in Encrypted Settings") - + decrypted = decrypted[0:len(decrypted) - pad_len] if len(decrypted) < 12: raise Exception("Truncated Encrypted Settings plaintext") diff --git a/tests/hwsim/test_dbus.py b/tests/hwsim/test_dbus.py index e95fb9421..d7b4b6dfc 100644 --- a/tests/hwsim/test_dbus.py +++ b/tests/hwsim/test_dbus.py @@ -2975,7 +2975,7 @@ def test_dbus_p2p_service_discovery(dev, apdev): bonjour_query = dbus.ByteArray(binascii.unhexlify('0b5f6166706f766572746370c00c000c01')) bonjour_response = dbus.ByteArray(binascii.unhexlify('074578616d706c65c027')) - + args = { 'service_type': 'bonjour', 'query': bonjour_query, 'response': bonjour_response } diff --git a/tests/hwsim/test_eap_proto.py b/tests/hwsim/test_eap_proto.py index fe2dcceba..14509f256 100644 --- a/tests/hwsim/test_eap_proto.py +++ b/tests/hwsim/test_eap_proto.py @@ -5585,7 +5585,7 @@ def test_eap_proto_mschapv2(dev, apdev): auth_challenge = binascii.unhexlify("00112233445566778899aabbccddeeff") logger.info("auth_challenge: " + auth_challenge.encode("hex")) - + auth_resp = GenerateAuthenticatorResponse("new-pw", nt_response, peer_challenge, auth_challenge, "user") @@ -5633,7 +5633,7 @@ def test_eap_proto_mschapv2(dev, apdev): auth_challenge = binascii.unhexlify("00112233445566778899aabbccddeeff") logger.info("auth_challenge: " + auth_challenge.encode("hex")) - + auth_resp = GenerateAuthenticatorResponse("new-pw", nt_response, peer_challenge, auth_challenge, "user") diff --git a/tests/hwsim/test_p2ps.py b/tests/hwsim/test_p2ps.py index 075e440f7..8befaf2a1 100644 --- a/tests/hwsim/test_p2ps.py +++ b/tests/hwsim/test_p2ps.py @@ -767,7 +767,7 @@ def p2ps_connect_p2ps_method(dev, keep_group=False, join_extra="", flush=True): res = dev[1].group_form_result(go_ev) if join_extra == "": join_extra = " freq=" + res['freq'] - + ifnames = get_ifnames() p2ps_connect_pd(dev[0], dev[1], ev0, ev1, join_extra=join_extra, go_ev=go_ev)