From 26cf800d11e4c8345aed3ed80039e839998dee64 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Sat, 26 Apr 2014 17:05:57 +0300 Subject: [PATCH] tests: id_str in network configuration Signed-off-by: Jouni Malinen --- tests/hwsim/test_ap_open.py | 13 +++++++++++++ tests/hwsim/wpasupplicant.py | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/tests/hwsim/test_ap_open.py b/tests/hwsim/test_ap_open.py index 46a474a5c..74f6038dc 100644 --- a/tests/hwsim/test_ap_open.py +++ b/tests/hwsim/test_ap_open.py @@ -107,3 +107,16 @@ def test_ap_open_assoc_timeout(dev, apdev): ev = dev[0].wait_event(["CTRL-EVENT-CONNECTED"], timeout=15) if ev is None: raise Exception("Timeout on connection") + +def test_ap_open_id_str(dev, apdev): + """AP with open mode and id_str""" + hapd = hostapd.add_ap(apdev[0]['ifname'], { "ssid": "open" }) + dev[0].connect("open", key_mgmt="NONE", scan_freq="2412", id_str="foo", + wait_connect=False) + ev = dev[0].wait_event(["CTRL-EVENT-CONNECTED"]) + if ev is None: + raise Exception("Association with the AP timed out") + if "id_str=foo" not in ev: + raise Exception("CTRL-EVENT-CONNECT did not have matching id_str: " + ev) + if dev[0].get_status_field("id_str") != "foo": + raise Exception("id_str mismatch") diff --git a/tests/hwsim/wpasupplicant.py b/tests/hwsim/wpasupplicant.py index 8733cae90..24d5dbfe0 100644 --- a/tests/hwsim/wpasupplicant.py +++ b/tests/hwsim/wpasupplicant.py @@ -648,7 +648,7 @@ class WpaSupplicant: "private_key_passwd", "ca_cert2", "client_cert2", "private_key2", "phase1", "phase2", "domain_suffix_match", "altsubject_match", "subject_match", "pac_file", "dh_file", - "bgscan", "ht_mcs" ] + "bgscan", "ht_mcs", "id_str" ] for field in quoted: if field in kwargs and kwargs[field]: self.set_network_quoted(id, field, kwargs[field])