From 9162eed42b4223f56938876c12290a1d3fd8f4a9 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Sun, 26 Jul 2015 18:11:29 +0300 Subject: [PATCH] tests: Extend fst_ap_ctrl_iface to support existing groups Signed-off-by: Jouni Malinen --- tests/hwsim/test_fst_module.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tests/hwsim/test_fst_module.py b/tests/hwsim/test_fst_module.py index 47f824d31..2814041e8 100644 --- a/tests/hwsim/test_fst_module.py +++ b/tests/hwsim/test_fst_module.py @@ -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",