Commit graph

2378 commits

Author SHA1 Message Date
Jouni Malinen 82358a2a63 tests: Additional hostapd WPS control interface coverage
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-12-28 14:31:42 +02:00
Jouni Malinen cd8cd01cc1 tests: Additional SA_QUERY coverage
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-12-28 14:31:42 +02:00
Jouni Malinen e6c65001f8 tests: Additional hostapd NEW_STA coverage
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-12-28 14:31:42 +02:00
Jouni Malinen 3f9e6ca5a9 tests: hostapd BSS config file
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-12-28 14:31:42 +02:00
Jouni Malinen a0fda9002a tests: hostapd -i command line argument
This adds some more code coverage reachability testing.

Signed-off-by: Jouni Malinen <j@w1.fi>
2016-12-27 14:27:03 +02:00
Jouni Malinen f3569aba06 tests: hostapd SIGUSR1
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-12-27 14:23:46 +02:00
Jouni Malinen 412a70c1ee tests: Ignoring invalid hostapd configuration parameter updates
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-12-27 12:39:44 +02:00
Jouni Malinen eb89361bde tests: hostapd configuration reload
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-12-27 11:16:51 +02:00
Jouni Malinen 8f49787897 tests: IEEE 802.1X connection using static WEP104
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-12-27 11:16:51 +02:00
Jouni Malinen ce5f5cad6b tests: Invalid TX queue params set (cwmin/cwmax)
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-12-27 11:16:51 +02:00
Jouni Malinen 9302b87486 tests: MBO and WPA2 without PMF
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-12-27 11:16:51 +02:00
Jouni Malinen 5026406dd5 tests: WPS getting disabled due to conflicting parameters
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-12-27 11:16:50 +02:00
Jouni Malinen ab62d2e5b6 tests: VHT and TKIP
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-12-27 11:16:50 +02:00
Jouni Malinen 209de576c9 tests: Duplicate BSSID
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-12-27 11:16:50 +02:00
Jouni Malinen 78f00634ba tests: WPA2-PSK AP and no PSK configured
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-12-26 21:21:10 +02:00
Jouni Malinen 49897fb065 tests: Invalid VLAN ID from RADIUS server for ACL
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-12-26 18:39:49 +02:00
Jouni Malinen fedce55a00 tests: Cover both binary search branches in hostapd_maclist_found()
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-12-26 18:28:40 +02:00
Jouni Malinen 0f6fb05d91 tests: Make hostapd_oom_wpa2_psk catch cases more robustly
For some reason, a potential OOM in hostapd_config_read_wpa_psk() and
hostapd_derive_psk() were missed in --codecov runs during the main
iteration loop. Cover these specific cases with separate instances to
avoid missing coverage.

Signed-off-by: Jouni Malinen <j@w1.fi>
2016-12-26 18:24:05 +02:00
Jouni Malinen 9ec3debf24 tests: FILS SK authentication with SHA384
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-12-26 14:50:28 +02:00
Jouni Malinen b6437fa54b tests: VHT with 160 MHz channel width and HT40 disabled
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-12-26 14:30:50 +02:00
Jouni Malinen 90bef2c9c3 tests: VHT 160 MHz tests with all different HT primary channels
This extends previous ap_vht160_no_dfs test case coverage by running the
same test case with each of the possible HT primary channel
alternatives.

Signed-off-by: Jouni Malinen <j@w1.fi>
2016-12-26 14:30:50 +02:00
Jouni Malinen 7a92dbd792 tests: SAE protocol testing with hostapd
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-12-26 14:30:50 +02:00
Jouni Malinen e4b5f889b4 tests: Remove src/common/cli.c from code coverage report
This file is used only by hostapd_cli and wpa_cli and neither of those
are currently included in code coverage reporting. Avoid dropping the
coverage numbers by code that cannot be reached due to not being
included in the programs that are covered.

Signed-off-by: Jouni Malinen <j@w1.fi>
2016-12-26 14:30:50 +02:00
Jouni Malinen 09af451bd0 tests: Operating classes with HT20 and HT40 channels
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-12-26 00:17:05 +02:00
Jouni Malinen 1106833537 tests: Fix p2p_autogo_pref_chan_not_in_regulatory with new regdb
5745 MHz was added as an allowed short range device range in
wireless-regdb for DE which made this test case fail. Fix it for now by
using SE instead of DE for the second part of the test case.

Signed-off-by: Jouni Malinen <j@w1.fi>
2016-12-25 01:09:06 +02:00
Jouni Malinen 963041c3cb tests: Fix mesh_open_vht_160 skipping
It is possible for wireless-regdb to include a 160 MHz channel, but with
DFS required. This test case need the regulatory information to allow
160 MHz channel without DFS. Fix false failures by skipping the test if
this exact combination is not found.

Signed-off-by: Jouni Malinen <j@w1.fi>
2016-12-25 00:47:01 +02:00
Jouni Malinen 2db07d16bf tests: Fix peerkey_sniffer_check with newer Wireshark version
Wireshark renamed eapol.keydes.key_info to
wlan_rsna_eapol.keydes.key_info and that broke this test case when
upgrading Wireshark. Fix this by trying to use both the new and the old
name.

Signed-off-by: Jouni Malinen <j@w1.fi>
2016-12-25 00:38:52 +02:00
Jouni Malinen 6219943d57 tests: Fix eap_fast_tlv_nak_oom and eap_fast_proto_phase2
Something broke eap_fast_tlv_nak_oom when moving from Ubuntu 14.04 to
16.04. OpenSSL.SSL.Connection() state_string() returns None in these
cases and the debug log prints for that were causing the case to fail.
For now, work around this by checking whether the state string is None
before trying to print it.

Signed-off-by: Jouni Malinen <j@w1.fi>
2016-12-25 00:19:26 +02:00
Jouni Malinen fabce22df6 tests: Clear monitor socket within p2p_msg_unexpected_go_neg_resp
This makes the debug log easier to understand and avoids leaving large
number of pending messages into the wpa_supplicant control interface
sockets.

Signed-off-by: Jouni Malinen <j@w1.fi>
2016-12-24 13:09:23 +02:00
Jouni Malinen 4e6bd66744 tests: Additional D-Bus WPS Get/Set properties
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-12-23 21:28:43 +02:00
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