Commit graph

2471 commits

Author SHA1 Message Date
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
Jouni Malinen
242fc738a0 tests: GAS/ANQP and Capability List ANQP-element
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-11-17 16:00:59 +02:00
Jouni Malinen
8e5c2c208e tests: GAS/ANQP and Venue URL
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-11-17 16:00:59 +02:00
Jouni Malinen
96a5b80958 tests: Make ap_interworking_scan_filtering more robust
It was possible for the first wt.clear_bss_counters(bssid) call to fail
the test if timing worked out in a way that the wlantest process had not
received any Beacon frames from the first AP. Run a directed scan for
both of the BSSs before starting the test validation steps to make sure
such a case cannot fail this test case.

Signed-off-by: Jouni Malinen <j@w1.fi>
2016-10-29 22:23:53 +03:00
Jouni Malinen
baa8f5ba26 tests: hostapd stationary_ap=1 in neighbor DB
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-10-29 19:25:39 +03:00
Jouni Malinen
8618b3c221 tests: Open AP and TDLS prohibited
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-10-29 00:28:17 +03:00
Jouni Malinen
09b306b1e5 tests: Avoid failures in ap_vlan_without_station with new kernel
The kernel commit 'mac80211: filter multicast data packets on AP /
AP_VLAN' started filtering out the test frame used in
ap_vlan_without_station and that resulted in false failures. For now,
ignore that "error" case to avoid claiming failures when the kernel is
doing what it is expected to do.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-10-27 21:37:19 +03:00
Jouni Malinen
b64fa750b6 tests: Enable FILS in the example hwsim build configurations
This allows the new FILS test cases to be executed automatically when a
recent enough kernel version is used.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-10-27 16:06:13 +03:00
Jouni Malinen
7d8da7c837 tests: FILS
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-10-26 00:41:04 +03:00
Jouni Malinen
74b23fafe9 tests: WPS PBC with two APs advertising same SSID
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-10-11 00:30:15 +03:00
Jouni Malinen
677c2283e7 tests: Update eap_proto_psk_errors and ap_wpa2_eap_psk_oom
The extension of aes_128_ctr_encrypt() to allow AES-192 and AES-256 to
be used in addition to AES-128 for CTR mode encryption resulted in the
backtrace for the function calls changing. Update the test cases that
started failing due to that change.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-10-10 20:27:31 +03:00
Jouni Malinen
a8ef83f49d tests: Mesh network and SELECT_NETWORK
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-10-09 17:09:56 +03:00
Michael Braun
150948e68b test: FT: EAP test for mismatching keys
Signed-off-by: Michael Braun <michael-dev@fami-braun.de>
2016-10-09 12:02:23 +03:00
Michael Braun
d0175d6e48 test: FT with locally generated PMK-R0/PMK-R1 from PSK
Signed-off-by: Michael Braun <michael-dev@fami-braun.de>
2016-10-09 12:01:34 +03:00
Jouni Malinen
c64b454a2f tests: Fix wpas_ctrl_sched_scan_plans without WPA_TRACE
This test case did not clear sched_scan_plans if alloc_fail() resulted
in skipping the test case. This would result in the following
autoscan_exponential and autoscan_periodic test cases failing.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-10-03 11:35:42 +03:00
Avraham Stern
8181c13a8d tests: Fix cfg80211_tx_frame test
In case that a dedicated P2P Device interface is used, a new interface
must be create for a P2P group. Thus, in order to send mgmt
frames, attach a new WpaSupplicant object to the newly created group
and use this object for sending the frames.

Signed-off-by: Avraham Stern <avraham.stern@intel.com>
Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
2016-10-02 21:27:43 +03:00
Ilan Peer
401ff12799 tests: Use global control interface to remove P2P networks
Use the global control interface to remove P2P networks in
persistent_group_peer_dropped3 to support configurations that use a
dedicated P2P Device interface.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
2016-10-02 21:16:55 +03:00
Avraham Stern
a71a3d6d46 tests: Fix p2p_ext_vendor_elem_assoc test with P2P Device interface
For configurations that use a dedicated P2P Device interface, which
mandates that a separate interface is used for the P2P group, vendor
specific IE's must be added to the VENDOR_ELEM_P2P_* frame types in
order to be used by the P2P group interface. The VENDOR_ELEM_ASSOC_REQ
(13) parameter would need to be issued on the group interface which
would be challenging to do due to timing in case a separate group
interface gets used.

In case a dedicated P2P Device interface is used, don't include a test
for VENDOR_ELEM_ASSOC_REQ to avoid failing this part of the test case.

Signed-off-by: Avraham Stern <avraham.stern@intel.com>
2016-10-02 19:57:34 +03:00
Jouni Malinen
d57ca5cd45 tests: Fix ap_track_taxonomy to clear country code setting
This test case could have ended with the station devices still in US
regulatory domain and that could make a following test case fail in some
sequences. For example, "ap_track_taxonomy ibss_5ghz" sequence made
ibss_5ghz fail to see the regdom change event since there was not one
due to the US country code already being in use at the beginning of the
test case. Fix this by clearing the country code at the end of
ap_track_taxonomy.

Signed-off-by: Jouni Malinen <j@w1.fi>
2016-09-30 23:46:17 +03:00
Jouni Malinen
09b812c952 tests: Extend gas_anqp_get to cover MBO cases with non-MBO AP
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-09-30 22:45:03 +03:00
Jouni Malinen
5b71cb552b tests: Update server and user certificates (2015)
The previous versions expired, so need to re-sign these to fix number of
the EAP test cases.

