3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-12-22 04:32:37 +01:00

auto-t: remove sim_hardcoded tests

This commit is contained in:
James Prestwood 2020-09-16 12:39:44 -07:00 committed by Denis Kenzior
parent 18531a524f
commit cc44f50d67
21 changed files with 0 additions and 319 deletions

View File

@ -1,61 +0,0 @@
#!/usr/bin/python3
import unittest
import sys
sys.path.append('../util')
import iwd
from iwd import IWD
from iwd import NetworkType
from hlrauc import AuthCenter
class Test(unittest.TestCase):
def test_connection_success(self):
auth = AuthCenter('/tmp/hlrauc.sock', '/tmp/sim.db')
wd = IWD()
devices = wd.list_devices(1)
device = devices[0]
condition = 'not obj.scanning'
wd.wait_for_object_condition(device, condition)
device.scan()
condition = 'not obj.scanning'
wd.wait_for_object_condition(device, condition)
ordered_network = device.get_ordered_network('ssidEAP-AKA')
self.assertEqual(ordered_network.type, NetworkType.eap)
condition = 'not obj.connected'
wd.wait_for_object_condition(ordered_network.network_object, condition)
try:
ordered_network.network_object.connect()
except:
auth.stop()
raise
condition = 'obj.state == DeviceState.connected'
wd.wait_for_object_condition(device, condition)
device.disconnect()
condition = 'not obj.connected'
wd.wait_for_object_condition(ordered_network.network_object, condition)
auth.stop()
@classmethod
def setUpClass(cls):
IWD.copy_to_storage('ssidEAP-AKA.8021x')
@classmethod
def tearDownClass(cls):
IWD.clear_storage()
if __name__ == '__main__':
unittest.main(exit=True)

View File

@ -1,8 +0,0 @@
[SETUP]
num_radios=2
max_test_exec_interval_sec=40
tmpfs_extra_stuff=sim.eap_user:sim.db:sim_keys.conf
sim_keys=/tmp/sim_keys.conf
[HOSTAPD]
rad0=ssidEAP-AKA.conf

View File

@ -1 +0,0 @@
32010000000000:90dca4eda45b53cf0f12d7c9c3bc6a89:cb9cccc4b9258e6dca4760379fb82581:61df:000000000021

View File

@ -1 +0,0 @@
"632010000000000@example.com" AKA'

View File

@ -1,6 +0,0 @@
[AKA]
Identity=32010000000000@example.com
KI=90dca4eda45b53cf0f12d7c9c3bc6a89
OPC=cb9cccc4b9258e6dca4760379fb82581
AMF=61df
SQN=000000000021

View File

@ -1,5 +0,0 @@
[Security]
EAP-Method=AKA'
[Settings]
AutoConnect=false

View File

@ -1,16 +0,0 @@
hw_mode=g
channel=1
driver=nl80211
ieee8021x=1
eap_server=1
ssid=ssidEAP-AKA
eap_user_file=/tmp/sim.eap_user
eap_sim_db=unix:/tmp/hlrauc.sock
wpa=2
wpa_key_mgmt=WPA-EAP
wpa_pairwise=TKIP CCMP
rsn_pairwise=CCMP TKIP
wpa_passphrase=secret123
channel=1
eap_sim_aka_result_ind=1

View File

@ -1,75 +0,0 @@
#!/usr/bin/python3
import unittest
import sys
sys.path.append('../util')
import iwd
from iwd import IWD
from iwd import NetworkType
from hlrauc import AuthCenter
from hostapd import HostapdCLI
class Test(unittest.TestCase):
def test_connection_success(self):
hostapd = HostapdCLI(config='ssidEAP-AKA.conf')
self.assertIsNotNone(hostapd)
auth = AuthCenter('/tmp/hlrauc.sock', '/tmp/sim.db')
wd = IWD()
devices = wd.list_devices(1)
device = devices[0]
condition = 'not obj.scanning'
wd.wait_for_object_condition(device, condition)
device.scan()
condition = 'not obj.scanning'
wd.wait_for_object_condition(device, condition)
ordered_network = device.get_ordered_network('ssidEAP-AKA')
self.assertEqual(ordered_network.type, NetworkType.eap)
condition = 'not obj.connected'
wd.wait_for_object_condition(ordered_network.network_object, condition)
try:
ordered_network.network_object.connect()
except:
auth.stop()
raise
condition = 'obj.state == DeviceState.connected'
wd.wait_for_object_condition(device, condition)
hostapd.eapol_reauth(device.address)
hostapd.wait_for_event('CTRL-EVENT-EAP-STARTED')
hostapd.wait_for_event('CTRL-EVENT-EAP-SUCCESS')
condition = 'obj.state == DeviceState.connected'
wd.wait_for_object_condition(device, condition)
device.disconnect()
condition = 'not obj.connected'
wd.wait_for_object_condition(ordered_network.network_object, condition)
auth.stop()
@classmethod
def setUpClass(cls):
IWD.copy_to_storage('ssidEAP-AKA.8021x')
@classmethod
def tearDownClass(cls):
IWD.clear_storage()
if __name__ == '__main__':
unittest.main(exit=True)

