From: Jonathan Afek Date: Tue, 7 Jun 2016 13:42:41 +0000 (+0300) Subject: tests: Use apdev[0] more consistently in ap_ht X-Git-Tag: hostap_2_6~308 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=6b4300d0c63a17809a8e8e4025921699c608a075;p=thirdparty%2Fhostap.git tests: Use apdev[0] more consistently in ap_ht The test cases ap_ht40_5ghz_invalid_pair and ap_ht40_5ghz_disabled_sec mixed use of apdev[0] and apdev[1] while only needing a single AP. This works when both the devices are on the same host (e.g., with mac80211_hwsim), but not when using separate remote hosts. Fix this by using apdev[0] more consistently in these test cases. Signed-off-by: Jonathan Afek --- diff --git a/tests/hwsim/test_ap_ht.py b/tests/hwsim/test_ap_ht.py index 804e56d04..6048d8a37 100644 --- a/tests/hwsim/test_ap_ht.py +++ b/tests/hwsim/test_ap_ht.py @@ -1122,7 +1122,7 @@ def test_ap_ht40_5ghz_invalid_pair(dev, apdev): "channel": "40", "country_code": "US", "ht_capab": "[HT40+]"} - hapd = hostapd.add_ap(apdev[1], params, wait_enabled=False) + hapd = hostapd.add_ap(apdev[0], params, wait_enabled=False) ev = hapd.wait_event(["AP-DISABLED", "AP-ENABLED"], timeout=10) if not ev: raise Exception("AP setup failure timed out") @@ -1142,7 +1142,7 @@ def test_ap_ht40_5ghz_disabled_sec(dev, apdev): "channel": "48", "country_code": "US", "ht_capab": "[HT40+]"} - hapd = hostapd.add_ap(apdev[1], params, wait_enabled=False) + hapd = hostapd.add_ap(apdev[0], params, wait_enabled=False) ev = hapd.wait_event(["AP-DISABLED", "AP-ENABLED"], timeout=10) if not ev: raise Exception("AP setup failure timed out")