Commit Graph

227 Commits

Author SHA1 Message Date
James Prestwood d47e31954b auto-t: add test for HT/VHT rates
This is a VERY simple test for HT/VHT. Since there are so many potential
options in the IE this really just tests that drops in RSSI will cause
IWD to choose a different BSS, even if that means choosing HT over VHT,
or even basic rates over HT/VHT.
2019-02-25 15:10:31 -06:00
James Prestwood dc280b83d7 auto-t: add config file for testSAE
This conf file was forgotten after updating SAE to work with group 20
2019-02-07 11:10:14 -06:00
James Prestwood 2e5099a716 auto-t: add SAE test for group 20 2019-02-01 16:01:01 -06:00
James Prestwood 3ecf091196 auto-t: clean up SAE autotests
SAE has a clogging test which requires 4 radios to all simultaneously
connect. All the other tests are only using one of these radios, so
in these tests we explicitly disconnect these devices preventing them
from autoconnecting.
2019-02-01 15:57:23 -06:00
James Prestwood ffa943f02f auto-t: Use group 20 in EAP-PWD autotest
Since the EAP-PWD fragmentation test uses group 19 there is test
coverage there for that group. This changes connection_test to use
group 20 instead of 19.
2019-01-31 12:42:28 -06:00
James Prestwood 2522216379 auto-t: Add test for BSS blacklisting 2019-01-30 13:27:34 -06:00
James Prestwood 8956451b26 test-runner: decouple --verbose with --valgrind
When using --valgrind, you must also use --verbose iwd, and, depending
on the tests you may also need to include pytests in the verbose flag.
Since anyone using --valgrind definitely wants to see valgrind info
printed they should not need to enable verbose printing. Also, manually
parsing valgrind prints with IWD prints mixed throughout is a nightmare
even for a single test.

This patch uses valgrind's --log-file flag, which is directed to
/tmp/valgrind.log. After the tests runs we can print out this file.
2019-01-18 08:57:21 -06:00
Tim Kourt 04225757d6 auto-t: Disable MAC rand. for tests with trans. medium 2019-01-16 13:20:04 -06:00
Tim Kourt f8fedb0ec8 auto-t: Disable MAC rand. for tests with hidden networks 2019-01-16 13:19:48 -06:00
Tim Kourt 0b4509d8d2 auto-t: Test Tunneled-MSCHAPv2 over TTLS 2019-01-10 17:26:22 -06:00
James Prestwood ae47d12520 auto-t: use get_ordered_network call in remaining tests
This hopefully wraps up the API migration to get_ordered_network
rather than the plural (get_ordered_networks) version.
2019-01-08 21:24:59 -06:00
James Prestwood edbe38103a auto-t: remove hwsim dependency from testSAQuery
hwsim was imported but never used
2019-01-08 21:24:25 -06:00
James Prestwood 2f4c9d05fe auto-t: use get_ordered_network in testWPA2
Modified 'password_test' in testWPA2 to use the new get_ordered_network
call.
2019-01-07 17:02:53 -06:00
James Prestwood 74599ce33d auto-t: update tests to use get_ordered_network call 2018-12-14 13:47:00 -06:00
James Prestwood 9d3d65a282 auto-t: add get_ordered_network(ssid)
This is a helper/shortcut to get_ordered_networks (plural). In nearly
all the autotests we had (roughly) the same block of code:

ordered_network = get_ordered_networks()[0]

self.assertNotEqual(ordered_network, None)
self.assertEqual(ordered_network.name, "someSsid")

Rather than having to do this, we can simplify and just have a single
call to get_ordered_network, which takes the SSID. If the SSID is not
found, we raise an exception. This avoids needing both asserts since
we are guarenteed that the return is valid and the SSID matches.

This also avoids possible issues with multiple networks showing up in
the GetOrderedNetworks call. Eventually test-runner will support running
tests on real wireless hardware, so its possible we could pick up
unexpected networks in the scan.
2018-12-14 13:46:32 -06:00
James Prestwood 699b83cb1f auto-t: removed ';' from many autotests
At some point a stray ';' got added into an autotest in a section
of code that is heavily copy pasted. So in turn nearly all the autotests
have this stray ';' after list_devices (and a few in other places).
2018-12-14 13:46:23 -06:00
Andrew Zaborowski d558724676 autotests: Update expected error in password length test 2018-12-03 14:21:30 -06:00
Andrew Zaborowski c9d8346d40 autotests: Test bad PSK password lengths 2018-11-30 10:26:33 -06:00
James Prestwood 373d78dacb auto-t: add OWE autotest 2018-11-19 12:10:55 -06:00
Tim Kourt da9b1f785e auto-t: switch MD5 to new property key 2018-10-29 18:46:07 -05:00
James Prestwood ec4cb6beeb auto-t: test connectivity in testWPA
testWPA was not verifying connectivity between the two interfaces. Funny
enough, doing this resulted in the same problems that adhoc had where
we were setting the connection as complete before the gtk/igtk were set.
This is fixed now so we can now use testutil in this test.
2018-10-26 15:29:55 -05:00
James Prestwood da262e7187 auto-t: fix testFT-8021x-roam autoconnect
As with many other test, we need to disable autoconnect for better
reliablility.
2018-10-26 15:29:52 -05:00
Tim Kourt 6661f8c83e auto-t: Change EAP-PWD to a common pwd setting key name 2018-10-25 14:52:41 -05:00
Tim Kourt fc6cebb259 auto-t: rename test
Rename test to avoid confusion with TTLS-MSCHAPV2
2018-10-25 14:15:04 -05:00
Tim Kourt d8905e0666 auto-t: switch GTC to new property key 2018-10-25 14:15:01 -05:00
Tim Kourt 096caf2084 auto-t: test TTLS-MSCHAP 2018-10-25 13:56:13 -05:00
Tim Kourt 10382156b4 auto-t: kill instances of iwd 2018-10-19 14:16:00 -05:00
Denis Kenzior cb50eb6368 Revert "auto-t: Fix EAP-SIM-ofono test"
This reverts commit 7903432e85

