]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: Extend fst_ap_ctrl_iface to support existing groups
authorJouni Malinen <j@w1.fi>
Sun, 26 Jul 2015 15:11:29 +0000 (18:11 +0300)
committerJouni Malinen <j@w1.fi>
Sun, 26 Jul 2015 15:12:08 +0000 (18:12 +0300)
Signed-off-by: Jouni Malinen <j@w1.fi>
tests/hwsim/test_fst_module.py

index 47f824d31ecef03734cce9a197b7ac95f5728de1..2814041e885d1533f05c8b0f58ece470d1f7083b 100644 (file)
@@ -1406,6 +1406,13 @@ def test_fst_ap_remove_session_bad_session_id(dev, apdev, test_params):
 
 def test_fst_ap_ctrl_iface(dev, apdev, test_params):
     """FST control interface behavior"""
+    hglobal = hostapd.HostapdGlobal()
+    start_num_groups = 0
+    res = hglobal.request("FST-MANAGER LIST_GROUPS")
+    del hglobal
+    if "FAIL" not in res:
+        start_num_groups = len(res.splitlines())
+
     ap1, ap2, sta1, sta2 = fst_module_aux.start_two_ap_sta_pairs(apdev)
     try:
         fst_module_aux.connect_two_ap_sta_pairs(ap1, ap2, sta1, sta2)
@@ -1435,7 +1442,7 @@ def test_fst_ap_ctrl_iface(dev, apdev, test_params):
             raise Exception("Unexpected number of interfaces")
         res = initiator.list_groups()
         logger.info("Groups: " + str(res))
-        if len(res) != 1:
+        if len(res) != 1 + start_num_groups:
             raise Exception("Unexpected number of groups")
 
         tests = [ "LIST_IFACES unknown",