Commit graph

3069 commits

Author SHA1 Message Date
Jouni Malinen
cc0a04ac86 tests: Split mbo_supp_oper_classes into multiple test cases
In addition, add even more workarounds for cfg80211 regulatory state
clearing since this test case seems to be the most likely one to fail
due to country=98 issues.

Signed-off-by: Jouni Malinen <j@w1.fi>
2019-01-05 00:21:41 +02:00
Jouni Malinen
02a4ac0feb tests: WPA2-PSK-FT AP over DS and separate hostapd process
This is a regression test case for FT-over-DS that got broken on
mac80211-based drivers when the extra key reinstallation checks were
added.

Signed-off-by: Jouni Malinen <j@w1.fi>
2019-01-04 23:22:46 +02:00
Jouni Malinen
63a7683b2d tests: Split ap_ft_oom into separate test cases
ap_ft_oom seemed to depend on undesired wpa_supplicant behavior of
trying to do FT protocol even without being ready for reassociation.
This is going to be fixed in wpa_supplicant which would make this test
case fail, so split it into separate test cases for each failure item to
be able to avoid incorrect test failures.

Signed-off-by: Jouni Malinen <j@w1.fi>
2019-01-04 23:22:04 +02:00
Jouni Malinen
04e17e5024 tests: Verify that roaming attempts do not get rejected
The previous roam() and roam_over_ds() checks would have ignored failing
association rejection if a consecutive attempt to connect succeeds
within the initial time limit. This can miss incorrect behavior, so
check explicitly for association rejection.

Signed-off-by: Jouni Malinen <j@w1.fi>
2019-01-04 20:27:40 +02:00
Jouni Malinen
de027ef595 tests: P2PS stale group removal
Signed-off-by: Jouni Malinen <j@w1.fi>
2019-01-04 13:19:20 +02:00
Jouni Malinen
ebf25480bb tests: Fix P2P-GROUP-STARTED event parsing for persistent groups
Do not set the 'ip_addr' value from the "[PERSISTENT]" flag.

Signed-off-by: Jouni Malinen <j@w1.fi>
2019-01-04 11:44:48 +02:00
Peter Oh
03d9019811 tests: Update mesh_oom to match implementation change
The number of direct allocation within wpa_supplicant_mesh_init()
has been reduced due to RSN init function is factored out.

Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com>
2019-01-03 12:07:17 +02:00
Jouni Malinen
fef133e99c tests: AP VLAN with WPA2-Enterprise and local file setting VLAN IDs
Signed-off-by: Jouni Malinen <j@w1.fi>
2019-01-02 23:50:35 +02:00
Jouni Malinen
2e2f0f45de tests: [UTF-8] flag in scan results
Signed-off-by: Jouni Malinen <j@w1.fi>
2019-01-02 17:58:42 +02:00
Avraham Stern
8d09cf52a5 tests: Beacon report last frame indication
Verify that the beacon report contains the last beacon report
indication subelement when requested in the beacon request.

Signed-off-by: Avraham Stern <avraham.stern@intel.com>
2019-01-02 16:26:11 +02:00
Avraham Stern
ec5b899040 tests: Beacon report frame body fragmentation
Verify that when the frame body subelement causes the
measurement report element to exceed the maximum element size,
the beacon report is fragmented and the frame body fragment ID
subelement is added with the correct fragment number.

Signed-off-by: Avraham Stern <avraham.stern@intel.com>
2019-01-02 16:26:11 +02:00
Jouni Malinen
aa7386e92a tests: Update rrm_beacon_req_table_rsne to expect full RSNE
Now that wpa_supplicant is sending out full RSNE instead of the
fragmented one, update this test case to match.

Signed-off-by: Jouni Malinen <j@w1.fi>
2019-01-02 16:26:11 +02:00
Jouni Malinen
6a94fdf21a tests: D-Bus P2P peer information - VSIE
Signed-off-by: Jouni Malinen <j@w1.fi>
2019-01-02 13:00:57 +02:00
Jouni Malinen
e3523cece4 tests: Fix p2p_ext_discovery_go to write to logger, not stdout
The error case debug print should go to logger.