The culprit was inside phonesim, not the autotest
2018-10-02 17:56:31 -05:00
Tim Kourt d866ba7557 auto-t: prevent auto connection in pre auth roam test
iwd used to auto connect to AP before it was expected by the test
2018-10-02 16:16:36 -05:00
Tim Kourt 2cb3b7cf2e auto-t: add explicit scan and completion check
The occasional race conditions used to cause the test to fail
due to the empty list of ordered networks
2018-10-02 15:10:17 -05:00
Tim Kourt dc49401fc0 auto-t: test TTLS-CHAP 2018-10-01 17:30:06 -05:00
Tim Kourt fac0131e7c auto-t: test TTLS-PAP 2018-10-01 17:14:05 -05:00
James Prestwood 7903432e85 auto-t: Fix EAP-SIM-ofono test
Curiously this test started failing. The problem was incorrect KC/SRES
values in the sim.db file. I noticed no direct changes to this file,
but changes inside ofono, phonesim, and hostapd could have potentially
caused this.
2018-10-01 14:37:20 -05:00
Denis Kenzior 2527f79670 auto-t: Add WPS tests for StartPin method
This adds two additional test scenarios (using 4 digit and 8 digit
PINs) for testing the StartPin method of the WiFiSimpleConfiguration
interface.
2018-09-24 12:19:27 -05:00
Denis Kenzior 332d4f8e61 auto-t: Add additional utilities for WPS PIN support 2018-09-24 12:19:27 -05:00
James Prestwood 6f833d6cad auto-t: added autotest for FT over SAE
This test was copied from testFT-PSK-roam, but for SAE. The test behaves
as follows:

 - Connect to SAE network (full authentication)
 - Fast transition to another SAE AP
 - Fast transition to a PSK/WPA2 AP
2018-09-21 11:29:19 -05:00
Tim Kourt 3d43d633d1 auto-t: address Dbus API changes
This is a temporary fix to address the recent split of
the Device interface. This patch contains a workaround that
re-enables the auto-tests while the test framework is being
reworked to satisfy the need of the new API and should not
be considered as a permanent solution.
2018-09-19 11:59:28 -05:00
Tim Kourt dcdfdde5dc auto-t: use device waiting feature in all tests 2018-09-19 11:54:36 -05:00
James Prestwood 96330fd75a auto-t: fix OrderedNetwork to work with station API 2018-09-14 21:45:59 -05:00
James Prestwood dd51434560 auto-t: Fix testAP
Fixed two issues:

1. There is no longer a dbus exception when switching to AP mode when
   connected in station mode so that assert was removed.

2. After the device/station change the timing must have changed, causing
   autoconnect to take over before an explicit connect call. Added a
   psk provisioning file that disables autoconnect.
2018-09-14 01:38:45 -05:00
Marcel Holtmann ea20559599 tools: Change net.connman.iwd.hwsim to net.connman.hwsim 2018-09-14 15:27:57 +02:00
Denis Kenzior 9ac46e900e auto-t: Use Station interface for methods 2018-09-05 11:09:35 -05:00
Denis Kenzior 0912a6afb8 auto-t: Convert RSSI agent test to the new API 2018-09-04 23:57:14 -05:00
Andrew Zaborowski 1024562e1d autotests: Always clean up in testAP
Make sure stop_ap is called on success and on failure in both tests so
that one can succeed after the other has failed.  Also make sure to move
both interfaces out of autoconnect state.
2018-08-23 21:43:27 -05:00
Denis Kenzior d8882a75e5 auto-t: Make sure to disable autoconnect 2018-08-14 13:11:44 -05:00
James Prestwood 57fedfba46 auto-t: added test for SAE 2018-08-14 10:37:56 -05:00
Denis Kenzior fac55f6891 auto-t: Rename SignalLevelChanged to Changed 2018-08-13 20:40:59 -05:00
James Prestwood 9ff0e8f6ef auto-t: fixed typo in autoconnect test 2018-08-13 11:09:27 -05:00
James Prestwood a1a85b0135 auto-t: fixed TLS/TTLS autotests
These test were failing due to autoconnect taking over before
the explicit connect call. This adds Autoconnect=False to all
TLS/TTLS tests.
2018-08-10 15:43:45 -05:00
James Prestwood 4ddb95e147 auto-t: made waiting for network connection optional
The default behavior of NetworkObject.connect() is to wait for the
Connect dbus method to reply before returning back to the test. This
change makes it possible to connect, but not wait for a reply and
continue on with the test (by specifying wait=False). This is
specifically required to test SAE anti-clogging, where the AP needs
to have several simultaneous connections at once for the anti-clogging
logic to trigger. This change also adds Device.wait_for_connected()
which waits for the device interface State variable to be "connected".
2018-08-09 15:22:18 -05:00