tests: Move check_wep_capa() into utils.py
Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
7e88ed8e2d
commit
40341e16a5
13 changed files with 12 additions and 22 deletions
|
@ -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):
|
||||
|
|
|
@ -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")
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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],
|
||||
|
|
|
@ -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"""
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -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()
|
||||
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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):
|
||||
|
|
|
@ -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"):
|
||||
|
|
|
@ -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"])
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue