tests: IBSS and key_mgmt field in STATUS
authorJouni Malinen <j@w1.fi>
Fri, 1 Jul 2016 18:16:20 +0000 (21:16 +0300)
committerJouni Malinen <j@w1.fi>
Sun, 3 Jul 2016 16:13:42 +0000 (19:13 +0300)
Signed-off-by: Jouni Malinen <j@w1.fi>
tests/hwsim/test_ibss.py

index e89ba4f..2095ebc 100644 (file)
@@ -144,6 +144,10 @@ def test_ibss_rsn(dev):
     if "OK" not in dev[0].request("IBSS_RSN " + dev[1].p2p_interface_addr()):
         raise Exception("IBSS_RSN command failed")
 
+    key_mgmt = dev[0].get_status_field("key_mgmt")
+    if key_mgmt != "WPA2-PSK":
+        raise Exception("Unexpected STATUS key_mgmt: " + key_mgmt)
+
 def test_ibss_wpa_none(dev):
     """IBSS WPA-None"""
     ssid="ibss-wpa-none"
@@ -208,6 +212,10 @@ def test_ibss_wpa_none(dev):
     except Exception, e:
         logger.info("Ignoring known connectivity failure: " + str(e))
 
+    key_mgmt = dev[0].get_status_field("key_mgmt")
+    if key_mgmt != "WPA-NONE":
+        raise Exception("Unexpected STATUS key_mgmt: " + key_mgmt)
+
 def test_ibss_wpa_none_ccmp(dev):
     """IBSS WPA-None/CCMP"""
     ssid="ibss-wpa-none"
@@ -280,6 +288,10 @@ def test_ibss_open(dev):
     if freq0 != "2412" or freq1 != "2412":
         raise Exception("IBSS operating frequency not reported correctly (%s %s)" % (freq0, freq1))
 
+    key_mgmt = dev[0].get_status_field("key_mgmt")
+    if key_mgmt != "NONE":
+        raise Exception("Unexpected STATUS key_mgmt: " + key_mgmt)
+
 def test_ibss_open_fixed_bssid(dev):
     """IBSS open (no security) and fixed BSSID"""
     ssid="ibss"