]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: Move check_wep_capa() into utils.py
authorJouni Malinen <j@w1.fi>
Sat, 18 Apr 2020 08:05:49 +0000 (11:05 +0300)
committerJouni Malinen <j@w1.fi>
Sat, 18 Apr 2020 08:35:32 +0000 (11:35 +0300)
Signed-off-by: Jouni Malinen <j@w1.fi>
13 files changed:
tests/hwsim/test_ap_params.py
tests/hwsim/test_ap_tdls.py
tests/hwsim/test_ap_wps.py
tests/hwsim/test_cfg80211.py
tests/hwsim/test_connect_cmd.py
tests/hwsim/test_ibss.py
tests/hwsim/test_ieee8021x.py
tests/hwsim/test_radius.py
tests/hwsim/test_scan.py
tests/hwsim/test_wep.py
tests/hwsim/test_wext.py
tests/hwsim/test_wpas_ap.py
tests/hwsim/utils.py

index 4c5deb8d565e89406f96772f39e7fac34ef206f8..8b5fdea82acfa24e3b0d92c2443820a5d53ecdcc 100644 (file)
@@ -15,8 +15,7 @@ import time
 import hwsim_utils
 import hostapd
 from tshark import run_tshark
-from utils import alloc_fail, HwsimSkip, parse_ie
-from test_wep import check_wep_capa
+from utils import *
 
 @remote_compatible
 def test_ap_fragmentation_rts_set_high(dev, apdev):
index 1af072263fbb308c33d1ada6422957d337d257ba..de2f02ac10eb0be468e01e3695297300d3f6eb5f 100644 (file)
@@ -17,7 +17,6 @@ import hostapd
 from utils import *
 from wlantest import Wlantest
 from test_ap_vht import vht_supported
-from test_wep import check_wep_capa
 
 def start_ap_wpa2_psk(ap):
     params = hostapd.wpa2_params(ssid="test-wpa2-psk", passphrase="12345678")
index 54e4eaf6ab1ed97547a16a494929c8ed0e166518..c8514b260b25f9122e371a596882e1cbf591d2e5 100644 (file)
@@ -44,7 +44,6 @@ from wpasupplicant import WpaSupplicant
 from utils import *
 from test_ap_eap import int_eap_server_params
 from test_sae import check_sae_capab
