Commit Graph

158 Commits

Author SHA1 Message Date
James Prestwood 28c400499d auto-t: added failure test case to AP
Tests an invalid PSK.
2018-06-27 14:41:25 -05:00
Denis Kenzior 025f9a3760 autotests: Fix EAP-PEAP-MSCHAPv2 test
The Identity field needed to be escaped
2018-06-14 19:25:29 -05:00
Andrew Zaborowski 91456b8d98 autotests: Test 4 ways MsCHAPv2 can be configured 2018-06-13 12:18:08 -05:00
James Prestwood e2ac29b492 auto-t: added reauth to connection test
Both EAP-SIM and EAP-AKA will now attempt a reauth after the
connection to exercise reset_state.
2018-06-12 11:09:10 -05:00
Tim Kourt d402b6034a auto-t: enable debug output for iwd
This enables debug output for iwd when started from python
2018-05-31 19:28:16 -05:00
Denis Kenzior 6c2ecc6ca5 autotests: Bump iwd startup timeout
iwd now performs a lot of crypto checks at startup, so the timeout was
sometimes being triggered.
2018-05-30 22:36:41 -05:00
Denis Kenzior 0c701d974a autotests: Bump timeout value
Since EAP-PWD now tests EAP Re-Authentication and waits, bump up the
test timeout time.
2018-05-30 22:36:41 -05:00
Tim Kourt ca0f993358 auto-t: change EAP-PWD to trigger eapol reauth 2018-05-30 22:36:34 -05:00
Tim Kourt 7f437c30e3 auto-t: add eapol reauth cmd into hostapd mngr 2018-05-30 18:59:02 -05:00
Tim Kourt 342ffc5652 auto-t EAP-PEAP
1) Refactored to start catching the exceptions and properly
   dispose an instance of iwd
2) Switched to list_devices with wait option
2018-05-21 17:46:07 -05:00
Tim Kourt b3b0c3dea5 auto-t: fix configuration for MFP usage 2018-05-21 17:45:59 -05:00
Tim Kourt 6ccb99d98b auto-t: fix python interface handler for devices 2018-05-21 17:44:44 -05:00
Tim Kourt ef610e0f47 auto-t: testAP increased the max execution interval 2018-05-21 17:44:21 -05:00
Tim Kourt 5bc6e986e4 auto-t: GTC
1) Renamed the test to reflect the usage of PEAP
2) Prevented the creation of an extra instance of iwd
3) Refactored to start catching the exceptions and properly
   dispose an instance of iwd
4) Switched to list_devices with wait option
2018-05-21 17:44:16 -05:00
Tim Kourt 68bc64c8cd auto-t: EAP-PWD
1) Removed duplicated entries form .conf
2) Refactored to start catching the exceptions and properly
   dispose an instance of iwd
3) Switched to list_devices with wait option
2018-05-21 17:43:11 -05:00
Tim Kourt d111e03035 auto-t: MFP test
1) Switch to new Agent API
2) Refactored to start catching the exceptions and properly
   dispose an instance of iwd
2018-05-21 17:43:09 -05:00
Tim Kourt 2608dcae6f auto-t: Add testEAP-PEAP-SIM 2018-05-15 14:32:51 -05:00
Tim Kourt 541c207470 auto-t: Add testEAP-PEAP-MSCHAPv2 2018-05-15 14:32:51 -05:00
Tim Kourt 102a455e00 auto-t: Enable test frwk to wait for the radios
Previously, we had to wait for an arbitrary amount of time after
iwd was started form the python scripts to make sure that the
radio objects are available on the D-bus. This patch allows to
wait inside of list_devices() method and get back a list of the
devices once they are available.
2018-05-15 14:32:51 -05:00
James Prestwood b774695a7e autotests: Fix autoconnect autotest issue
These tests were failing (both with/without ofono) because iwd
was trying to autoconnect before the autotest had issued a
connect request (causing iwd to return a busy response). To fix
this, autoconnect was explicitly disabled in the config file.
2018-05-07 16:19:46 -05:00
James Prestwood 1523ce1130 auto-t: added EAP-PWD autotests
One test is for the regular case, the second tests the
fragmentation logic.
2018-05-03 13:03:21 -05:00
James Prestwood a83419011e auto-t: Honor valgrind flag if iwd starts from python
Before starting iwd, we check if IWD_TEST_VALGRIND was set
by test-runner, and if so, start iwd with the appropriate
valgrind options.
2018-04-27 11:21:36 -05:00
Andrew Zaborowski 145711762f autotests: Update excpected exception in testConnectAutoconnect
Update the expected DBus exception in the manual connect case, affected
by recent EAP changes.  Also slightly improve the comment in the file
although it's still not 100% correct.
2018-04-26 11:37:09 -05:00
Andrew Zaborowski baf965ed76 autotests: Add an EAP-TTLS+MsCHAPV2 test
This also tests multiple agent requests for one network connection
because the TTLS client private key is not in the config file and the
MSCHAPV2 password is not in the config file.
2018-04-26 11:29:55 -05:00
Andrew Zaborowski 25a9d2a71f autotests: Test encrypted private keys with EAP-TLS
Make 3 connections in test EAP-TLS, one with an unencrypted private key,
one with the private key passphrase provided in the provisioning file
and one with the passphrase provided through the agent.  Also improve
the scanning logic at the beginning.
2018-04-26 11:28:42 -05:00
Andrew Zaborowski 099f2ecc12 autotests: Add new DBus methods to PSKAgent 2018-04-19 14:09:57 -05:00
Andrew Zaborowski a8c30cd25e autotests: Accept a list of passphrases in PSKAgent
Allow passing a list of passphrases for subsequent agent requests to the
PSKAgent constructor.  This also makes existing tests stricter because
a spurious agent request will not receive the same passphrase.
2018-04-19 14:09:52 -05:00
James Prestwood 7c77bf33c7 auto-t: add EAP-GTC autotest 2018-04-04 09:42:31 -05:00
James Prestwood e889452dde auto-t: disable timeouts in IWD class when debugging
If --gdb is used with test-runner, all the timeouts in the
IWD class must be turned off otherwise the test will fail.
Inside test-runner, a environment variable (IWD_TEST_TIMEOUTS)
is set to either 'on' or 'off'. Then the IWD class (and any
others) can handle the timeouts accordingly. Note that this
does not turn off dbus timeouts, rather it ignores timeout
failures. This does mean that ultimately the test will most
likely fail due to a dbus timeout, but it at least gives you
unlimited debugging time.
2018-04-02 12:49:52 -05:00
Andrew Zaborowski 9e1578d6a9 autotests: Add a FT + 8021x roaming test 2018-03-21 14:25:34 -05:00
Andrew Zaborowski b5c2cd0298 autotests: Check connectivity in TTLS test similar to TLS test 2018-03-15 11:40:34 -05:00
Tim Kourt 2dd84f0114 auto-t: add tests for Protected EAP - type 25 2018-02-26 09:59:48 -06:00
Tim Kourt e348c8e0ce auto-t: reflect config name change in MFP tests 2018-02-13 11:50:35 -06:00
Tim Kourt d450b25b07 auto-t: reflect name change of the config file in autotests 2018-02-07 11:32:11 -06:00
James Prestwood 1491ebe877 auto-t: add SA Query tests
Two autotests:

