[PATCH 15/17] tests: Skip some test cases when MCC is enabled

Ilan Peer ilan.peer at intel.com
Mon Jul 27 15:24:32 EDT 2015


Some tests assume that only a single channel is used. Skip,
such tests/checks when MCC is enabled.

Signed-off-by: Ilan Peer <ilan.peer at intel.com>
---
 tests/hwsim/test_p2p_concurrency.py | 4 ++++
 tests/hwsim/test_p2p_messages.py    | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/tests/hwsim/test_p2p_concurrency.py b/tests/hwsim/test_p2p_concurrency.py
index dc63596..69810e1 100644
--- a/tests/hwsim/test_p2p_concurrency.py
+++ b/tests/hwsim/test_p2p_concurrency.py
@@ -20,6 +20,7 @@ from test_p2p_persistent import invite_from_cli
 from test_p2p_persistent import invite_from_go
 from test_p2p_persistent import invite
 from test_ap_ht import clear_scan_cache
+from utils import HwsimSkip
 
 def test_concurrent_autogo(dev, apdev):
     """Concurrent P2P autonomous GO"""
@@ -265,6 +266,9 @@ def test_concurrent_persistent_group(dev, apdev):
 
 def test_concurrent_invitation_channel_mismatch(dev, apdev):
     """P2P persistent group invitation and channel mismatch"""
+    if dev[0].get_mcc() > 1:
+        raise HwsimSkip("Skip due MCC being enabled")
+
     form(dev[0], dev[1])
     dev[0].dump_monitor()
     dev[1].dump_monitor()
diff --git a/tests/hwsim/test_p2p_messages.py b/tests/hwsim/test_p2p_messages.py
index 1fca571..bd88a4d 100644
--- a/tests/hwsim/test_p2p_messages.py
+++ b/tests/hwsim/test_p2p_messages.py
@@ -894,7 +894,7 @@ def test_p2p_msg_invitation_req_to_go(dev, apdev):
         raise Exception("Not a P2P Public Action frame " + str(dialog_token))
     if p2p['subtype'] != P2P_INVITATION_RESP:
         raise Exception("Unexpected subtype %d" % p2p['subtype'])
-    if p2p['p2p_status'] != 7:
+    if p2p['p2p_status'] != 7 and dev[1].get_mcc() <= 1:
         raise Exception("Unexpected status %d" % p2p['p2p_status'])
 
 def test_p2p_msg_invitation_req_unknown(dev, apdev):
-- 
1.9.1



More information about the HostAP mailing list