Commit graph

55 commits

Author SHA1 Message Date
Andrei Otcheretianski
9a6e2a5ede tests: Make wnm_bss_tm_req_with_mbo_ie more robust
On slow machines or inside VM it may take some time for "DISCONNECTED"
event to arrive. Since the retry delay counter is started already, it
may result in less than 5 seconds time between "DISCONNECTED" and
"CONNECTED" events.

Fix the test by taking more accurate timestamps between the events.

Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
2017-07-18 13:29:07 +03:00
Jouni Malinen
c01de21932 tests: Avoid unexpected roam in wnm_bss_tm
It was possible for the BTM Request with no matching BSSIDs to cause
wpa_supplicant-initated roam to a better BSS (5 GHz band preferred) when
finding the second AP in a scan started by that BTM Request. This could
make the following step in the test case fail. Fix this by asking
another channel to be scanned to postpone discovery of the other AP.

Signed-off-by: Jouni Malinen <j@w1.fi>
2017-05-27 11:19:00 +03:00
Jouni Malinen
481fecefec tests: BSS TM request with 160 MHz opclass 129
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2017-05-07 22:08:43 +03:00
Jouni Malinen
0ed5e9467f tests: Validate kernel behavior in wnm_bss_tm_connect_cmd
The cfg80211 connect command extension to allow roaming request from
user space while connect was added to the kernel, so uncomment the
previously commented out TODO item to verify this behavior.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2017-05-03 18:30:31 +03:00
Jouni Malinen
0e947f32b4 tests: Fix regdom clearing in wnm_bss_tm_scan_needed_e4
It was possible for the cfg80211 regulatory code to get confused if the
disconnection and user hint to set country code to 00 happened
immediately after the BTM-initiated roam. The country IE update seemed
to be performed just before the 00 user hint and that resulted in
cfg80211 intersecting the regulatory domains instead of clearing to 00.
This resulted in the following test cases being unable to set the
country code.

This happened with the following test case sequence:
wnm_bss_tm_scan_needed_e4 wnm_bss_tm_scan_not_needed

Signed-off-by: Jouni Malinen <j@w1.fi>
2017-04-01 14:10:32 +03:00
Avraham Stern
be607ceb55 tests: BSS transition management query with unknown candidates
Verify that the AP responds to a BSS transition management query that
includes candidates unknown to the AP.

Signed-off-by: Avraham Stern <avraham.stern@intel.com>
2017-03-11 10:49:26 +02:00
Jouni Malinen
4fe798bd9d tests: Make wnm_bss_tm_req a bit more efficient and robust
Use a local variable for the STA address instead of fetching it
separately for each operation. Dump control interface monitor events
between each test message to avoid increasing the socket output queue
unnecessarily.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2017-03-06 23:53:33 +02:00
Beni Lev
ed432343f4 tests: Clean up wnm_bss_tm_req test not initialize unused AP
The second AP is not really needed in this test case that verifies
parsing of various different BSs Transition Management Request frame
payloads.

Signed-off-by: Beni Lev <beni.lev@intel.com>
2017-03-06 23:48:02 +02:00
Jouni Malinen
622bc51f5a tests: WNM BSS Transition Management and scan needed (Table E-4)
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2017-03-01 11:39:24 +02:00
Jouni Malinen
133a8b9d7a tests: WNM BSS TM with explicit Table E-4 indication
wnm_bss_tm_global uses an unknown country code to use Table E-4. Extend
that with otherwise identical test case wnm_bss_tm_global4, but with the
country string explicitly indicating use of Table E-4 while using a
known country code.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2017-03-01 11:27:48 +02:00
Jouni Malinen
ee4b99e741 tests: WNM BSS Transition Management with RSN
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2017-02-16 13:33:45 +02:00
Jouni Malinen
dc15e92b46 tests: WNM Disassociation Imminent failure cases
Signed-off-by: Jouni Malinen <j@w1.fi>
2017-02-12 18:15:37 +02:00
Jouni Malinen
5cf0930f9c testS: Additional BSS TM error case coverage
Signed-off-by: Jouni Malinen <j@w1.fi>
2017-02-12 18:10:25 +02:00
Jouni Malinen
5cf2f7b3db tests: WNM BSS TM - protocol testing for AP message parsing
Signed-off-by: Jouni Malinen <j@w1.fi>
2017-02-12 18:06:02 +02:00
Jouni Malinen
554a59bc6d tests: WNM Sleep Mode - open (fail)
Signed-off-by: Jouni Malinen <j@w1.fi>
2017-02-12 17:52:20 +02:00
Jouni Malinen
0c52ad116d tests: WNM BSS Transition Management OOM
Signed-off-by: Jouni Malinen <j@w1.fi>
2017-02-12 17:47:58 +02:00
Jouni Malinen
5fcc8c5cdf tests: WNM Sleep Mode - protocol testing
Signed-off-by: Jouni Malinen <j@w1.fi>
2017-02-12 17:44:56 +02:00
Jouni Malinen
d58f4c641f tests: More BSS_TM_REQ coverage
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-12-28 14:31:42 +02:00
Jouni Malinen
7084c4d489 tests: WNM BSS Transition Management request getting rejected
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-09-25 17:31:26 +03:00
Jouni Malinen
bc6e32880f tests: Remove extra semicolons from python scripts
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-03 22:37:01 +03:00
Jonathan Afek
9fd6804d61 tests: Mark 525 tests as remote compatible
After successfully passing the 525 tests on a remote setup mark the
tests as remote compatible.

Signed-off-by: Jonathan Afek <jonathanx.afek@intel.com>
2016-06-27 21:47:37 +03:00
Jonathan Afek
8efc83d4e7 tests: Add support for wlantest for remote hwsim tests
Use a monitor interface given in the command line that is not also a
station or an AP as a monitor running wlantest on the channel used by
the test. This makes all the tests that use wlantest available for
execution on real hardware on remote hosts.

