Commit graph

1722 commits

Author SHA1 Message Date
Jouni Malinen dd0d294d2f tests: Maximum STA count and limit on Probe Response frames
This verifies hostapd behavior with no_probe_resp_if_max_sta=1.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-10-17 19:31:17 +03:00
Avraham Stern cf0dffd67e tests: Change wpas_config_file test for dedicated P2P Device case
SAVE_CONFIG command on the global control interface tries to save
the config file on all interfaces. The test disabled updating the
config file only on one interface, thus for configurations that
support a dedicated P2P Device interface, saving the config file
would still have succeeded on the P2P Device interface.

Fix the test by disabling updating the configuration file on the global
control interface (which will, in practice, disable this for the P2P
Device interface) in addition to disabling it on the main interface.

Signed-off-by: Avraham Stern <avraham.stern@intel.com>
2015-10-16 20:34:04 +03:00
Avraham Stern c5d070f249 tests: Set MAC address in wpas_ctrl_interface_add2 test
mac80211_hwsim only supports 2 different MAC addresses.
Configurations that use a dedicated P2P Device interface already
use these 2 addresses, so adding another interface on the same
PHY results in a duplicated MAC address.

Fix this by changing the MAC address of the added interface to make
sure the new interface has a unique MAC address.

Signed-off-by: Avraham Stern <avraham.stern@intel.com>
2015-10-16 20:26:48 +03:00
Avraham Stern f487e306b9 tests: Set bridge ageing in ap_wpa2_bridge_fdb test
Set the bridge ageing to 1 sec to make the bridge clear unused
addresses after this interval. Otherwise the test depends on
the local configuration of brctl.

Signed-off-by: Avraham Stern <avraham.stern@intel.com>
2015-10-16 20:22:54 +03:00
Avraham Stern f3b7761ab7 tests: Fix ap_cipher_tkip_countermeasures_sta test
Write the main interface address to the tkip_mic_test debugfs file
to generate Michael MIC failure event (which is different than the
p2p_dev_addr when a dedicated P2P Device interface is used).

Signed-off-by: Avraham Stern <avraham.stern@intel.com>
2015-10-16 20:11:05 +03:00
Jouni Malinen faee294f1e tests: P2P GO Negotiation special cases
These test cases verify behavior with parallel scan operations while
going through GO Negotiation and duplicated GO Negotiation Request frame
RX with not-yet-ready sequence in GO Negotiation.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-10-15 21:31:40 +03:00
Jouni Malinen 754c68de16 tests: Fix P2P message construction byte order for config_method
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-10-15 21:31:03 +03:00
Dan Williams d7273180c6 tests: Fix VM tests for Fedora
Binaries aren't always in /usr/bin/, plus kvm is sometimes 'qemu-kvm'.

Signed-off-by: Dan Williams <dcbw@redhat.com>
2015-10-14 19:23:00 +03:00
Jouni Malinen 78185978ed tests: Fix regulatory domain reset in FST test case failure cases
send_iface_detach_request() can fail and that resulted in skipping a
call to restore_reg_domain() and leaving unexpected country
configuration for following test cases. This could result in failures,
e.g., in this sequence: fst_proto wpas_mesh_open_5ghz

