Commit graph

2348 commits

Author SHA1 Message Date
Jouni Malinen
f05a893eda tests: Check MESH flag in BSS output in wpas_mesh_mode_scan
In addition, use a single channel scan to make the test case run faster.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-12-22 14:17:48 +02:00
Jouni Malinen
0c8d7b085c tests: wpa_supplicant BSS CURRENT command
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-12-21 12:46:14 +02:00
Jouni Malinen
969e525091 tests: Skip eap_tls_pkcs8_pkcs5_v15 with BoringSSL
It does not look like BoringSSL allows pbeWithMD5AndDES-CBC to be used
to protect the local private key, so skip this test case.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-12-21 12:31:20 +02:00
Jouni Malinen
e297cc0d23 tests: P2P service discovery restarted immediately
This test case verifies that SD Response frame does not block the
following remain-on-channel operation unnecessarily long.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-12-21 00:21:37 +02:00
Jouni Malinen
ad02e79d12 tests: Disable HT in ap_wds_sta_wep
HT cannot be used with WEP-only network, so don't try to do that here.
This get rids of some unnecessary Beacon frame updates during
disassociation/association and can make the test case a bit more robust.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-12-19 22:47:07 +02:00
Jouni Malinen
aed9e23ae5 tests: WPS ER enrolling a new device to a configured AP
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-12-19 17:44:51 +02:00
Jouni Malinen
6c44d97b04 tests: D-Bus P2P discovery on a specific non-social channel
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-12-19 13:18:05 +02:00
Jouni Malinen
74d29544f1 tests: RSN AP and PeerKey between two STAs with sniffer check
The previous PeerKey test cases did not actually verify in any way that
the SMK and STK exchanges were completed since mac80211 does not support
setting the key from STK. Use a sniffer check to confirm that the
exchanges complete to avoid PeerKey regressions like the ones fixed in
the last couple of commits.

Signed-off-by: Jouni Malinen <j@w1.fi>
2016-12-18 20:28:10 +02:00
Jouni Malinen
bae93012cd tests: mac80211 and unknown Action frame rejection in STA mode
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-12-18 13:01:49 +02:00
Jouni Malinen
0851a180b9 tests: Verify hostapd mgmt_tx() success
Raise an exception if MGMT_TX command to hostapd fails. Previously, such
errors were ignored silently.

Signed-off-by: Jouni Malinen <j@w1.fi>
2016-12-18 13:01:49 +02:00
Jouni Malinen
1a4b4c8466 tests: Update gas_anqp_capab_list and gas_anqp_extra_elements
The FILS ANQP-element changes made couple of the generic ANQP test steps
fail. Update this to ignore the special FILS cases.

