Commit Graph

18 Commits

Author SHA1 Message Date
Jouni Malinen 938c6e7b3d tests: Wait for AP-STA-CONNECT before running connectivity test
When going through 4-way handshake, the station side reports
CTRL-EVENT-CONNECTED after having sent out EAPOL-Key msg 4/4. The AP
side reports AP-STA-CONNECT after having completed processing of this
frame. Especially when using UML with time travel, it is possible for
the connectivity test to be started before the AP side has configured
the pairwise TK if the test is triggered based on CTRL-EVENT-CONNECTED
instead of AP-STA-CONNECT.

Add explicit wait for AP-STA-CONNECT in some of these cases to reduce
likelihood of reporting failures for test cases that are actually
behaving as expected. This shows up with "dev1->dev2 unicast data
delivery failed" in the test log.

Do the same before requesting reauthentication from the station side
since that has a similar issue with the EAPOL-Start frame getting
encrypted before the AP is ready for it.

Signed-off-by: Jouni Malinen <j@w1.fi>
2019-08-05 00:10:32 +03:00
Jouni Malinen fab49f6145 tests: Python coding style cleanup (pylint3 bad-whitespace)
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2019-03-16 18:52:09 +02:00
Jouni Malinen a8b8da1132 tests: Python coding style cleanup (pylint3 unneeded-not)
Use more readable "foo not in bar" construction for the couple of places
that did "not foo in bar".

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2019-03-15 11:34:32 +02:00
Masashi Honma bab493b904 tests: Use python3 compatible "except" statement
This patch is made by using 2to3 command.

$ find . -name *.py | xargs 2to3 -f except -w -n

Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
2019-01-26 12:11:35 +02:00
Jouni Malinen 0663ae22ff tests: Do not use tabs for indentation
Be more consistent with indentation (always uses spaces in Python
files).

Signed-off-by: Jouni Malinen <j@w1.fi>
2016-04-25 00:19:40 +03:00
Janusz Dziedzic dc6342de92 tests: Pass apdev to HostapdGlobal()
This can be used to work with remote hosts.

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
2016-04-24 19:26:11 +03:00
Janusz Dziedzic 8b8a1864ff tests: Pass full apdev to add_ap() function (1)
Pass the full apdev to the add_ap() function instead of just ifname.
This allows us to handle also remote hosts while we can check
apdev['hostname'], apdev['port'].

This step (1) converts the cases where apdev[#]['ifname'] was used as
the argument to hostapd.add_ap().

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
2016-04-03 22:45:57 +03:00
Ilan Peer 2e99239bd9 tests: Add rfkill tests for P2P Device operations
Add a couple of tests for rfkill with P2P Device operations
(with and without P2P Device interface).

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
2015-12-18 22:26:18 +02:00
Jouni Malinen 81e787b750 tests: Convert test skipping to use exception
Instead of returning "skip" from the test function, raise the new
HwsimSkip exception to indicate a test case was skipped.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-01-08 22:43:47 +02:00
Johannes Berg 9c8779daf6 tests: Use rfkill python module
Instead of calling the rfkill binary, use the built-in module.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2015-01-08 20:56:54 +02:00
Jouni Malinen 863a54093d tests: rfkill block prior to wpa_supplicant start
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-20 16:46:39 +02:00
Jouni Malinen 5f35a5e27f tests: Add wait_connected() and wait_disconnected() helpers
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-20 13:10:09 +02:00
Jouni Malinen 69f9912310 tests: Additional FETCH_OSU and CANCEL_FETCH_OSU coverage
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-14 02:28:03 +02:00
Jouni Malinen 6eae42f98f tests: Additional coverage for miscellaneous ctrl_iface commands
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-14 02:28:02 +02:00
Jouni Malinen 6da4a0af92 tests: P2P_LISTEN while interface is disabled
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-08 21:13:17 +02:00
Jouni Malinen cded555f06 tests: hostapd rfkill
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-10-26 10:53:37 +02:00
Jouni Malinen a8375c94c0 tests: Pass wpas/hapd instance to test_connectivity()
This makes it easier to replace data connectivity testing to use
something else than local hwsim_test binary on the controller device.

Signed-off-by: Jouni Malinen <j@w1.fi>
2014-10-19 17:54:49 +03:00
Jouni Malinen 2d6ce4327a tests: rfkill test cases
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-06-01 16:17:33 +03:00