1. Tests SA Query procedure when the AP goes down. In this case the AP
   goes down ungracefully, now allowing it to send out any deauth
   frames. When the AP comes back up, IWD still thinks its connected.
   The AP will then send unprotected disassociate frames so the client
   can re-connect. This kicks off the SA Query procedure, which the AP
   will not respond to. At this point we can deauth and reconnect to
   the AP.

2. Test SA Query procedure when a disassociate frame has been spoofed.
   In this case we receive an unprotected disassociate frame and start
   SA Query. The AP should then respond to the SA query within the
   timeout. We then know the frame was spoofed and can remain
   connected.
2018-02-01 10:29:44 -06:00
James Prestwood 62bdf6c482 auto-t: hwsim fixup
Changed disassociate reason to 0x07 when spoofing a disassociate
frame. This along with 0x06 are the only two reason codes that
should be accepted in an unprotected disassociate frame.
2018-02-01 10:12:09 -06:00
James Prestwood 13429f8f2d auto-t: add spoofing frame support to hwsim util
Using the hwsim dbus interface ".Interface" under the radios
object you can now send an arbitrary frame out from that radio.
Two methods have been added, spoof_frame and spoof_disassociate.
2018-01-30 23:03:55 -06:00
James Prestwood fe616fbfa5 auto-t: hostapd util get_config_value and get_freq
The hwsim SendFrame method requires the radio frequency which
is obtained from the hostapd config file. This adds a generic
API to get any config value from the hostapd config, as well
as a get_freq API that converts the channel number to a
frequency.
2018-01-30 23:03:51 -06:00
James Prestwood 0db0ce43b8 auto-t: add ungraceful restart to hostapd util
For testing SA Query, the autotest needs the ablility to force
kill (and restart) hostapd without giving it time to deauth its
stations gracefully. A method was added to the HostapdCLI class
which does a killall -9 hostapd, resets the wlnX interface,
and restarts hostapd with the same arguments as it had before.
2018-01-29 14:05:57 -06:00
Marcel Holtmann 980f6f3645 main: Rename iwd/iwd.conf into iwd/main.conf 2018-01-29 02:13:41 -08:00
James Prestwood 5c11c2f351 autotest: test AP Roam 2018-01-18 15:35:38 -06:00
James Prestwood 27a35da0ba autotests: add AP roam support to hostapd.py 2018-01-18 15:35:38 -06:00
James Prestwood 6a9de526a8 autotest: fix possible hlrauc race condition
The AuthCenter will now wait for the RX thread to start before
continuing with the test.

Also removed the non blocking option and fixed the loop to
handle a blocking recvfrom call.
2018-01-18 14:43:53 -06:00
Tim Kourt ca183343e2 auto-t: Cleanup after a failure 2018-01-17 10:37:15 -06:00
Tim Kourt b1745aca79 auto-t: stop AuthCenter on failures 2018-01-04 10:43:03 -06:00
James Prestwood cf3372235c autotests: EAP-AKA' autotest using ofono 2017-12-14 17:47:39 -06:00
James Prestwood 6d07cac299 autotest: added test for EAP-SIM with ofono 2017-12-14 17:47:34 -06:00
James Prestwood 9d4532fe68 autotest: Added autotest for EAP-AKA with ofono 2017-12-14 17:47:32 -06:00
James Prestwood 6942e9c7b1 autotest: Added ofono.py utility
A new class which can be used to power on a modem and wait
for the Interfaces/Properties EAP-SIM/AKA need for
authentication.
2017-12-14 17:47:29 -06:00
James Prestwood 341fb0613a autotest: Added phonesim.conf file
SIM/AKA/AKA' (ofono) autotests will require phonesim.conf for
ofono to communicate with phonesim
2017-12-14 17:41:41 -06:00