Signed-off-by: Jouni Malinen <j@w1.fi>
2016-12-18 13:01:49 +02:00
Jouni Malinen
1a73f53a65 tests: FILS SK and multiple realms
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-12-18 11:41:59 +02:00
Jouni Malinen
f82bc83264 tests: Add fils_realm for existing FILS test cases
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-12-17 22:08:25 +02:00
Jouni Malinen
670d5eba05 tests: Fix FST scanning for non-FST APs
The sta2.scan() calls were performing full scan of all channels and
reporting only the BSS entry that happened to be the first one in the
wpa_supplicant list. This is problematic since it is possible that the
target AP was not found and incorrect BSS was selected and used for
setting scan_freq which made the connection fail. Furthermore, there is
no need to use full scan for these test cases, so use a single channel
scan instead.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-12-15 14:17:14 +02:00
Jouni Malinen
0a425e0f04 tests: Make p2p_ext_vendor_elem_go_neg_conf more robust
Use P2P listen mode on dev[1] to speed up GO Negotiation and explicitly
wait for successfully completed GO Negotiation to make the failure cases
clearer. Previously, it was possible for the GO Negotiation to fail and
execution to go to the tshark check even when no GO Negotiation Confirm
frame was sent.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-12-14 16:33:19 +02:00
Jouni Malinen
bb5d761c2e tests: Do not attach wpa_supplicant monitor interface unnecessarily
There is no need to attach the monitor interface was events when issuing
only a single INTERFACES command.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-12-14 13:56:15 +02:00
Jouni Malinen
10f312d4a6 tests: Use longer timeout in p2p_go_neg_auth_result()
It is possible for the P2P-GROUP-STARTED event to get delayed more than
one second especially when the GO Negotiation responder becomes the P2P
Client and the system is heavily loaded. Increase the default timeout
for the expected success case from 1 to 5 seconds to avoid failing test
cases that would have succeeded if given a bit more time to complete the
exchange.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-12-14 12:45:37 +02:00
Jouni Malinen
4198e43309 tests: Properly skip pmksa_cache_ctrl_ext if PMKSA_GET is not supported
Mark the test as skipped instead of failed if wpa_supplicant is built
without PMKSA_GET support.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-12-13 20:13:42 +02:00
Jouni Malinen
3301e925b7 tests: Make dbus_p2p_go_neg_init more robust
It was apparently possible to get a propertiesChanged event from an
earlier test case with an empty Groups property. That ended up this case
exiting immediately before running through the steps and consequently,
failing due to missed operations. Make this less likely to happen by
accepting the Groups property emptying event only after a group has been
added for a peer first.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-12-13 20:07:52 +02:00
Jouni Malinen
0aca60b84c tests: Fix scan_reqs_with_non_scan_radio_work error reporting
Raise an exception instead of printing out to stdout if scan fails to
complete.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-12-13 20:07:52 +02:00
Jouni Malinen
58bd7dc341 tests: Scan and both Beacon and Probe Response frame IEs
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-12-13 20:07:52 +02:00
Jouni Malinen
a00a3458ed tests: Make ap_track_sta_no_probe_resp more robust
Check whether the unexpected BSS entry is based on having received a
Beacon frame instead of Probe Response frame. While this test case is
using a huge beacon_int value, it is still possible for mac80211_hwsim
timing to work in a way that a Beacon frame is sent. That made this test
case fail in some rare cases. Fix this by ignoring the BSS entry if it
is based on Beacon frame instead of Probe Response frame.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-12-13 20:07:52 +02:00
Jouni Malinen
e3b38d6e04 tests: Mesh network on 5 GHz band and 20/40 coex change
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-12-13 20:07:52 +02:00
Jouni Malinen
8344ba1229 tests: Remove pmk_r1_push parameter from ap_ft_local_key_gen
Local key generation for FT-PSK does not use the AP-to-AP protocol and
as such, setting pmk_r1_push=1 is a bit confusing here since it gets
ignored in practice. Remove it to keep the test case easier to
understand.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-12-13 13:57:39 +02:00
Jouni Malinen
3615bde6fe tests: Clear scan cache at the end of ap_wps_per_station_psk_failure
It was possible for ap_wps_per_station_psk_failure to leave behind scan
entries with active PBC mode if cfg80211 BSS table. This could result in
a following test case failing due PBC overlap. Fix this by clearing the
cfg80211 BSS table explicitly.

This was found with the following test case sequence:
ap_wps_per_station_psk_failure autogo_pbc

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-12-13 13:03:52 +02:00
Jouni Malinen
fb748ae858 tests: PMKSA cache control interface for external management
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-12-12 23:56:57 +02:00
Jouni Malinen
f0df5afa08 tests: PMKSA cache control interface events
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-12-12 21:02:49 +02:00
Jouni Malinen
b49871ecc1 tests: Fix wpas_ap_acs after 5 GHz use
Work around the mac80211_hwsim limitation on channel survey by forcing
the last connection to be on 2.4 GHz band. Without this, wpas_ap_acs
would have failed to start the AP if the previous test case used the 5
GHz band.

Signed-off-by: Jouni Malinen <j@w1.fi>
2016-12-12 00:58:00 +02:00
Jouni Malinen
d283f7aeac tests: Increase timeout in wpas_mesh_password_mismatch
There has been number of failures from this test case due to the
MESH-SAE-AUTH-FAILURE event from dev[0] and dev[1] arriving couple of
seconds after the one second timeout after the dev[2] events. This does
not look like a real issue, so increase the timeout to five seconds to
make this less likely to show false failures during testing.

Signed-off-by: Jouni Malinen <j@w1.fi>
2016-12-11 20:08:39 +02:00
Jouni Malinen
58a5c4ae77 tests: Verify wpa_state after INTERWORKING_SELECT
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-12-11 19:51:09 +02:00
Jouni Malinen
15aa804285 tests: Make scan_trigger_failure more informative
If wpa_state is left to SCANNING by a previously executed test case,
scan_trigger_failure will fail. Instead of waiting for that failure,
check for wpa_state at the beginning of the test case and report a more
helpful error message if the test case would fail due to a previously
executed test case.

Signed-off-by: Jouni Malinen <j@w1.fi>
2016-12-11 18:41:04 +02:00
Johannes Berg
c7c4600260 tests: Add kernel BSS leak tests
Add two tests that check if the kernel BSS leak (when we get a deauth or
otherwise abandon an association attempt) is present in the kernel. This
is for a long-standing cfg80211/mac80211 issue that got fixed with the
kernel commit 'cfg80211/mac80211: fix BSS leaks when abandoning assoc
attempts'.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2016-12-11 12:45:08 +02:00
Jouni Malinen
52358b08f5 tests: P2P device discovery and peer changing device name
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-12-11 12:45:08 +02:00
Jouni Malinen
71676559ca tests: Peer disabling Wi-Fi Display advertisement
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-12-11 12:45:08 +02:00
Jouni Malinen
0ef0921a1b tests: Ongoing scan and FLUSH
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-12-11 12:45:08 +02:00
Jouni Malinen
79124c7ba1 tests: Scan and only_new=1 multiple times
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-12-10 17:04:08 +02:00
Jouni Malinen
a1a60635a8 tests: Make p2ps_wildcard_p2ps more robust
The final check in this test case was issuing a new P2P_FIND command
immediately after the P2P_SERVICE_DEL command on the peer. It looked
like it was possible for the scan timing to go in a sequence that made
the new P2P_FIND operation eventually accept a cfg80211 BSS entry from
the very end of the previous P2P_FIND. This resulted in unexpected
P2P-DEVICE-FOUND event even though there was no new Probe Response frame
from the peer at that point in time.

Make this less likely to show unrelated failures by waiting a bit before
starting a new P2P_FIND operation after having changes peer
configuration.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-12-10 00:33:33 +02:00
Jouni Malinen
29bf636e12 tests: WEP to WPA2-PSK configuration change in hostapd
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-12-05 21:30:17 +02:00
Jouni Malinen
609be6f7c0 tests: P2P group formation with VHT 80 MHz
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-12-05 21:14:55 +02:00
Jouni Malinen
813ebc51bd tests: Check data connectivity after supplicant triggered EAP reauth
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-12-05 21:01:43 +02:00
Jouni Malinen
d1ea80361b tests: AP with open mode and external association
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-12-05 12:16:12 +02:00
Michael Braun
80fe420ab2 tests: Verify multicast_to_unicast operation
Signed-off-by: Michael Braun <michael-dev@fami-braun.de>
2016-12-04 21:42:46 +02:00
Jouni Malinen
27b698338f tests: Scanning and AP changing channels
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-12-03 18:53:36 +02:00
Jouni Malinen
82fff2c711 tests: P2P provision discovery while GO/CLI
These test cases verify that there is no duplicate processing of P2P
Action frames while operating in a P2P group.

Signed-off-by: Jouni Malinen <j@w1.fi>
2016-12-03 10:58:39 +02:00
Jouni Malinen
f0b6d1edfb tests: WDS 4addr behavior on reassociation and with open and WEP
This extends the ap_wds_sta test case to cover post-reassociation case
(both with and without Authentication frame exchange) and add similar
test cases to cover open and WEP cases in addition to this existing
WPA2-PSK test case.

These cover functionality testing for the previous fix in
reassociation-without-new-authentication case. In addition, these find a
new mac80211 issue for the WEP + 4addr combination.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-12-02 12:53:07 +02:00
Jouni Malinen
86f938ddea tests: PMF and Authentication frame injection
Verify that AP does not break PMF-enabled connection due to injected
Authentication frame. This is a regression test for
NL80211_FEATURE_FULL_AP_CLIENT_STATE changes resulting in dropping the
key in such a case.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-11-29 16:26:00 +02:00
Jouni Malinen
c85fcff2b1 tests: WPA2-PSK-FT AP with WPA2-PSK enabled and unexpected MDE
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-11-26 11:39:44 +02:00
Jouni Malinen
bacbb62294 tests: Beacon frame TX rate configuration
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-11-26 00:36:50 +02:00
Jouni Malinen
dff690b859 tests: Random MAC address in scans while connected
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-11-25 22:52:39 +02:00
Jouni Malinen
afe280539b tests: D-Bus P2P and IP address parameters
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-11-21 14:45:13 +02:00