Signed-off-by: Jouni Malinen <j@w1.fi>
2019-01-02 13:00:57 +02:00
Jouni Malinen
720a2e7906 tests: Data connectivity after REAUTHENTICATE
Verify that not updating GTK (i.e., only update PTK) in the driver does
not break connectivity. This case is different after the check for
"already in-use GTK" and rejection of GTK reinstallation.

Signed-off-by: Jouni Malinen <j@w1.fi>
2019-01-02 12:28:16 +02:00
Jouni Malinen
b9c33e3fba tests: Use different country in p2p_go_move_reg_change
Use of country=00 (world roaming) seemed to not work anymore with the
current cfg80211 regulatory implementation since the existing channel is
left enabled when moving to country=00. Use a specific country code that
does enforce the selected channel from being used anymore to make this
test case pass again.

The change in cfg80211 behavior is from the kernel commit 113f3aaa81bd
("cfg80211: Prevent regulatory restore during STA disconnect in
concurrent interfaces").

Signed-off-by: Jouni Malinen <j@w1.fi>
2019-01-01 23:33:17 +02:00
Jouni Malinen
fb643190dc tests: dot1xAuthSessionUserName
Signed-off-by: Jouni Malinen <j@w1.fi>
2019-01-01 21:29:25 +02:00
Beni Lev
7021d33c9e tests: Add RSSI based association rejection tests
Signed-off-by: Beni Lev <beni.lev@intel.com>
2019-01-01 18:18:53 +02:00
Beni Lev
080035d1db tests: Add a command for setting TX power/RSSI
With this command, RSSI signal can be controlled. Due to restrictions in
kernel, only values in the range of [-30, -50] can be used. The command
is implemented by changing the TX power.

Signed-off-by: Beni Lev <beni.lev@intel.com>
2019-01-01 18:18:53 +02:00
Jouni Malinen
2994ecfb5f tests: P2P cancel join-group using p2pdev and no separate group interface
Signed-off-by: Jouni Malinen <j@w1.fi>
2019-01-01 16:58:11 +02:00
Jouni Malinen
7f90a850ff tests: Clear regdom state in go_neg_forced_freq_diff_than_bss_freq
Be more careful with cleaning up the regdom state in cfg80211.

Signed-off-by: Jouni Malinen <j@w1.fi>
2019-01-01 16:35:42 +02:00
Jouni Malinen
5a5529c9f4 tests: Make dpp_pkex_no_responder handle enabled 5 GHz channels
It was possible for the 5 GHz PKEX channels to be enabled, e.g., when
running "ap_ht40_csa2 dpp_pkex_no_responder" test sequence, and that
resulted in a failure in dpp_pkex_no_responder due to the unexpectedly
long wait needed for the DPP-FAIL event. Increase the wait time to allow
for 5 GHz PKEX channels to be probed.

Signed-off-by: Jouni Malinen <j@w1.fi>
2019-01-01 16:17:13 +02:00
Jouni Malinen
c55799e54c tests: Check per-wiphy specific country code between test cases
This allows more accurate logging of failures related to the cfg80211
country=98 (intersection) case. This version is trying to give some more
time to allow the country code to clear, but that does not seem to be
sufficient with the current cfg80211 implementation for country=98 (but
might be for other cases).

The additional check for country=98 at the beginning of each test case
is an attempt to force cfg80211 to restore world roaming state with a
new association and disconnection at the station side detected after the
AP side has already stopped. This is needed after the Linux kernel
commit 113f3aaa81bd ("cfg80211: Prevent regulatory restore during STA
disconnect in concurrent interfaces").

Signed-off-by: Jouni Malinen <j@w1.fi>
2019-01-01 11:46:50 +02:00
Jouni Malinen
ba3146e154 tests: Wait a bit after 'iw reg set 00' at the end of test cases
This is needed to avoid leaving unexpected cfg80211 regulatory country
code in place at the point when a test case terminates.

Signed-off-by: Jouni Malinen <j@w1.fi>
2019-01-01 11:46:50 +02:00
Jouni Malinen
003716ec7b tests: Clear regdom changes more robustly in FST test cases
Signed-off-by: Jouni Malinen <j@w1.fi>
2019-01-01 11:35:43 +02:00
Jouni Malinen
2fa2b90aaf tests: Clear regulatory setting in ap_ht_op_class_* more robustly
Avoid exiting the test case with regulatory domain set to something else
than 00 (world roaming).

Signed-off-by: Jouni Malinen <j@w1.fi>
2019-01-01 10:57:50 +02:00
Jouni Malinen
4fb6963b39 tests: Build tests for wpa_supplicant and hostapd
Allow multiple build configurations to be tested automatically.

Signed-off-by: Jouni Malinen <j@w1.fi>
2018-12-31 12:03:53 +02:00
Jouni Malinen
544b5a0d39 tests: hostapd configuration reload from file when disabled
Signed-off-by: Jouni Malinen <j@w1.fi>
2018-12-30 17:35:54 +02:00
Jouni Malinen
0456b7d312 tests: Add UDP checksum into DHCP frames in ProxyARP/DGAF disabled case
Previously, the special value 0 was used to indicate no UDP checksum.
Replace that with the calculated checksum for more like use case.

Signed-off-by: Jouni Malinen <j@w1.fi>
2018-12-30 01:04:58 +02:00
Jouni Malinen
cd803b6ccd tests: Clear regulatory Beacon hints more robustly in TDLS test cases
The ap_open_tdls_vht* test cases could leave some pending regulatory
Beacon hints waiting to be cleared during the following test case. This
would result in a failure if the following test case expected specific
regdom event behavior. For example, this caused "ap_open_tdls_vht160
dbus_country" sequence to result in failure in dbus_country. Fix this by
using more robust sequence in clearing regdom state at the end of the
TDLS test cases that have the AP advertising a country code.

Signed-off-by: Jouni Malinen <j@w1.fi>
2018-12-29 17:02:54 +02:00
Jouni Malinen
90eb910ef5 tests: MKA MIB information
Signed-off-by: Jouni Malinen <j@w1.fi>
2018-12-29 16:52:56 +02:00
Jouni Malinen
a2acadf605 tests: MACsec PSK with bridge interface
Signed-off-by: Jouni Malinen <j@w1.fi>
2018-12-29 12:26:52 +02:00
Jouni Malinen
0d09bd0832 tests: Use more robust way to determine MKA is done for MACsec testing
Signed-off-by: Jouni Malinen <j@w1.fi>
2018-12-29 12:18:41 +02:00
Jouni Malinen
344929a9ca tests: MACsec PSK local failures in CP state machine
Signed-off-by: Jouni Malinen <j@w1.fi>
2018-12-27 16:03:46 +02:00
Jouni Malinen
ead573d8a2 tests: MACsec
Add some coverage for MACsec with the macsec_linux driver interface in
wpa_supplicant.

Signed-off-by: Jouni Malinen <j@w1.fi>
2018-12-27 00:42:04 +02:00
Jouni Malinen
93701b4afe tests: Allow TX/RX data test to use different frame length
This is needed for MACsec test cases with a bit shorter MTU.

Signed-off-by: Jouni Malinen <j@w1.fi>
2018-12-24 23:56:25 +02:00
Jouni Malinen
e7b141906b tests: Do not override connectivity test address if no driver info
Not all driver interfaces provide driver status information with the
local address, so skip the override step if the field is not available.
This is needed, e.g., with macsec_linux.

Signed-off-by: Jouni Malinen <j@w1.fi>
2018-12-24 20:31:47 +02:00
Jouni Malinen
345d8b5e91 tests: AP mode and D-Bus StationAdded/StationRemoved signals
Signed-off-by: Jouni Malinen <j@w1.fi>
2018-12-23 17:25:11 +02:00
Johannes Berg
7afbbcd2ed tests: Validate that AP doesn't reflect station frames
Add a new test to check that the AP won't send frames to the client if
it tries to talk to itself.

Note that this fails until the relevant mac80211 patch is merged.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2018-12-23 17:25:11 +02:00
Jouni Malinen
95cd50a1ed tests: Fix AP wait in ap_require_ht and ap_require_ht_limited_rates
These test cases seemed to have copy-paste errors where
wait_enabled=False was forgotten even though there was no additional
steps checking the AP mode startup results. This did not break the
tests, but could have resulted in slowing them down if the STAs did not
find the AP in the first scan.

Signed-off-by: Jouni Malinen <j@w1.fi>
2018-12-23 17:25:11 +02:00
Jouni Malinen
15b7cc5199 tests: HT STBC overrides
Signed-off-by: Jouni Malinen <j@w1.fi>
2018-12-23 17:25:11 +02:00
Sergey Matyukevich
721d8558bc tests: Allow overriding HT STBC capabilities
Signed-off-by: Sergey Matyukevich <sergey.matyukevich.os@quantenna.com>
2018-12-23 17:25:11 +02:00
Jouni Malinen
43d174b8e2 tests: Automatic channel selection, HT scan, and DFS
Signed-off-by: Jouni Malinen <j@w1.fi>
2018-12-23 17:25:11 +02:00
Jouni Malinen
b586054f95 tests: Work around cfg80211 reg.c intersection (country 98) issues
The Linux kernel commit 113f3aaa81bd ("cfg80211: Prevent regulatory
restore during STA disconnect in concurrent interfaces") broke the
regulatory clearing attempt in many test cases since
cfg80211_is_all_idle() is now returning false due to the AP interface
being up and that results in the Country IE -based regulatory
information not getting cleared back to defaults.

Work around this by stopping the AP interface first so that when the
station interface receives the disconnection, there are no other active
interfaces in the system. In addition, wait for REGDOM event for the
Country IE hint after association to avoid disconnection before the
regulatory events have been fully processed.

Signed-off-by: Jouni Malinen <j@w1.fi>
2018-12-23 17:25:11 +02:00
Jouni Malinen
99bc57d0d1 tests: Fix mbo_supp_oper_classes after cfg80211 change
The Linux kernel commit 113f3aaa81bd ("cfg80211: Prevent regulatory
restore during STA disconnect in concurrent interfaces") broke the
regulatory clearing attempt in this test case since
cfg80211_is_all_idle() is now returning false due to the AP interface
being up and that results in the Country IE -based regulatory
information not getting cleared back to defaults.

Work around this by stopping the AP interface first so that when the
station interface receives the disconnection, there are no other active
interfaces in the system. In addition, wait for REGDOM event for the
Country IE hint after association to avoid disconnection before the
regulatory events have been fully processed.

Signed-off-by: Jouni Malinen <j@w1.fi>
2018-12-22 16:13:14 +02:00
Jouni Malinen
2cef6f6e89 tests: Enable dynamic debug from cfg80211/mac80211
These debug logs were lost due to CONFIG_DYNAMIC_DEBUG=y.

Signed-off-by: Jouni Malinen <j@w1.fi>
2018-12-22 00:18:33 +02:00
Jouni Malinen
afd38c9fdc tests: hostapd.vlan with bridge ifname
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2018-12-21 12:02:57 +02:00
Jouni Malinen
9552a7364f tests: DPP_CONFIGURATOR_SIGN without double space
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2018-12-21 12:02:57 +02:00
Jouni Malinen
3a259f073a tests: Be more careful in clearing REGDOM state
cfg80211 regulatory code gets into pretty inconvenient state if it needs
to intersect regulatory domain information from multiple regulations
(country=98). The existing mechanisms in the hwsim test cases are not
able to clear that up for the following test case and this can result in
large number of failures.

It looks like country=98 case is hit frequently in WNM test cases where
a station associates with an AP that advertises a specific country code
and that station is then asked to disconnect before the REGDOM events
have been received. Avoid this by waiting for the REGDOM events for the
init=COUNTRY_IE case before disconnecting.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2018-12-21 00:55:31 +02:00
Jouni Malinen
432c0972ad tests: Connect attempt with transmitting/nontransmitting BSS
This adds some minimal testing for Multi-BSS connection attempts. The
part for nontransmitted BSS is limited since hostapd/mac80211 does not
yet have sufficient support for Multi-BSS in AP mode.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2018-12-20 21:44:33 +02:00