From: Jouni Malinen Date: Thu, 28 Jul 2022 13:56:21 +0000 (+0300) Subject: tests: Fix p2p_channel_avoid3 X-Git-Tag: hostap_2_11~1782 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7fa67861ae5d886a2226a985f2c8a201b718afce;p=thirdparty%2Fhostap.git tests: Fix p2p_channel_avoid3 This test case assumed that the p2p_pref_chan 128:44 parameter would have resulted in channel 44 (5220 MHz) being selected. That does not work anymore since that channel was marked to require DFS/radar detection in regdb. Fix the text case by changing to use another country with rules that match the test case expectations. Signed-off-by: Jouni Malinen --- diff --git a/tests/hwsim/test_p2p_channel.py b/tests/hwsim/test_p2p_channel.py index d57234dad..049d6b860 100644 --- a/tests/hwsim/test_p2p_channel.py +++ b/tests/hwsim/test_p2p_channel.py @@ -227,13 +227,13 @@ def test_p2p_channel_avoid3(dev): """P2P and avoid frequencies driver event on 5 GHz""" try: dev[0].global_request("SET p2p_pref_chan 128:44") - set_country("CN", dev[0]) + set_country("CO", dev[0]) form(dev[0], dev[1]) - set_country("CN", dev[0]) + set_country("CO", dev[0]) [i_res, r_res] = invite_from_go(dev[0], dev[1], terminate=False, extra="ht40 vht") freq = int(i_res['freq']) - if freq < 5000: + if freq != 5220: raise Exception("Unexpected channel %d MHz" % freq) if "OK" not in dev[0].request("DRIVER_EVENT AVOID_FREQUENCIES 5180-5320,5500-5640"):