-from test_wep import check_wep_capa
 
 def wps_start_ap(apdev, ssid="test-wps-conf"):
     params = {"ssid": ssid, "eap_server": "1", "wps_state": "2",
index 9c7935e700bf704b9c1fb3f865224d3ee484d10b..3ee7a909b8bad14fefa106c261a940fda2ac79bb 100644 (file)
@@ -16,7 +16,7 @@ import hwsim_utils
 from tshark import run_tshark
 from nl80211 import *
 from wpasupplicant import WpaSupplicant
-from test_wep import check_wep_capa
+from utils import *
 
 def nl80211_command(dev, cmd, attr):
     res = dev.request("VENDOR ffffffff {} {}".format(nl80211_cmd[cmd],
index 07a9ab651f50fcf29d4ec613e8bd70134b8e1ad4..3c0985137d41187c21749cb6fe0c177297e5872a 100644 (file)
@@ -12,7 +12,7 @@ import hwsim_utils
 import hostapd
 from wpasupplicant import WpaSupplicant
 from p2p_utils import *
-from test_wep import check_wep_capa
+from utils import *
 
 def test_connect_cmd_open(dev, apdev):
     """Open connection using cfg80211 connect command"""
index 8e688bd73a236bf23cd1d950715bf71cc12e063f..29ebd8129ff135a9054a77af092508762679acbd 100644 (file)
@@ -13,7 +13,6 @@ import subprocess
 
 import hwsim_utils
 from utils import *
-from test_wep import check_wep_capa
 
 def connect_ibss_cmd(dev, id, freq=2412):
     dev.dump_monitor()
index 19469481996bfee12b2fd17ea3c589f79a28bebd..89c282b396e0a78594c9c101e7f31b60feb76c61 100644 (file)
@@ -13,9 +13,8 @@ import time
 
 import hostapd
 import hwsim_utils
-from utils import skip_with_fips
+from utils import *
 from tshark import run_tshark
-from test_wep import check_wep_capa
 
 logger = logging.getLogger()
 
index 403fbd7391f8a131712c3115d085361dbc2408a1..84163f36d68ae47fd526b5bda51edc4362ebee6e 100644 (file)
@@ -18,10 +18,9 @@ import threading
 import time
 
 import hostapd
-from utils import HwsimSkip, require_under_vm, skip_with_fips, alloc_fail, fail_test, wait_fail_trigger
+from utils import *
 from test_ap_hs20 import build_dhcp_ack
 from test_ap_ft import ft_params1
-from test_wep import check_wep_capa
 
 def connect(dev, ssid, wait_connect=True):
     dev.connect(ssid, key_mgmt="WPA-EAP", scan_freq="2412",
index 56ab9c57d58d038c3a2fbd48cd20d2df79738c80..ef6ebbaf6056d6571f4aa8b727abc6460cd321a3 100644 (file)
@@ -15,11 +15,9 @@ import subprocess
 
 import hostapd
 from wpasupplicant import WpaSupplicant
-from utils import HwsimSkip, fail_test, alloc_fail, wait_fail_trigger, parse_ie
-from utils import clear_regdom_dev
+from utils import *
 from tshark import run_tshark
 from test_ap_csa import switch_channel, wait_channel_switch, csa_supported
-from test_wep import check_wep_capa
 
 def check_scan(dev, params, other_started=False, test_busy=False):
     if not other_started:
index 38e34964a4db83823b49c32cdebdef541323b95d..6df9ef899457b0122fdfe216336e5c3461942f1f 100644 (file)
@@ -11,11 +11,7 @@ import subprocess
 from remotehost import remote_compatible
 import hostapd
 import hwsim_utils
-from utils import clear_regdom, HwsimSkip
-
-def check_wep_capa(dev):
-    if "WEP40" not in dev.get_capability("group"):
-        raise HwsimSkip("WEP not supported")
+from utils import *
 
 @remote_compatible
 def test_wep_open_auth(dev, apdev):
index f50e1d1b7befbd7cd27bd15273cd01bd11f79a7b..e14eecedeb1a82b9251fdb3624e35447b70af25d 100644 (file)
@@ -13,7 +13,6 @@ import hwsim_utils
 from wpasupplicant import WpaSupplicant
 from utils import *
 from test_rfkill import get_rfkill
-from test_wep import check_wep_capa
 
 def get_wext_interface():
     if not os.path.exists("/proc/net/wireless"):
index 8211b6b8d32349a7c1dfebd6a068724594fa480d..b5b43114a12b591ce99ab8133b4140ff254ff7d0 100644 (file)
@@ -11,10 +11,9 @@ import logging
 logger = logging.getLogger()
 
 import hwsim_utils
-from utils import HwsimSkip, alloc_fail, clear_regdom_dev
+from utils import *
 from wpasupplicant import WpaSupplicant
 from test_p2p_channel import set_country
-from test_wep import check_wep_capa
 
 def wait_ap_ready(dev):
     ev = dev.wait_event(["CTRL-EVENT-CONNECTED"])
index c901dd639d0dcefe33154cea9abf608c2c20f3d7..ee2f3ee1296d1abfc147ddeb153212af7f22b9be 100644 (file)
@@ -104,6 +104,10 @@ def skip_without_tkip(dev):
        "TKIP" not in dev.get_capability("group"):
         raise HwsimSkip("Cipher TKIP not supported")
 
+def check_wep_capa(dev):
+    if "WEP40" not in dev.get_capability("group"):
+        raise HwsimSkip("WEP not supported")
+
 def get_phy(ap, ifname=None):
     phy = "phy3"
     try: