Commit graph

3469 commits

Author SHA1 Message Date
Jouni Malinen d1fb06c947 tests: Check wait_event argument type
It was clearly too easy to get unexpected behavior by accidentially
passing in a string instead of a list of strings to these functions, so
enforce the correct type to notice such issues automatically.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2019-08-07 12:57:22 +03:00
Jouni Malinen 12c5c2404e tests: Fix ap_vht_csa_vht40 to use list of events with wait_event()
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2019-08-07 12:57:22 +03:00
Jouni Malinen 0e2605b948 tests: Fix concurrent_autogo_crossconnect to use list of events with wait_event()
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2019-08-07 12:57:22 +03:00
Jouni Malinen 79b44113ec tests: Fix ap_vht_csa_vht40_disable to use list of events with wait_event()
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2019-08-07 12:57:22 +03:00
Jouni Malinen d371f0cbbf tests: Fix eap_proto_otp to use list of events with wait_event()
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2019-08-07 12:57:22 +03:00
Jouni Malinen c4a9610e8f tests: Fix hostapd.wait_sta()
wait_event() expects a list of events instead of a single event name.
The previous implementation of wait_sta() did not really wait for
AP-STA-CONNECT; instead, it returned the next event from hostapd
regardless of what that event was.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2019-08-07 12:36:36 +03:00
Jouni Malinen aeb7ab8edb tests: Additional EAP-TEAP coverage
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2019-08-07 01:19:00 +03:00
Jouni Malinen 9b2b99c550 tests: Additional EAP-SAKE local error case coverage
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2019-08-07 00:10:26 +03:00
Jouni Malinen 3948417305 tests: Additional EAP-GPSK local error case coverage
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2019-08-07 00:04:45 +03:00
Jouni Malinen 83d5e334b1 tests: Additional EAP-EKE local error case coverage
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2019-08-06 23:59:06 +03:00
Jouni Malinen b4928ff9cb tests: DPP Controller RX error cases
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2019-08-06 21:02:12 +03:00
Jouni Malinen 161490906a tests: DPP TCP failure cases
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2019-08-06 20:22:44 +03:00
Jouni Malinen d137275131 tests: Remove openssl header files from code coverage report
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2019-08-06 13:21:56 +03:00
Jouni Malinen d22f090245 tests: Wait after rekeying a bit before running connectivity test
The AP side may not have had enough time to configure the new TK into
the driver if the connectivity test is started immediately after the
station side event.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2019-08-05 13:49:15 +03:00
Jouni Malinen f13de00b89 tests: Wait for AP side connection event before disconnecting
This makes the test cases more robust especially when testing with UML
time travel.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2019-08-05 13:47:08 +03:00
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 752e7a33e8 tests: Close pyrad server sockets explicitly
This helps in avoiding issues with another test case trying to bind to
the same UDP port and failing due to the previous use by pyrad still
being open. This showed up with failures in radius_ipv6 when it followed
a test case like eap_proto_tls with suitable set of test cases between
them.

Signed-off-by: Jouni Malinen <j@w1.fi>
2019-08-05 00:10:32 +03:00
Jouni Malinen 48e999e9a5 tests: Check against all zero PMKIDs in sae_groups
Signed-off-by: Jouni Malinen <j@w1.fi>
2019-08-03 17:04:01 +03:00
Jouni Malinen e57e3f12b4 tests: Update SAE suitable_groups list to match implementation
Remove the groups that use Brainpool curves from the test case so that
this matches the updated implementation.

Signed-off-by: Jouni Malinen <j@w1.fi>
2019-08-03 16:32:14 +03:00
Jouni Malinen ac069a31de tests: Make scan_bss_expiration_count more robust with UML
Test case sequence "persistent_group_channel scan_bss_expiration_count"
was failing with UML when using time travel. This seemed to be because
there was no explicit wait to confirm that the AP has been fully
disabled before running the next scan. Work around this by verifying
that hostapd has terminated the BSS and waiting a bit after that before
proceeding.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2019-08-01 15:44:22 +03:00
Jouni Malinen bef411a91b tests: hostapd eap_sim_id options
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2019-08-01 10:46:07 +03:00
Masashi Honma 9cff5c320c tests: Fix ap_vht160_no_dfs false negative by using common finalizer
ap_vht160_no_dfs fails with this message:

---------------
wlan0: Country code not reset back to 00: is ZA
wlan0: Country code cleared back to 00
---------------

hostap commit 91b6eba773
'Move MAC address randomization enable/disable to helper functions'.

wireless-testing commit 66c112cbd1d44d05322bb4eef908c82a68adbb5e
tag: wt-2019-06-26.

This patch fixes the issue.

Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
2019-07-30 23:47:04 +03:00
Masashi Honma cbe7e44d1b tests: Fix wep_ht_vht false negative by using common finalizer
wep_ht_vht fails with this message:

---------------
wlan0: Country code not reset back to 00: is SE
wlan0: Country code cleared back to 00
---------------

hostap commit 91b6eba773
'Move MAC address randomization enable/disable to helper functions'.

wireless-testing commit 66c112cbd1d44d05322bb4eef908c82a68adbb5e
tag: wt-2019-06-26.

This patch fixes the issue.

Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
2019-07-30 23:46:57 +03:00
Masashi Honma cb5f7f552f tests: Fix ap_wps_conf_5ghz false negative by using common finalizer
ap_wps_conf_5ghz fails with this message:

---------------
wlan0: Country code not reset back to 00: is FI
wlan0: Country code cleared back to 00
---------------

hostap commit 91b6eba773
'Move MAC address randomization enable/disable to helper functions'.

wireless-testing commit 66c112cbd1d44d05322bb4eef908c82a68adbb5e
tag: wt-2019-06-26.

This patch fixes the issue.

Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
2019-07-30 23:46:52 +03:00
Masashi Honma 8c31be6f61 tests: Fix ap_acs_vht160 false negative by using common finalizer
ap_acs_vht160 fails with this message:

---------------
wlan0: Country code not reset back to 00: is ZA
wlan0: Country code cleared back to 00
---------------

hostap commit 91b6eba773
'Move MAC address randomization enable/disable to helper functions'.

wireless-testing commit 66c112cbd1d44d05322bb4eef908c82a68adbb5e
tag: wt-2019-06-26.

This patch fixes the issue.

Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
2019-07-30 23:46:46 +03:00
Masashi Honma b23973aa86 tests: Fix ap_acs_vht40 false negative by using common finalizer
ap_acs_vht40 fails with this message:

---------------
wlan0: Country code not reset back to 00: is US
wlan0: Country code cleared back to 00
---------------

hostap commit 91b6eba773
'Move MAC address randomization enable/disable to helper functions'.

wireless-testing commit 66c112cbd1d44d05322bb4eef908c82a68adbb5e
tag: wt-2019-06-26.

This patch fixes the issue.

Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
2019-07-30 23:46:41 +03:00
Masashi Honma ccbd5a64bc tests: Fix ap_acs_vht false negative by using common finalizer
ap_acs_vht fails with this message:

---------------
wlan0: Country code not reset back to 00: is US
wlan0: Country code cleared back to 00
---------------

hostap commit 91b6eba773
'Move MAC address randomization enable/disable to helper functions'.

wireless-testing commit 66c112cbd1d44d05322bb4eef908c82a68adbb5e
tag: wt-2019-06-26.

This patch fixes the issue.

Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
2019-07-30 23:46:36 +03:00
Masashi Honma 07b60dfa42 tests: Fix ap_acs_5ghz_40mhz false negative by using common finalizer
ap_acs_5ghz_40mhz fails with this message:

---------------
wlan0: Country code not reset back to 00: is US
wlan0: Country code cleared back to 00
---------------

hostap commit 91b6eba773
'Move MAC address randomization enable/disable to helper functions'.

wireless-testing commit 66c112cbd1d44d05322bb4eef908c82a68adbb5e
tag: wt-2019-06-26.

This patch fixes the issue.

Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
2019-07-30 23:46:31 +03:00
Masashi Honma 29fe92b173 tests: Fix ap_acs_5ghz false negative by using common finalizer
ap_acs_5ghz fails with this message:

---------------
wlan0: Country code not reset back to 00: is US
wlan0: Country code cleared back to 00
---------------

hostap commit 91b6eba773
'Move MAC address randomization enable/disable to helper functions'.

wireless-testing commit 66c112cbd1d44d05322bb4eef908c82a68adbb5e
tag: wt-2019-06-26.

This patch fixes the issue.

Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
2019-07-30 23:46:26 +03:00
Masashi Honma faaaa4e2a9 tests: Fix rrm_beacon_req_passive_scan_vht false negative by using common finalizer
rrm_beacon_req_passive_scan_vht fails with this message:

---------------
wlan0: Country code not reset back to 00: is FI
wlan0: Country code cleared back to 00
---------------

hostap commit 91b6eba773
'Move MAC address randomization enable/disable to helper functions'.

wireless-testing commit 66c112cbd1d44d05322bb4eef908c82a68adbb5e
tag: wt-2019-06-26.

This patch fixes the issue.

Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
2019-07-30 23:45:52 +03:00
Jouni Malinen 96e60047c9 tests: RADIUS request attributes
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2019-07-30 19:58:43 +03:00
Jouni Malinen eb42db4a74 tests: Extend ap_pmf_inject_auth to cover injection of AssocReq
Signed-off-by: Jouni Malinen <j@w1.fi>
2019-07-28 23:51:39 +03:00
Jouni Malinen 14b408c04c tests: Remove testing of EAP-pwd with Brainpool curves
This is in preparation of marking groups using Brainpool curves disabled
for SAE and EAP-pwd.

Signed-off-by: Jouni Malinen <j@w1.fi>
2019-07-27 23:36:27 +03:00
Jouni Malinen 4aaddecdd8 tests: Handle test retries through the same queue
This removes the separate rerun step from the parallel-vm.py processing
and instead, simply requeues the failed test cases into the same queue
that is used for the initial run. This is simpler and more efficient
since reruns start as soon as any VM is ready for processing them
instead of having to wait for all VMs to complete the first round.
Furthermore, this allows VMs to be stopped sooner when no more test
cases remain and that is helpful especially with the time travel patches
that make the wait-for-next-test step in the VM use all available CPU.

