mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2025-02-03 07:44:08 +01:00
auto-t: Add EAP WPS fragmentation test
This commit is contained in:
parent
b6745000b5
commit
aa3796af3b
7
autotests/testEAP-WPS-Frag/hw.conf
Normal file
7
autotests/testEAP-WPS-Frag/hw.conf
Normal file
@ -0,0 +1,7 @@
|
||||
[SETUP]
|
||||
num_radios=2
|
||||
tmpfs_extra_stuff=iwd.conf
|
||||
iwd_config_dir=/tmp
|
||||
|
||||
[HOSTAPD]
|
||||
rad0=ssid-wps-small-mtu.conf
|
2
autotests/testEAP-WPS-Frag/iwd.conf
Normal file
2
autotests/testEAP-WPS-Frag/iwd.conf
Normal file
@ -0,0 +1,2 @@
|
||||
[EAP]
|
||||
mtu=100
|
17
autotests/testEAP-WPS-Frag/ssid-wps-small-mtu.conf
Normal file
17
autotests/testEAP-WPS-Frag/ssid-wps-small-mtu.conf
Normal file
@ -0,0 +1,17 @@
|
||||
hw_mode=g
|
||||
channel=1
|
||||
ssid=ssidWPS-Frag
|
||||
|
||||
eap_server=1
|
||||
|
||||
wps_state=2
|
||||
ap_setup_locked=1
|
||||
config_methods=virtual_push_button
|
||||
fragment_size=100
|
||||
|
||||
wpa=2
|
||||
wpa_key_mgmt=WPA-PSK
|
||||
wpa_pairwise=CCMP
|
||||
wpa_passphrase=secret123
|
||||
|
||||
ctrl_interface=/var/run/hostapd
|
42
autotests/testEAP-WPS-Frag/wps_frag_test.py
Normal file
42
autotests/testEAP-WPS-Frag/wps_frag_test.py
Normal file
@ -0,0 +1,42 @@
|
||||
#!/usr/bin/python3
|
||||
|
||||
import unittest
|
||||
import sys
|
||||
|
||||
sys.path.append('../util')
|
||||
import iwd
|
||||
from iwd import IWD
|
||||
from iwd import DeviceState
|
||||
|
||||
from hostapd import HostapdCLI
|
||||
|
||||
class Test(unittest.TestCase):
|
||||
|
||||
def test_push_button_success(self):
|
||||
wd = IWD()
|
||||
|
||||
devices = wd.list_devices();
|
||||
self.assertIsNotNone(devices)
|
||||
device = devices[0]
|
||||
|
||||
device.wps_push_button()
|
||||
|
||||
condition = 'obj.state == DeviceState.connected'
|
||||
wd.wait_for_object_condition(device, condition)
|
||||
|
||||
device.disconnect()
|
||||
|
||||
condition = 'obj.state == DeviceState.disconnected'
|
||||
wd.wait_for_object_condition(device, condition)
|
||||
|
||||
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
HostapdCLI.wps_push_button()
|
||||
|
||||
@classmethod
|
||||
def tearDownClass(cls):
|
||||
IWD.clear_storage()
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main(exit=True)
|
Loading…
Reference in New Issue
Block a user