Signed-off-by: Jouni Malinen <j@w1.fi>
2016-09-30 22:45:03 +03:00
Jouni Malinen
a39a54517a tests: Long P2P_LISTEN and offchannel TX
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-09-27 00:43:27 +03: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
62066bef69 tests: MBO and ignoring disallowed association
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-09-25 17:31:26 +03:00
Jouni Malinen
f75a0c0c0c tests: Fix a typo in a debug message (mbo_assoc_disallow)
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-09-25 17:31:26 +03:00
Jouni Malinen
80b84fb2d2 tests: Update MBO test cases for non_pref_chan changes
The reason_detail field was removed from the implementation, so the test
cases need matching changes.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-09-25 17:31:26 +03:00
Mikael Kanstrup
7137c7daee tests: Add testcase for reconnect failure due to auth timeout
Add testcase to verify a failed reconnect attempt due to authentication
timeout blacklists the correct AP. Driver capabilities are forced to
non-SME and driver roaming (BSS selection) mode.

Signed-off-by: Mikael Kanstrup <mikael.kanstrup@sonymobile.com>
2016-09-23 17:36:55 +03:00
Mikael Kanstrup
d258c70f96 tests: Add testcase for (reassoc) roam failure due to auth timeout
Add testcase to verify failed roaming attempt due to authentication
timeout blacklists the correct AP. Roaming attempt is performed
with the reassociate command and bssid_set=1. Driver capabilities
are forced to non-SME and driver roaming (BSS selection) mode.

Signed-off-by: Mikael Kanstrup <mikael.kanstrup@sonymobile.com>
2016-09-23 17:36:55 +03:00
Jouni Malinen
1c82fbf271 tests: Make pmksa_cache_{,opportunistic_}multiple_sta more robust
Clear wpa_supplicant scan cache before starting these test cases since
the ROAM command depends on the correct BSS entry being found.
scan_for_bss() does not enforce that correct entry to be present if
there was an earlier BSS entry with the same BSSID.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-09-23 17:36:14 +03:00
Jouni Malinen
78a37200f8 tests: Reset wlan5 device before RELOG command
This moves the wpa_supplicant debug entries from the end of a test case
using a dynamically added wlan5 interface to the correct test case,
i.e., the test case that added the interface instead of whatever test
case happens to follow this.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-09-23 16:03:59 +03:00
Jouni Malinen
50bb5c8627 tests: WPA-PSK AP and only rsn_pairwise set
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-09-23 11:45:55 +03:00
Ilan Peer
7487ef144e tests: Skip wpas_ap_dfs when MCC > 1
Skip wpas_ap_dfs in case that multi-channel is used, as
DFS operation is not supported in such a case.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
2016-09-22 23:46:27 +03:00
Jouni Malinen
5c30a84b91 tests: mode=mesh in STATUS
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-09-22 23:20:48 +03:00
Jouni Malinen
425cb95337 tests: AP tracking STA taxonomy
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-09-22 00:45:24 +03:00
Jonathan Afek
44a4c52c86 tests: Setup wlantest once for qosmap tests
Some tests call the check_qos_map() function more than once. Make sure
each test sets up wlantest only once before the first time the function
is called.

The wlantest setup sets the channel for the wlantest interface and
executes the wlantest executable. It is more efficient to do that only
once for each test.

Signed-off-by: Jonathan Afek <jonathanx.afek@intel.com>
2016-09-17 22:14:06 +03:00
Jonathan Afek
c7ca843d05 tests: Increase timeout for remote tests
Some operations take longer time on real hardware than on hwsim. This
commit increases two timeouts so that the tests will pass on real
hardware, too.

Signed-off-by: Jonathan Afek <jonathanx.afek@intel.com>
2016-09-17 22:12:35 +03:00
Jonathan Afek
67a0d4f94e tests: Increase connection timeouts for remote tests
Use increased timeouts for connect and disconnect since these operations
take a longer time on real harware than they do on hwsim.

Signed-off-by: Jonathan Afek <jonathanx.afek@intel.com>
2016-09-17 22:09:36 +03:00
Jouni Malinen
4ef3325fb6 tests: Dynamic Interworking element update
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-09-08 19:48:44 +03:00
Jouni Malinen
30ee6cc436 tests: FTM capability indication
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-09-05 21:43:36 +03:00
Jouni Malinen
ff22993594 tests: VHT with 80 MHz channel width and use_sta_nsts=1
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-09-05 21:16:40 +03:00
Jouni Malinen
cb320a6d2d tests: Allow regdb missing some op classes in mbo_supp_oper_classes
Not all installed regdb files include channels for global operating
classes 121-123, and 129.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-08-22 19:22:01 +03:00
Jouni Malinen
d952f02136 tests: Make FST kill_pid() more robust
It looks like the attempt to read the process id from a PID file can
return empty data. This resulted in kill_pid() failing to kill the
process and all the following FST test cases using the extra interface
failing. While the PID file is really supposed to have a valid PID value
when we get this far, it is better to try multiple times to avoid
failing large number of test cases.

