[PATCH 10/14] tests: GO configured preferred channels are disallowed

Ilan Peer ilan.peer
Tue Jun 10 10:50:38 PDT 2014


From: Avraham Stern <avraham.stern at intel.com>

Verify that when all configured preferred channels are disallowed,
the GO is instantiated on a random channel.

Signed-off-by: Avraham Stern <avraham.stern at intel.com>
---
 tests/hwsim/test_p2p_channel.py |   14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/tests/hwsim/test_p2p_channel.py b/tests/hwsim/test_p2p_channel.py
index d4e68cb..9047731 100644
--- a/tests/hwsim/test_p2p_channel.py
+++ b/tests/hwsim/test_p2p_channel.py
@@ -362,3 +362,17 @@ def test_go_pref_chan_bss_on_diff_chan(dev, apdev):
         test_connectivity(dev[0].ifname, apdev[0]['ifname'])
     finally:
 	dev[0].request("SET p2p_pref_chan ")
+
+def test_p2p_autogo_pref_chan_disallowed(dev, apdev):
+    """P2P channel selection: GO prefered channels are disallowed"""
+    try:
+       dev[0].request("SET p2p_pref_chan 81:1,81:3,81:6,81:9,81:11")
+       dev[0].request("P2P_SET disallow_freq 2412,2422,2437,2452,2462")
+       for i in range(0, 5):
+           res = autogo(dev[0])
+           if res['freq'] in [ "2412", "2422", "2437", "2452", "2462" ]:
+	      raise Exception("GO channel is disallowed")
+           dev[0].remove_group(res['ifname'])
+    finally:
+       dev[0].request("P2P_SET disallow_freq ")
+       dev[0].request("SET p2p_pref_chan ")
-- 
1.7.10.4




More information about the Hostap mailing list