View File

@ -1,8 +0,0 @@
[SETUP]
num_radios=2
max_test_exec_interval_sec=40
tmpfs_extra_stuff=sim.eap_user:sim.db:sim_keys.conf
sim_keys=/tmp/sim_keys.conf
[HOSTAPD]
rad0=ssidEAP-AKA.conf

View File

@ -1 +0,0 @@
32010000000000:90dca4eda45b53cf0f12d7c9c3bc6a89:cb9cccc4b9258e6dca4760379fb82581:61df:000000000021

View File

@ -1 +0,0 @@
"032010000000000@example.com" AKA

View File

@ -1,6 +0,0 @@
[AKA]
Identity=32010000000000@example.com
KI=90dca4eda45b53cf0f12d7c9c3bc6a89
OPC=cb9cccc4b9258e6dca4760379fb82581
AMF=61df
SQN=000000000021

View File

@ -1,5 +0,0 @@
[Security]
EAP-Method=AKA
[Settings]
AutoConnect=false

View File

@ -1,16 +0,0 @@
hw_mode=g
channel=1
driver=nl80211
ieee8021x=1
eap_server=1
ssid=ssidEAP-AKA
eap_user_file=/tmp/sim.eap_user
eap_sim_db=unix:/tmp/hlrauc.sock
wpa=2
wpa_key_mgmt=WPA-EAP
wpa_pairwise=TKIP CCMP
rsn_pairwise=CCMP TKIP
wpa_passphrase=secret123
channel=1
eap_sim_aka_result_ind=1

View File

@ -1,74 +0,0 @@
#!/usr/bin/python3
import unittest
import sys
sys.path.append('../util')
import iwd
from iwd import IWD
from iwd import NetworkType
from hlrauc import AuthCenter
from hostapd import HostapdCLI
class Test(unittest.TestCase):
def test_connection_success(self):
hostapd = HostapdCLI(config='ssidEAP-SIM.conf')
auth = AuthCenter('/tmp/hlrauc.sock', '/tmp/sim.db')
wd = IWD()
devices = wd.list_devices(1)
device = devices[0]
condition = 'not obj.scanning'
wd.wait_for_object_condition(device, condition)
device.scan()
condition = 'not obj.scanning'
wd.wait_for_object_condition(device, condition)
ordered_network = device.get_ordered_network('ssidEAP-SIM')
self.assertEqual(ordered_network.type, NetworkType.eap)
condition = 'not obj.connected'
wd.wait_for_object_condition(ordered_network.network_object, condition)
try:
ordered_network.network_object.connect()
except:
auth.stop()
raise
condition = 'obj.state == DeviceState.connected'
wd.wait_for_object_condition(device, condition)
hostapd.eapol_reauth(device.address)
hostapd.wait_for_event('CTRL-EVENT-EAP-STARTED')
hostapd.wait_for_event('CTRL-EVENT-EAP-SUCCESS')
condition = 'obj.state == DeviceState.connected'
wd.wait_for_object_condition(device, condition)
device.disconnect()
condition = 'not obj.connected'
wd.wait_for_object_condition(ordered_network.network_object, condition)
auth.stop()
@classmethod
def setUpClass(cls):
IWD.copy_to_storage('ssidEAP-SIM.8021x')
@classmethod
def tearDownClass(cls):
IWD.clear_storage()
if __name__ == '__main__':
unittest.main(exit=True)

View File

@ -1,8 +0,0 @@
[SETUP]
num_radios=2
max_test_exec_interval_sec=40
tmpfs_extra_stuff=sim.eap_user:sim.db:sim_keys.conf
sim_keys=/tmp/sim_keys.conf
[HOSTAPD]
rad0=ssidEAP-SIM.conf

View File

@ -1 +0,0 @@
32010000000000:D0D1D2D3D4D5D6D7:E1E2E3E4:DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD

View File

@ -1 +0,0 @@
"132010000000000@example.com" SIM

View File

@ -1,4 +0,0 @@
[SIM]
Identity=32010000000000@example.com
Kc=d0d1d2d3d4d5d6d7d0d1d2d3d4d5d6d7d0d1d2d3d4d5d6d7
SRES=e1e2e3e4e1e2e3e4e1e2e3e4

View File

@ -1,5 +0,0 @@
[Security]
EAP-Method=SIM
[Settings]
AutoConnect=false

View File

@ -1,16 +0,0 @@
hw_mode=g
channel=1
driver=nl80211
ieee8021x=1
eap_server=1
ssid=ssidEAP-SIM
eap_user_file=/tmp/sim.eap_user
eap_sim_db=unix:/tmp/hlrauc.sock
wpa=2
wpa_key_mgmt=WPA-EAP
wpa_pairwise=TKIP CCMP
rsn_pairwise=CCMP TKIP
wpa_passphrase=secret123
channel=1
eap_sim_aka_result_ind=1