The current os_daemonize() implementation ends up calling daemon() first
and then writing the PID file from the remaining process that is running
in the background. This leaves a short race condition where an external
process that started hostapd/wpa_supplicant could end up trying to read
the PID file before it has been written.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-08-22 17:44:05 +03:00
Jouni Malinen
7509b550f6 tests: hostapd and ctrl_iface commands when BSS not yet fully enabled
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-08-22 17:44:05 +03:00
Jouni Malinen
548d280162 tests: IAPP and multiple BSSes
This verifies IAPP socket registration from multiple hostapd interfaces.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-08-18 20:07:17 +03:00
Jouni Malinen
6b6286eb78 tests: hostapd and MIB ctrl_iface command with open network
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-08-18 10:42:56 +03:00
Jouni Malinen
26820b4fc1 tests: IEEE 802.1X + WEP reauthentication
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-08-17 13:40:40 +03:00
Jouni Malinen
e5d3e13a5c tests: Fix ap_wps_er_http_proto max concurrent requests case
Commit 2d6a526ac3 ('tests: Make
ap_wps_er_http_proto more robust') tried to work around the timeouts
here, but that was not really the best approach since the one second
timeout that was used here for connect() ended up being very close to
the limit even before the kernel change. The longer connect() time is
caused by a sequence where the listen() backlog ignores the connection
instead of accept() followed by close() within the wpa_supplicant ER
HTTP connection handling. The time to retransmit the SYN changed a bit
in the kernel from 1.0 sec to about 1.03 sec. This was enough to push
that over the one second timeout.

Fix this by using a sufficiently long timeout (10 sec) to allow SYN
retransmission to occur to recover from the listen() backlog case.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-08-17 13:37:25 +03:00
Jouni Malinen
50348c5c32 tests: More coverage for IBSS RSN OOM
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-08-14 00:22:50 +03:00
Jouni Malinen
a412157262 tests: IBSS RSN group rekeying
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-08-13 16:29:07 +03:00
Jouni Malinen
2d6a526ac3 tests: Make ap_wps_er_http_proto more robust
It looks like connect() for a TCP socket can time out at least with a
recent kernel. Handle that case more gracefully by ignoring that socket
while allowing the test to continue.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-08-11 15:58:13 +03:00
Jouni Malinen
f27b9277d5 tests: Make FST config tests more robust and easier to debug
It looks like it is possible for the separate started wpa_supplicant
process to remain running after a test case like fst_sta_config_default.
This would result in failures to run any following test case that uses
the wlan5 interface. Try to kill the process more thoroughly by waiting
for the PID file to show up and write more details into the logs to make
it easier to debug issues in this area.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-08-10 17:55:20 +03:00
Jouni Malinen
96485214f7 tests: HT/VHT values in STATUS
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-08-02 17:43:38 +03:00
Jouni Malinen
1b8ef4061c tests: WEP with HT/VHT
Verify that HT/VHT gets disabled in WEP configuration.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-08-02 17:43:26 +03:00
Jouni Malinen
ce4af56322 tests: DRIVER_FLAGS command
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-23 20:51:55 +03:00
Jouni Malinen
d9ed0ce65e tests: WPA2-PSK AP with station using SA Query local failures
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-18 00:58:27 +03:00
Jouni Malinen
e0a9370b3f tests: Overlapping BSS scan request (HT40+)
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-18 00:14:34 +03:00
Jouni Malinen
dcbb5d808b tests: FT OOM in SME
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-18 00:14:14 +03:00
Jouni Malinen
674af173fe tests: AP with open mode and driver operations failing
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-17 23:49:44 +03:00
Jouni Malinen
28be769bc3 tests: SAE and invalid anti-clogging token request
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-17 17:53:25 +03:00
Jouni Malinen
dcd54211c4 tests: IEEE 802.1X connection using dynamic WEP104 when WPA enabled
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-17 17:34:16 +03:00
Jouni Malinen
d1150e5666 tests: IEEE 802.1X connection with LEAP included in configuration
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-17 17:34:16 +03:00
Jouni Malinen
2fd44db70e tests: More SAE OOM coverage
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-17 17:34:16 +03:00
Jouni Malinen
19f2a3f357 tests: Hotspot 2.0 OSU provider and OOM
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-17 11:08:02 +03:00
Jouni Malinen
f281f508b7 tests: Hotspot 2.0 OSU provider and invalid directory
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-17 11:08:02 +03:00
Jouni Malinen
502f0ce848 tests: More GET_HS20_ICON coverage
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-17 11:08:02 +03:00
Jouni Malinen
6fc562a406 tests: Unexpected Hotspot 2.0 AP configuration
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-15 13:30:57 +03:00
Jouni Malinen
78d2233f01 tests: Fix ap_wpa2_eap_too_many_roundtrips with OpenSSL 1.1.0
Use a smaller fragment_size to force the roundtrip limit to be reached
with OpenSSL 1.1.0 which seemed to result in a bit shorter TLS messages
being used and being able to complete the authentication successfully
with the previously used fragment_size value.

Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-15 13:30:57 +03:00
Jouni Malinen
ec9812e7e7 tests: Hotspot 2.0 OSU provider and protocol testing
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-15 13:30:57 +03:00
Jouni Malinen
2752537926 tests: Hotspot 2.0 OSU provider and no icon found
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-12 20:58:20 +03:00
Jouni Malinen
424e344fbf tests: Hotspot 2.0 connection and deauthentication request without PMF
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-12 20:49:02 +03:00
Jouni Malinen
21d410ca82 tests: GAS/ANQP and Hotspot 2.0 element protocol testing
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-12 00:14:42 +03:00
Jouni Malinen
5dec77ee00 tests: GAS/ANQP and icon binary protocol testing
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-12 00:05:35 +03:00
Jouni Malinen
3e5f781800 tests: Extend GAS error case coverage
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-11 21:56:56 +03:00
Jouni Malinen
1c39f984fd tests: Hotspot 2.0 icon fetch OOM with REQ_HS20_ICON
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-11 21:56:56 +03:00
Jouni Malinen
8e590f02bd tests: Hotspot 2.0 and connect attempt without matching cred
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-04 18:54:26 +03:00
Jouni Malinen
6b16e073d3 tests: ANQP no sharing
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-04 18:50:59 +03:00
Jouni Malinen
c342bb7a3d tests: Hotspot 2.0 and select with multiple matching home credentials
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-04 18:43:30 +03:00
Jouni Malinen
c63f2eb973 tests: Hotspot 2.0 connection with TTLS/default
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-04 18:24:23 +03:00
Jouni Malinen
26e43f01ae tests: Hotspot 2.0 and connect attempt without RSN
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-04 18:24:23 +03:00
Jouni Malinen
99cbec7ea7 tests: Hotspot 2.0 and connect attempt without credential
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-04 18:03:28 +03:00
Jouni Malinen
863a6bf6ae tests: Hotspot 2.0 connection and invalid roaming consortium element
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-04 18:00:23 +03:00
Jouni Malinen
63929c763a tests: Hotspot 2.0 connection and 3GPP credential constraints
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-04 17:49:57 +03:00
Jouni Malinen
604f559ae4 tests: Hotspot 2.0 and failures during profile configuration
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-04 17:49:57 +03:00
Jouni Malinen
af52992a37 tests: Hotspot 2.0 connection and no full match
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-04 17:49:57 +03:00
Jouni Malinen
a7fa20e047 tests: Hotspot 2.0 connection and roaming consortium constraints
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-04 17:49:57 +03:00
Jouni Malinen
416556d06b tests: Hotspot 2.0 network selection with req_conn_capab (not present)
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-04 17:49:56 +03:00
Jouni Malinen
73ece491c1 tests: D-Bus GetAll wpa_config_get_all() OOM
This is a regression test for a crash on wpa_config_get_all() error
path.

Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-04 17:49:56 +03:00
Jouni Malinen
c8fa30f213 tests: Hotspot 2.0 OSU provider and no AP with info
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-03 22:37:01 +03:00
Jouni Malinen
3429e2ff36 tests: GAS/ANQP query OOM
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-03 22:37:01 +03:00
Jouni Malinen
60547477e0 tests: ANQP_GET to unknown BSS
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-03 22:37:01 +03:00
Jouni Malinen
69e85c7fb3 tests: GAS_REQUEST OOM
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-03 22:37:01 +03:00
Jouni Malinen
1ea75c7ce0 tests: Hotspot 2.0 network selection and invalid GAS response
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-03 22:37:01 +03:00
Jouni Malinen
1169516b62 tests: Hotspot 2.0 and maximum BSS load (roaming)
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-03 22:37:01 +03:00
Jouni Malinen
a0061cf48f tests: Hotspot 2.0 network selection with min bandwidth - special cases
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-03 22:37:01 +03:00
Jouni Malinen
43e337f70c tests: Hotspot 2.0 required roaming consortium and no match
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-03 22:37:01 +03:00
Jouni Malinen
d717c10233 tests: Hotspot 2.0 connection and invalid roaming consortium ANQP-element
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-03 22:37:01 +03:00
Jouni Malinen
26597515d5 tests: Hotspot 2.0 with simulated SIM and EAP-SIM - OOM
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-03 22:37:01 +03:00
Jouni Malinen
c8ae9daf2b tests: Fix interworking_select() bssid argument in some test cases
The bssid argument was missing from couple of test cases. While this is
clearly incorrect, it looks like the error did not really cause any
significant issues to the test case. Anyway, better provide the correct
set of arguments to the call.

Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-03 22:37:01 +03:00
Jouni Malinen
0e67d81fb6 tests: Hotspot 2.0 with simulated SIM and EAP-SIM - invalid IMSI
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-03 22:37:01 +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
Jouni Malinen
208ebb9d1a tests: Hotspot 2.0 network selection and OOM
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-03 22:37:01 +03:00
Jouni Malinen
28642616bf tests: Hotspot 2.0 network selection and no roaming consortium
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-03 22:37:01 +03:00
Jouni Malinen
e330daa9f1 tests: Hotspot 2.0 network selection and cred_with_nai_realm cred->realm
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-03 22:37:01 +03:00
Jouni Malinen
04f4a1f59e tests: Hotspot 2.0 multi-cred and same sp_priority
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-03 22:37:01 +03:00
Jouni Malinen
52be7b4116 tests: wpa_supplicant P2P_LO_START and P2P_LO_STOP commands
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-03 22:37:00 +03:00
Jouni Malinen
1c96988bc2 tests: IBSS and key_mgmt field in STATUS
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-03 19:13:42 +03:00
Jouni Malinen
50717e1e32 tests: IBSS operating frequency reporting
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-03 19:13:41 +03:00
Jouni Malinen
a8fd58aa42 tests: MBO and supported operating classes
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-03 19:13:41 +03:00
Jouni Malinen
b47a743942 tests: MBO BSS transition request MBO IE parsing
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-01 01:13:54 +03:00
Jouni Malinen
0073f453ff tests: MBO failure cases
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-06-30 12:53:05 +03:00
Jouni Malinen
3e3f1602b5 tests: MBO WNM token wrap around
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-06-30 12:53:05 +03:00
Jouni Malinen
bbd41e4d2b tests: Invalid MBO non_pref_chan values
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-06-30 01:13:16 +03:00
Jouni Malinen
b9dca2a954 tests: MBO mbo_cell_capa duplicate update
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-06-30 00:34:48 +03:00
Jouni Malinen
b136894fb0 tests: MPM protocol testing - CLS_ACPT event in OPN_SNT
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-06-29 01:56:26 +03:00
Jouni Malinen
434f8f7f82 tests: MPM protocol testing - CLS_ACPT event in CNF_RCVD
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-06-29 01:49:42 +03:00
Jouni Malinen
68f326d5fc tests: Mesh MPM FSM and HOLDING state event OPN_ACPT
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-06-29 01:43:50 +03:00
Jouni Malinen
09d554d1a6 tests: Secure mesh network connectivity failure
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-06-28 20:52:21 +03:00
Jouni Malinen
c3456015fd tests: Mesh peering management protocol testing for peer addition
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-06-28 20:52:04 +03:00
Jouni Malinen
d80d8c6ffc tests: Open mesh network connectivity, no_auto on both peers
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-06-28 20:44:58 +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
5aa751eaf3 tests: Add general filter for remote tests execution
Add a new function decorator for the test functions so that they can be
marked as remote compatible tests. Add a general filter to the remote
tests execution script to only execute tests that are remote compatible.

Signed-off-by: Jonathan Afek <jonathanx.afek@intel.com>
2016-06-27 21:47:37 +03:00
Jonathan Afek
bb04a9a9a3 tests: Use general cmd_execute() for bridge setup commands
The hwsim tests used to execute shell commands in the tests using the
subprocess python module. Use the cmd_execute() general function for
executing shell commands to setup bridge so that this would also work on
remote setups.

Signed-off-by: Jonathan Afek <jonathanx.afek@intel.com>
2016-06-27 21:47:37 +03:00
Jonathan Afek
12129dda8e tests: Use cmd_execute() for iw connect command
The hwsim tests used to execute shell commands in the tests using the
subprocess python module. Use the cmd_execute() general function for
executing "iw connect ..." commands so that this would also work on
remote setups.

Signed-off-by: Jonathan Afek <jonathanx.afek@intel.com>
2016-06-27 21:10:35 +03:00
Jonathan Afek
10e09d8316 tests: Use cmd_execute() for ip link set up/down commands
The hwsim tests used to execute shell commands in the tests using the
subprocess python module. Use the cmd_execute() general function for
executing "ip link set up/down" commands so that this would also work on
remote setups.

Signed-off-by: Jonathan Afek <jonathanx.afek@intel.com>
2016-06-27 21:10:35 +03:00
Jonathan Afek
137fd05099 tests: Use cmd_execute() for iw station get command
The hwsim tests used to execute shell commands in the tests using the
subprocess python module. Use the cmd_execute() general function for
executing "iw ... station get" commands so that this would also work on
remote setups.

Signed-off-by: Jonathan Afek <jonathanx.afek@intel.com>
2016-06-27 21:10:35 +03:00
Jonathan Afek
525f8293e5 tests: Use cmd_execute() in find_wpas_process()
The hwsim tests used to execute shell commands in the tests using the
subprocess python module. Use the cmd_execute() general function for
executing "ps ax" so that this would also work on remote setups.

Signed-off-by: Jonathan Afek <jonathanx.afek@intel.com>
2016-06-27 21:10:35 +03:00
Jonathan Afek
40c62e6e8d tests: Use cmd_execute() for ip addr add/del
The hwsim tests used to execute shell commands in the tests using the
subprocess python module. Use the cmd_execute() general function for
executing "ip addr add/del .." so that this would also work on remote
setups.

Signed-off-by: Jonathan Afek <jonathanx.afek@intel.com>
2016-06-27 21:10:35 +03:00
Jonathan Afek
2d588c6578 tests: Use cmd_execute() for iw scan
The hwsim tests used to execute shell commands in the tests using the
subprocess python module. Use the cmd_execute() general function for
executing "iw scan .." so that this would also work on remote setups.

Signed-off-by: Jonathan Afek <jonathanx.afek@intel.com>
2016-06-27 21:10:35 +03:00
Jonathan Afek
a548c37bad tests: Use cmd_execute() for iw reg set 00
The hwsim tests used to execute shell commands in the tests using the
subprocess python module. Use the cmd_execute() general function for
executing "iw reg set 00" so that this would also work on remote setups.

Signed-off-by: Jonathan Afek <jonathanx.afek@intel.com>
2016-06-27 21:10:35 +03:00
Jonathan Afek
fb120f1652 tests: Remove unused import subprocess
Number of files imported subprocess without using anything from subprocess.

Signed-off-by: Jonathan Afek <jonathanx.afek@intel.com>
2016-06-27 21:10:35 +03:00
Jonathan Afek
cbd4e92ba1 tests: Add the forgotten wlantest_setup() call to a TDLS test
One TDLS test case was using wlantest without doing the setup first.
This makes the test not work on real hardware. Fix the issue by adding
the wlantest setup to the test.

Signed-off-by: Jonathan Afek <jonathanx.afek@intel.com>
2016-06-27 21:10:35 +03:00
Jonathan Afek
f11005812a tests: Use cmd_execute() in set_powersave()
hwsim_utils.set_powersace() used to do file operations locally in
python. Start using the cmd_execute() general function for file
operations so that this would also work on remote setups.

Signed-off-by: Jonathan Afek <jonathanx.afek@intel.com>
2016-06-27 21:10:35 +03:00
Jouni Malinen
f9442f2967 tests: Wait for CTRL-EVENT-CHANNEL-SWITCH event in ap_csa tests
This verifies that the channel switch is reported by the station and
replaces the fixed sleep before a traffic test by wait for the actual
switch operation to complete.

Signed-off-by: Jouni Malinen <j@w1.fi>
2016-06-27 21:10:35 +03:00
Jouni Malinen
e9f2d54f44 tests: Use shell in local cmd_execute() only if needed
The generic cmd_execute() function was introduced in a manner that
converted the argument array to a string and used shell to run the
command unconditionally. This is not really desirable, so move back to
using the command array by default and use the single command string
with a shell only when really needed.

Signed-off-by: Jouni Malinen <j@w1.fi>
2016-06-27 21:10:35 +03:00
Jonathan Afek
31209e1434 tests: Use cmd_execute() in ap_ht clear_scan_cache()
The ap_ht tests used to execute shell commands in the tests using the
subprocess python module. Complete the move to using the cmd_execute()
general function for executing shell commands so that this would also
work on remote setups.

Signed-off-by: Jonathan Afek <jonathanx.afek@intel.com>
2016-06-27 21:10:35 +03:00
Jonathan Afek
3e3cbbd031 tests: Use cmd_execute() function in ap_ht40_scan_not_affected
The ap_ht tests used to execute shell commands in the tests using the
subprocess python module. Start using the cmd_execute() general function
for executing shell commands so that this would also work on remote
setups.

Signed-off-by: Jonathan Afek <jonathanx.afek@intel.com>
2016-06-27 21:10:35 +03:00
Jonathan Afek
113b8a1a3c tests: Use the cmd_execute() function in ap_ht for iw reg set
The ap_ht tests used to execute iw reg set command using the subprocess
python module. Start using the cmd_execute() general function for
executing shell commands so that this would also work on remote setups.

Signed-off-by: Jonathan Afek <jonathanx.afek@intel.com>
2016-06-27 21:10:35 +03:00
Jonathan Afek
6b4300d0c6 tests: Use apdev[0] more consistently in ap_ht
The test cases ap_ht40_5ghz_invalid_pair and ap_ht40_5ghz_disabled_sec
mixed use of apdev[0] and apdev[1] while only needing a single AP. This
works when both the devices are on the same host (e.g., with
mac80211_hwsim), but not when using separate remote hosts. Fix this by
using apdev[0] more consistently in these test cases.

Signed-off-by: Jonathan Afek <jonathanx.afek@intel.com>
2016-06-27 21:10:35 +03:00
Jonathan Afek
ebc6587d40 tests: Remove trailing whitespace
Signed-off-by: Jonathan Afek <jonathanx.afek@intel.com>
2016-06-27 21:10:35 +03:00
Jonathan Afek
cb3c0d96f4 tests: Pass full apdev to clear_scan_cache()
This is a step towards enabling the needed commands to be run on a
remote host.

Signed-off-by: Jonathan Afek <jonathanx.afek@intel.com>
2016-06-27 21:10:29 +03:00
Jonathan Afek
f8b9e61ef0 tests: Initialize hapd variable before try-finally uses
Some TDLS and WPS test cases reference the hapd variable in the finally
block even if the test failed before assigning the value to this
variable. This makes the code in the finally block to fail on
referencing this variable. Assign None to the hapd variable before
starting the tests to avoid this.

Signed-off-by: Jonathan Afek <jonathanx.afek@intel.com>
2016-06-27 19:04:15 +03:00
Jouni Malinen
643be15d41 tests: GAS failure cases
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-06-27 18:44:55 +03:00
Jouni Malinen
37a6765967 tests: GAS/ANQP query protected vs. not protected
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-06-27 18:33:13 +03:00
Jouni Malinen
1ad6f0d5e6 tests: GAS query deleted at deinit
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-06-27 16:30:08 +03:00
Jouni Malinen
e7d454bb76 tests: D-Bus DeviceFoundProperties signal
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-06-24 19:02:59 +03:00
Jouni Malinen
e18d170848 tests: wpa_state == COMPLETED in mesh
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-06-24 19:02:58 +03:00
Jouni Malinen
d1bc3ec85e tests: wpa_supplicant AP mode - WPS operations with fragmentation
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-06-24 19:02:58 +03:00
Jonathan Afek
f885b8e97c tests: ap_ciphers tests start using general cmd_execute() function
The ap_ciphers tests used to do file operations locally in python. Start
using the cmd_execute() general function for file operations so that
this would also work on remote setups.

Signed-off-by: Jonathan Afek <jonathanx.afek@intel.com>
2016-06-19 23:48:07 +03:00
Jonathan Afek
7fd9fbc27d tests: Add functions to execute shell commands on interface host
Add the feature to execute shell commands on each wpa_supplicant/hostapd
interface host. When executing remote tests the interfaces are not all
on a single host so when executing shell commands the test needs to
execute the command on the host which the interface relevant for the
command is on. This patch enables tests to execute the command on the
relevant host.

Signed-off-by: Jonathan Afek <jonathanx.afek@intel.com>
2016-06-19 23:48:07 +03:00
Jouni Malinen
51435515fb tests: mesh_scan_oom to support partial BSS result reporting
The next commit modifies the BSS command behavior to report partial
results for a BSS, so mesh_scan_oom needs to allow a BSS entry to be
returned as long as it does not include the mesh information.

Signed-off-by: Jouni Malinen <j@w1.fi>
2016-06-19 23:48:07 +03:00
Jouni Malinen
2833743d4c tests: WPA2-Enterprise connection using EAP-GPSK and wildcard SSID
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-06-19 22:41:23 +03:00
Jouni Malinen
1f7cd73ca6 tests: More wpa_supplicant AP mode coverage
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-06-19 22:00:20 +03:00
Jouni Malinen
94e8fe90c2 tests: Mesh with various pairwise and group ciphers
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-06-19 20:18:09 +03:00
Jouni Malinen
074f72849f tests: Secure mesh network connectivity with PMF enabled
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-06-18 12:20:50 +03:00
Jouni Malinen
20c7d26f80 tests: More wpa_supplicant/bss.c OOM coverage
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-06-17 20:41:09 +03:00
Jouni Malinen
4425b1ed71 tests: WPS and wpa_supplicant BSS entry limit
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-06-17 14:01:57 +03:00
Jouni Malinen
7309e804cf tests: Make mesh_missing_mic more robust
Check for MESH-PEER-CONNECTED from dev[1] before reporting MGMT-RX
timeout errors from dev[0]. This avoids false failures in case the short
0.01 s timeout at the end of the loop was not long enough to catch the
message.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-06-17 02:05:10 +03:00
Jouni Malinen
0b1b2044cc tests: Add sniffer check to wpas_mesh_max_peering
This verifies that the Accepting Additional Mesh Peerings field is being
cleared properly when the maximum peer links count is reached.

Signed-off-by: Jouni Malinen <j@w1.fi>
2016-06-13 00:04:47 +03:00
Jouni Malinen
a3bd53273e tests: Additional coverage in mesh_sae_groups_invalid
Additional coverage in mesh_rsn_sae_group() with non-zero
wpa_s->mesh_rsn->sae_group_index.

Signed-off-by: Jouni Malinen <j@w1.fi>
2016-06-12 17:56:02 +03:00
Jouni Malinen
61854f16ec tests: GAS/ANQP query and Address 3 value selection
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-06-10 22:30:29 +03:00
Jouni Malinen
739fd20cc3 tests: Mesh peering management protocol testing
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-06-05 11:43:37 +03:00
Jouni Malinen
81d6e230e3 tests: Secure mesh network and PMKID mismatch
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-06-05 11:17:00 +03:00
Jouni Malinen
66bb7d97dd tests: Secure mesh network and missing MIC
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-06-05 01:20:28 +03:00
Jouni Malinen
98628b7f07 tests: Mesh and failure to derive random nonce
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-06-05 00:24:47 +03:00
Jouni Malinen
044d739bdd tests: Secure mesh network and PMKSA caching failing due to OOM
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-06-05 00:20:06 +03:00
Jouni Malinen
e8739be842 tests: Mesh scan element parse error
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-06-05 00:13:40 +03:00
Jouni Malinen
699074d30c tests: Mesh network setup failing due to driver command failure
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-06-05 00:13:40 +03:00
Jouni Malinen
521a98a8f6 tests: Mesh and default beacon interval
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-06-04 21:47:22 +03:00
Jouni Malinen
ec87430ba1 tests: Extend coverage for mesh OOM testing
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-06-04 21:44:19 +03:00
Jouni Malinen
56d62fc3dd tests: Open mesh network on VHT 160 MHz channel
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-06-04 21:31:51 +03:00
Jouni Malinen
2cf6341e64 tests: Mesh and invalid frequency configuration
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-06-04 20:59:39 +03:00
Jouni Malinen
a64476403d tests: Mesh and local failures
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-06-04 00:40:38 +03:00
Jouni Malinen
b0ec3d772a tests: Mesh and local SAE failures
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-06-04 00:30:49 +03:00
Jouni Malinen
f0ee4535d2 tests: Mesh with invalid SAE group configuration
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-06-04 00:08:16 +03:00
Jouni Malinen
9ec916e9f4 tests: wpa_supplicant secure MESH and SAE group negotiation
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-05-30 21:15:30 +03:00
Jouni Malinen
582841689f tests: Secure mesh network setup local failure
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-05-30 21:10:58 +03:00
Jouni Malinen
4d4cdc3bb2 tests: wpa_supplicant mesh scan results and OOM
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-05-30 20:03:32 +03:00
Jonathan Afek
d28cfc2a25 tests: Support P2P group interfaces in hwsim remote tests
Start using the wpa_supplicant remote UDP interface for the control and
monitor sockets for P2P group interfaces so that P2P tests would work on
real hardware. Also have the group requests and events show in the test
log with the hostname and the interface name of the group interface.

Signed-off-by: Jonathan Afek <jonathanx.afek@intel.com>
2016-05-30 17:56:43 +03:00
Jouni Malinen
aa59370b34 tests: wpa_supplicant mesh with dynamic interface addition failing
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-05-30 01:50:09 +03:00
Jouni Malinen
b15acadcfd tests: Mesh network setup failing due to OOM
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-05-30 01:05:16 +03:00
Jouni Malinen
8f5abdb874 tests: More coverage in ap_reassociation_to_same_bss
The extra wait forces the special reattach-scan case to be reached in
wpa_supplicant_scan().

Signed-off-by: Jouni Malinen <j@w1.fi>
2016-05-28 23:28:15 +03:00
Jouni Malinen
3d53cd50ab tests: More coverage in wpas_ctrl_sched_scan_plans
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-05-28 23:00:42 +03:00
Jouni Malinen
4208329528 tests: Scan with SET freq_list and scan_cur_freq
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-05-28 22:47:31 +03:00
Jouni Malinen
fccc4bd518 tests: Duplicate SSID removal with scan_id list
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-05-28 22:47:31 +03:00
Jouni Malinen
0b0e4792d3 tests: Increase scan_fail coverage
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-05-28 22:47:31 +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
Jonathan Afek
04fd8ea1ba tests/remote: Use a function to add a log file to a remote host
Instead of accessing the logs list member of the remote host directly,
use a function to add logs to the remote host to be collected after the
test. This enables us to later have different implementation of remote
hosts or logs collection without requiring to have this list as the
implementation.

Signed-off-by: Jonathan Afek <jonathanx.afek@intel.com>
2016-05-28 16:33:48 +03:00
Jonathan Afek
e2f3f0232f tests: Use 10 retries for over-the-air broadcast connectivity
The regular hwsim tests use both unicast and broadcast frames to test
the connectivity between 2 interfaces. For real hardware (remote hwsim
tests) the broadcast frames will sometimes not be seen by all connected
stations since they can be in low power mode during DTIM or because
broadcast frames are not ACKed. Use 10 retries for broadcast
connectivity tests for real hardware so that the test will pass if we
successfully received at least one of them.

Signed-off-by: Jonathan Afek <jonathanx.afek@intel.com>
2016-05-28 16:33:41 +03:00
Jouni Malinen
90b4c73fdf tests: Fix ap_wpa2_eap_fast_prf_oom with the updated PRF implementation
This is needed to work with the tls_openssl.c changes that renamed the
function that is used for deriving the EAP-FAST keys.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-05-23 20:40:14 +03:00
Jouni Malinen
7f03ecc884 tests: Scan failures
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-05-23 18:43:58 +03:00
Jouni Malinen
a68a749322 tests: P2P group formation using P2PS method without specifying PIN
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-05-20 23:37:51 +03:00
Jouni Malinen
f260ce4be8 tests: wpa_supplicant AP mode - WPS disabled
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-05-14 19:43:30 +03:00
Jouni Malinen
50d06776c6 tests: Fix WEXT testing
Commit afb2e8b891 ('tests: Store P2P
Device ifname in class WpaSupplicant') did not take into account the
possibility of capa.flags not existing in get_driver_status() and broke
WEXT test cases. Fix this by checking that capa.flags is present before
looking at its value.

Signed-off-by: Jouni Malinen <j@w1.fi>
2016-05-14 18:59:47 +03:00
Janusz Dziedzic
a73fa13be2 tests/remote: Add utils file
Add rutils.py for remote tests.

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
2016-05-14 17:56:37 +03:00
Janusz Dziedzic
ede4719718 tests/remote: Add monitor.py
Add monitor support. This supports monitors added to the current
interfaces. This also support standalone monitor with multi interfaces
support. This allows to get logs from different channels at the same
time to one pcap file.

Example of t3-monitor added to config.py file.

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
2016-05-14 17:56:37 +03:00
Janusz Dziedzic
6a003eb2a6 tests: remotehost.py use join
Use join instead of for.

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
2016-05-14 17:19:59 +03:00
Jouni Malinen
df49b90e35 tests: Secure mesh and the first plink Open dropped
This is a regression test case to verify that MTK is calculated properly
also in this unexpected sequence.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-05-13 20:54:51 +03:00
Jouni Malinen
9524e7e5a4 tests: Open network connection with pmf=2
This verifies that pmf=2 is ignored for a non-RSN network while a
network profile specific ieee80211w=2 is enforced.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-05-06 00:35:08 +03:00
Jouni Malinen
2dc754e170 tests: wpa_supplicant config file parsing of arbitrary global values
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-05-02 11:08:25 +03:00
Jouni Malinen
596a3fef83 tests: Use \t instead of \n in discovery_ctrl_char_in_devname
This is needed to allow the SET command to be modified to reject newline
characters.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-05-02 11:08:25 +03:00
Jouni Malinen
8721af54e4 tests: wpa_supplicant config parsing of arbitrary cred values
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-05-02 11:08:25 +03:00
Jouni Malinen
5594df44c7 tests: wpa_supplicant config file writing with arbitrary PSK value
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-05-02 11:08:25 +03:00
Jouni Malinen
f529c0d908 tests: wpa_supplicant config file parsing/writing with WPS
This verifies that a WPA2PSK passphrase with control characters gets
rejected in a WPS Credential and that control characters in SSID get
written as a hexdump.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-05-02 11:08:25 +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
Andrei Otcheretianski
a274b1bcbb tests: Test configuration propagation to group interface
When a dedicated P2P Device interface is used, its configuration should
be cloned to the group interface. Add a test that covers this both when
a separate group interface is used and not.

Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
2016-04-25 00:15:35 +03:00
Andrei Otcheretianski
597cbc0075 tests: Fix persistent_group_peer_dropped tests
Use the global control interface to remove P2P network blocks, to
support cases when a dedicated P2P Device interface is used.

Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
2016-04-25 00:06:20 +03:00
Andrei Otcheretianski
aa713e71e9 tests: Don't use proxy in urllib.urlopen()
Some environments define default system wide HTTP proxy. Using default
system configuration may result in a failure to open some HTTP URLs. Fix
this by ensuring that no proxies are used.

Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
2016-04-25 00:05:34 +03:00
Andrei Otcheretianski
fc30cc10ac tests: Use global control interface for P2P configurations
Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
2016-04-25 00:03:40 +03:00
Ilan Peer
9c01d6a965 tests: Use global control interface to set p2p_no_group_iface
Signed-off-by: Ilan Peer <ilan.peer@intel.com>
2016-04-24 23:47:29 +03:00
Ilan Peer
463b7f3511 tests: Parse group results in a couple of p2p_channel tests
In p2p_channel_vht80_autogo and p2p_channel_vht80p80_autogo, parse the
P2P-GROUP-STARTED event prior to calling the group_request() method, as
otherwise the group ifname is not set.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
2016-04-24 23:45:57 +03:00
Avraham Stern
af93c61450 tests: Modify use of GET command to support P2P Device interface
Support configurations that use a dedicated P2P Device interface by
using the global control interface and specifying the interface name for
the GET commands fetching the ip_addr_go parameter.

Signed-off-by: Avraham Stern <avraham.stern@intel.com>
2016-04-24 23:45:19 +03:00