Fix this by ignoring exceptions from send_iface_detach_request() and
continuing to restore regulatory domain.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-10-14 18:43:26 +03:00
Jouni Malinen 4150c7c97c tests: Fix p2ps_channel_both_connected_same
I modified this test case for commit
eabf083984 ('tests: P2PS channel
handling') to use dev[2] instead of dev[0], but forgot to update the
p2ps_connect_p2ps_method() dev list to match that. Fix this to actually
use a concurrent connection.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-10-13 18:57:20 +03:00
Jouni Malinen d679ab74a5 tests: D-Bus ExpectDisconnect
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-10-12 18:14:21 +03:00
Jouni Malinen 7966674d73 tests: Fix dbus_interface to restore P2P channel list to default
It was possible for the dbus_interface test case to leave the P2P
channel lists with 5 GHz channels enabled due to the special driver=none
case. This could make the following P2P test case fail due to selecting
an unexpected channel. Fix this by forcing P2P channel list update at
the end of the dbus_interface test case.

This was triggering with the following hwsim test case sequence:
dbus_interface p2ps_connect_adv_go_p2ps_method_group_iface.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-10-12 15:36:46 +03:00
Jouni Malinen 7c0d66cf7a tests: EAP-MSCHAPv2 error cases
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-10-12 01:55:00 +03:00
Jouni Malinen fd8f443247 tests: Dynamic radio in p2ps_channel_sta_connected_disallow_freq_mcc
Use a dynamic HWSimRadio in p2ps_channel_sta_connected_disallow_freq_mcc
to allow MCC test case to be executed in default setting (MCC disabled
for the default radios).

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-10-11 21:42:03 +03:00
Jouni Malinen 3392503eb0 tests: Speed up P2PS test cases using join-a-group
Figure out GO operating frequency and use a single channel scan with
P2P_CONNECT-join.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-10-11 21:42:03 +03:00
Jouni Malinen 0033eea533 tests: Speed up p2ps_active_go_seeker by using a single-channel scan
There is no test coverage benefit from using all-channels scan in
P2P_CONNECT-join here.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-10-11 21:42:03 +03:00
Jouni Malinen 7dd55f2486 tests: Speed up p2ps_connect_adv_go_persistent
Stop the pending P2P_LISTEN operation priot to issuing P2P_GROUP_ADD to
start a GO. This avoids excessively long wait for the previous Listen
step to complete before being able to start the GO. This makes
p2ps_connect_adv_go_persistent take significantly less time.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-10-11 21:42:03 +03:00
Jouni Malinen 85ceafd39a tests: Make P2PS tests less likely to fail in P2PS-PROV-DONE timeouts
The combination of starting P2P extended listen and issuing
P2P_ASP_PROVISION_RESP almost immediately after that while in P2P_LISTEN
state resulted in caes where the advertiser could end up going back to a
long listen state while trying to retransmit PD Request. This resulted
in p2ps_provision() timing out while waiting for P2PS-PROV-DONE
especially in p2ps_feature_capability_* test cases.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-10-11 21:42:03 +03:00
Ilan Peer eabf083984 tests: P2PS channel handling
Add tests to verify proper handling of channel considerations in P2PS
PD.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
2015-10-11 21:42:03 +03:00
Ilan Peer a537887074 tests: Add role parameter to asp_provision
Signed-off-by: Ilan Peer <ilan.peer@intel.com>
2015-10-11 21:42:03 +03:00
Jouni Malinen f56478ab88 tests: P2PS advertisement as GO having persistent group (no peer entry)
This is a regression test case for the dev NULL pointer dereference in
p2p_build_prov_disc_resp().

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-10-11 12:31:30 +03:00
Jouni Malinen 37211e15fa tests: EAP-MSCHAPv2 protocol tests
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-10-11 00:59:58 +03:00
Jouni Malinen 0d2a7bad0f tests: MSCHAP UTF-8 to UCS-2 conversion error cases
This triggers all three error cases in utf8_to_ucs2().

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-10-10 18:41:22 +03:00
Jouni Malinen d79ce4a6ce tests: Additional OCSP coverage
Verify OCSP stapling response that is signed by the CA rather than a
separate OCSP responder. In addition, verify that invalid signer
certificate (missing OCSP delegation) gets rejected.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-10-10 17:32:53 +03:00
Jouni Malinen 0c6185fc73 tests: Run through OCSP tests with BoringSSL
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-10-09 23:48:30 +03:00
Max Stepanov 8cc4b06f75 tests: P2PS follow-on PD Request with status 11
Add a test case verifying deferred P2PS provision discovery when an
advertiser sends the status 11 (Fail: reject by user) in the follow-on
PD Request.

Signed-off-by: Max Stepanov <Max.Stepanov@intel.com>
2015-10-07 17:07:21 +03:00
Andrei Otcheretianski 9773ea38cf tests: Put seeker into extended listen when deferred PD is expected
Not doing so may result in a deferred PD flow failure (currently the
hwsim tests succeeded because seeker never stopped find, spending enough
time listening, so the follow-on PD would succeed).

Fix this by calling p2p_ext_listen when the seeker receives a deferred
PD failure event. Cancel extended listening when PD is done and also
stop find when seek is done.

Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
2015-10-07 17:07:21 +03:00
Andrei Otcheretianski a3dc75020a tests: Add extended listen functions to WpaSupplicant
Add p2p_ext_listen() and p2p_cancel_ext_listen() functions.

Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
2015-10-07 17:07:21 +03:00
Jouni Malinen 1c532fd5c0 tests: GAS/ANQP and extra ANQP elements
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-10-07 17:07:21 +03:00
Michael Braun ee2b0d19f5 tests: Verify group encryption is set up for VLANs early
Check that there are no unencrypted frames when using hostapd with VLANs
and WPA before the first station connects to the VLAN.

Signed-off-by: Michael Braun <michael-dev@fami-braun.de>
2015-10-06 01:25:39 +03:00
Jouni Malinen a359c7bb23 tests: Read monitor messages more frequently
These test cases left at least one of the attached monitor sockets
blocking for excessive time: ap_wpa2_eap_aka_ext,
ap_hs20_req_conn_capab_and_roaming_partner_preference,
ap_hs20_min_bandwidth_and_roaming_partner_preference, ap_wpa_ie_parsing.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-10-04 20:45:20 +03:00
Jouni Malinen 57ff37d0e8 tests: Speed up hostapd_oom_loop tests
At some point, these hostapd_oom_* test cases started to fail with
wpa_msg() allocation failure for the AP-ENABLED event. This resulted in
unnecessary long test execution (waiting 30 seconds for an event that
was dropped). Speed this up by using a shorter timeout.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-10-04 18:52:38 +03:00
Jouni Malinen 35d2e24bc7 tests: Read monitor events explicitly in wpas_ctrl_interface_add_many
This test case ended up hitting control socket output queue limit
unnecessarily due to the test script not reading pending event messages.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-10-04 18:52:38 +03:00
Jouni Malinen d9052150eb tests: wpa_supplicant control socket and event burst
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-10-04 18:52:38 +03:00
Jouni Malinen 4b9d79b66e tests: Make it less likely to overflow wlan5 control iface socket
Number of test cases did not read all control interface socket events
from the dynamically added wlan5 interface. This could result in hitting
maximum socket TX queue length and failures in the following test cases.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-10-04 01:42:42 +03:00
Jouni Malinen 7d56bd734c tests: Fix connect_cmd_roam with old scan results
connect_cmd_roam did not force a new scan to find the second AP. This
could result in failures due to the ROAM command getting rejected, e.g.,
in the following test case sequence: wext_pmksa_cache connect_cmd_roam.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-10-04 00:35:12 +03:00
Ilan Peer cd27374f5f tests: Modify p2p_channel to also support CSA
Signed-off-by: Ilan Peer <ilan.peer@intel.com>
2015-10-03 21:42:33 +03:00
Johannes Berg f227043711 tests: AP Channel Switch, one switch with only ECSA IE
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2015-10-03 21:37:28 +03:00
Jouni Malinen dd124ee821 tests: hostapd WPS UPnP web OOM
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-10-03 18:04:13 +03:00
Jouni Malinen aeba66b28e tests: Fix OCSP response for ap_wpa2_eap_ttls_ocsp_revoked
Due to a serial number mismatch, the correct "revoked" status was not
used; instead "unknown" was used. While the test case would not fail for
this, incorrect code path was checked.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-10-02 19:16:04 +03:00
Jouni Malinen 242339ded1 tests: WPA2-PSK and retry for EAPOL-Key msg 3/4
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-10-01 18:55:19 +03:00
Jouni Malinen 403610d386 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>
2015-10-01 01:37:47 +03:00
Johannes Berg b1f69186d2 tests: Add test for hostapd cli ordering
When the 'SET wpa 2' command is executed last, it seems to somehow
reset parts of the settings, causing hostapd to beacon with the
pairwise cipher suite selector set to 00-0F-AC:0 (none/use-group).
This is not permitted and should be rejected; wpa_supplicant also
cannot connect.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2015-09-27 15:55:11 +03:00
Jouni Malinen f455998afe tests: WPA2-Enterprise interactive identity entry and ENABLE_NETWORK
This verifies that ENABLE_NETWORK does not trigger reconnection if
already connected. The previous commit fixed a case where it was
possible for that to happen.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-09-22 12:03:53 +03:00
Jouni Malinen 53bd8653c2 tests: WPS and DISABLE/ENABLE AP
This is a regression test case for the issue fixed by the previous
commit (hapd->num_probereq_cb not getting cleared on deinit).

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-09-07 20:53:23 +03:00
Jouni Malinen ae3eacf771 tests: WPS ER learn OOM
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-09-07 17:51:55 +03:00
Jouni Malinen db9c88ebb5 tests: WPS ER SetSelectedRegistrar OOM
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-09-07 17:27:14 +03:00
Jouni Malinen fe67b94506 tests: WPS ER OOM in PutWLANResponse generation
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-09-07 17:11:41 +03:00
Jouni Malinen 3d105cdff6 tests: WPS ER OOM in STA add
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-09-07 17:04:57 +03:00
Jouni Malinen 18478107c2 tests: WPS ER and OOM in HTTP response generation
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-09-07 16:59:19 +03:00