Signed-off-by: Jonathan Afek <jonathanx.afek@intel.com>
2016-05-28 16:34:09 +03: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
6f334bf7a0 tests: Use hapd from hostapd.add_ap()
Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
2016-04-24 20:16:29 +03:00
Janusz Dziedzic
afc26df29c tests: Pass full apdev to add_ap() function (4)
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 (4) converts the cases that call hostapd.add_ap() from a
helper function that got apdev[i] as an argument.

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
2016-04-03 22:46:12 +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
Jouni Malinen
2ca502dc73 tests: WNM BSS transition management with various PHY types
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-03-27 20:57:32 +03:00
Jouni Malinen
fb915d50fd tests: WNM BSS Transition Management and cfg80211 connect command
For now, this is not enforcing cfg80211 reassociation since the needed
changes do not yet exist in the upstream kernel. Once those changes are
accepted, the TODO note in the test case can be addressed.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-03-25 12:11:59 +02:00
Jouni Malinen
b495500fb1 tests: WNM BSS Transition Management and security mismatch
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-03-24 22:35:10 +02:00
Jouni Malinen
f1e26f8965 tests: BTM Request Preferred Candidate List followed by vendor element
This goes through parsing code for a case that was interpreted
incorrectly in the past.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-03-03 17:10:25 +02:00
Jouni Malinen
13a17a77a4 tests: WNM BSS Transition Management and scan behavior
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-02-26 17:19:21 +02:00
Jouni Malinen
cd54a3edac tests: WNM Sleep Mode - AP side OOM
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-02-22 19:53:05 +02:00
Jouni Malinen
c24c144fc7 tests: WNM BSS Transition Management query
This tests BSS Transition Management Query frame generation with
candidate list and transmission of the following request and response
frames.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-02-22 19:53:04 +02:00
Avraham Stern
85cc109ea6 tests: WNM BSS Transition Management with MBO IE
Add tests to verify that MBO IE in BSS Transition Management Request
frame is parsed correctly:

1. The MBO transition reason code is received by the MBO station.
2. The MBO cellular data connection preference is received by the
   MBO station.
3. The MBO station does not try to connect to the AP until the retry
   delay is over.

Signed-off-by: Avraham Stern <avraham.stern@intel.com>
2016-02-22 19:53:04 +02:00
Jouni Malinen
561536205a tests: WNM BSS Transition Management with invalid operating class
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-02-05 17:07:48 +02:00
Jouni Malinen
8823178c96 tests: Start WNM-Sleep Mode in wnm_action_proto*
This is needed to avoid test case failures with additional state
validation in wpa_supplicant.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-11-10 18:40:54 +02:00
Jouni Malinen
63a19e56b0 tests: WNM Action protocol testing (PMF disabled)
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-11-10 18:40:54 +02:00
Jouni Malinen
c4082f7839 tests: WNM Action protocol testing
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-10-25 19:37:17 +02:00
Jouni Malinen
8cc9bc0775 tests: WNM BSS Transition Management in different countries
This increases testing coverage for ieee802_chan_to_freq*() functions.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-06-14 18:11:14 +03:00
Jouni Malinen
7f08b2f91d tests: Make WNM Sleep Mode tests more robust
It was possible for the Action frame used for entring WNM Sleep Mode to
get dropped on the AP side due to it arriving prior to having processed
EAPOL-Key message 4/4 due to a race condition between Data and
Management frame processing paths. Avoid this by waiting for
AP-STA-CONNECTED event from hostapd prior to trying to enter WNM Sleep
Mode. In addition, make the check for the STA flag change more robust by
allowing the wait to be a bit longer with a loop that terminates as soon
as the flag has changed.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-01-18 15:58:05 +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
9d7fdac5b3 tests: Try to clear scan results after regulatory domain changes
It was possible for regulatory domain changes to "leak" into following
test cases in number of cases where the cfg80211 BSS table remained
after regulatory domain had been restored to world roaming. Try to make
this less likely to occur by explicitly clearing BSS table at the end of
test cases that use different regulatory domain. This makes P2P test
cases that verify channel selection based on world roaming rules more
robust.

Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-15 01:32:01 +02:00
Jouni Malinen
f8423317b3 tests: WNM_SLEEP error cases
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-11 23:03:10 +02:00
Jouni Malinen
e61f90875b tests: Disabling WNM keep-alive and hostapd doing client poll
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2014-12-05 16:51:21 +02:00
Jouni Malinen
df4733dff9 tests: WNM BSS TM Req with non-global operating class table
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-11-24 10:58:33 +02:00
Jouni Malinen
13f8d51e2d tests: BSS Transition Management
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-11-22 20:17:47 +02:00
Jouni Malinen
73360424d9 tests: Fix a typo in function name
except_ack() was supposed to be verifying that the frame was ACK'ed,
i.e., it was really supposed to be called expect_ack().

Signed-off-by: Jouni Malinen <j@w1.fi>
2014-11-22 18:40:03 +02:00
Jouni Malinen
ab4ee34306 tests: Fix wnm_bss_tm_req status code expectation
The implementation of WNM BSS transition management was extended to be
able to return a reject status code based on whether a matching entry is
found. The test case wnm_bss_tm_req was trying to enforce a different
status code to be used here based on old implementation.

Signed-off-by: Jouni Malinen <j@w1.fi>
2014-11-22 18:40:03 +02:00
Jouni Malinen
519c3f7044 tests: WNM keep-alive
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-04-13 10:26:53 +03:00
Jouni Malinen
a27f9f7ac8 tests: WNM_SLEEP with additional parameters
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-04-13 10:26:52 +03:00