Signed-off-by: Jouni Malinen <j@w1.fi>
2019-07-27 20:19:28 +03:00
Jouni Malinen 61ec2353f8 tests: AKM suite selector reporting
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2019-07-24 12:59:45 +03:00
Jouni Malinen 036fc6bdbd tests: Disabled EAP-pwd group
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2019-07-23 13:31:50 +03:00
Jouni Malinen 1c63a1c4c6 tests: Prepare EAP-pwd test cases for allowed group configuration
Enable all supported groups in the existing ap_wpa2_eap_pwd_groups and
ap_wpa2_eap_pwd_invalid_group test cases to maintain current testing
functionality once wpa_supplicant is modified to use a different default
for the enabled groups.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2019-07-23 13:15:23 +03:00
Jouni Malinen 4ff0b909a9 tests: EAP-TLS and both RSA and EC sertificates certificates
Signed-off-by: Jouni Malinen <j@w1.fi>
2019-07-12 18:13:10 +03:00
Jouni Malinen f185715c59 tests: EAP-TLS and TLS 1.3 (EC certificates)
Signed-off-by: Jouni Malinen <j@w1.fi>
2019-07-11 16:10:43 +03:00
Jouni Malinen 90270e15cb tests: EAP-TEAP
Signed-off-by: Jouni Malinen <j@w1.fi>
2019-07-09 16:56:02 +03:00
Jouni Malinen 88b6c6e244 tests: Allow test selection with prefix wildcards
Test names can now use wildcard in the end (e.g., ap_wpa2_psk*) to match
all test cases with the specified prefix.

Signed-off-by: Jouni Malinen <j@w1.fi>
2019-07-09 16:10:44 +03:00
Masashi Honma 9a1046a7a1 tests: Fix scan_dfs false negative by using common finalizer
scan_dfs fails with this message.

---------------
wlan0: Country code not reset back to 00: is US
wlan0: Country code cleared back to 00
---------------

This patch fixes the issue.

Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
2019-06-26 20:42:20 +03:00
Masashi Honma 08d3b3df99 tests: Fix p2p_go_move_scm_peer_does_not_support false negative by using common finalizer
p2p_go_move_scm_peer_does_not_support fails with this message.

---------------
wlan0: Country code not reset back to 00: is US
wlan0: Country code cleared back to 00
---------------

This patch fixes the issue.

Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
2019-06-26 20:42:20 +03:00
Masashi Honma c40b2638ed tests: Fix p2p_channel_5ghz_165_169_us false negative by using common finalizer
p2p_channel_5ghz_165_169_us fails with this message.

---------------
wlan0: Country code not reset back to 00: is US
wlan0: Country code cleared back to 00
---------------

This patch fixes the issue.

Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
2019-06-26 20:42:20 +03:00
Masashi Honma 645a16f186 tests: Fix p2p_channel_5ghz_only false negative by using common finalizer
p2p_channel_5ghz_only fails with this message.

---------------
wlan0: Country code not reset back to 00: is US
wlan0: Country code cleared back to 00
---------------

This patch fixes the issue.

Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
2019-06-26 20:42:20 +03:00
Masashi Honma b8a868594a tests: Fix autogo_ht_vht false negative by using common finalizer
autogo_ht_vht fails with this message.

---------------
wlan0: Country code not reset back to 00: is US
wlan0: Country code cleared back to 00
---------------

This patch fixes the issue.

Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
2019-06-26 20:42:20 +03:00
Masashi Honma e6c82d450e tests: Fix p2p_autogo_pref_chan_not_in_regulatory false negative by using common finalizer
p2p_autogo_pref_chan_not_in_regulatory fails with this message.

---------------
wlan0: Country code not reset back to 00: is SE
wlan0: Country code cleared back to 00
---------------

This patch fixes the issue.

Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
2019-06-26 20:42:20 +03:00
Masashi Honma b57d883c2c tests: Fix ap_vht80_to_24g_ht false negative by using common finalizer
ap_vht80_to_24g_ht fails with this message.

---------------
wlan0: Country code not reset back to 00: is FI
wlan0: Country code cleared back to 00
---------------

This patch fixes the issue.

Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
2019-06-26 20:42:20 +03:00
Masashi Honma 44cc7df650 tests: Fix ap_vht_40_fallback_to_20 false negative by using common finalizer
ap_vht_40_fallback_to_20 fails with this message.

---------------
wlan0: Country code not reset back to 00: is US
wlan0: Country code cleared back to 00
---------------

This patch fixes the issue.

Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
2019-06-26 20:42:20 +03:00
Masashi Honma 4ab1ac90b4 tests: Fix ap_vht_tkip false negative by using common finalizer
ap_vht_tkip fails with this message.

---------------
wlan0: Country code not reset back to 00: is FI
wlan0: Country code cleared back to 00
---------------

This patch fixes the issue.

Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
2019-06-26 20:42:20 +03:00