Commit graph

1537 commits

Author SHA1 Message Date
Jouni Malinen
72f460a27b tests: Support non-social oper channel in persistent_group_per_sta_psk
This allows driver-based preference list to override default operating
channel selection mechanism by using a non-social P2P find if needed.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-07-31 15:24:45 +03:00
Jouni Malinen
191d8c4f78 tests: Make wifi_display enforce social channel as operating channel
Previously, this was assumed to be the case due to default channel
selection behavior. However, that may not be the case with driver-based
preference list processing. Enforce a social channel to be used as the
operating channel here since dev[2] uses social channel only device
discovery and needs to find the GO.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-07-31 15:24:45 +03:00
Jouni Malinen
9dd21d5183 tests: Allow local disconnect in openssl_cipher_suite_config_wpas
The openssl_ciphers="EXPORT" case may result in locally generated
disconnection event if the OpenSSL version used in the build rejects
export ciphers in default configuration (which is what OpenSSL 1.1.0
will likely do). Don't report a test case failure in such a case.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-07-28 21:00:18 +03:00
Jouni Malinen
d8aa603d53 tests: Skip fst_attach_wpas_error if no FST support
This check for FST testing support was forgotten from one of the new FST
test cases.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-07-28 18:56:33 +03:00
Max Stepanov
aff4b2c139 tests: Add CPT parameters to p2ps_provision()
Add adv_cpt and seeker_cpt parameters to p2ps_provision() function.
The seeker_cpt is used in P2P_ASP_PROVISION command by a seeker, the
adv_cpt parameter is in P2P_ASP_PROVISION_RESP by an advertiser.

Signed-off-by: Max Stepanov <Max.Stepanov@intel.com>
Reviewed-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
Reviewed-by: Ilan Peer <ilan.peer@intel.com>
2015-07-27 00:47:20 +03:00
Max Stepanov
5e9d05115f tests: Add CPT parameter to p2ps_advertise()
Add an optional parameter to p2ps_advertise() function allowing to
specify CPT priority values.

Signed-off-by: Max Stepanov <Max.Stepanov@intel.com>
Reviewed-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
Reviewed-by: Ilan Peer <ilan.peer@intel.com>
2015-07-27 00:47:20 +03:00
Max Stepanov
c1e31bdb7f tests: Add CPT parameter to WpaSupplicant asp_provision()
Add an optional CPT parameter to asp_provision() method of
WpaSupplicant.

Signed-off-by: Max Stepanov <Max.Stepanov@intel.com>
Reviewed-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
Reviewed-by: Ilan Peer <ilan.peer@intel.com>
2015-07-27 00:47:19 +03:00
Andrei Otcheretianski
e999e56c2c tests: Add p2ps_connect_pd() method
Add p2ps_connect_pd() helper method which strictly validates the PD
results and establishes the connection between peers accordingly.

Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
Reviewed-by: Max Stepanov <Max.Stepanov@intel.com>
Reviewed-by: Ilan Peer <ilan.peer@intel.com>
2015-07-26 21:45:35 +03:00
Andrei Otcheretianski
4796021088 tests: Add p2ps_provision() method
Add generic provision method. This method receives a seeker and an
advertiser devices, advertisement id, method, and a flag which indicates
whether deferred flow is expected. The method returns P2PS-PROV-DONE
events and the pin (if keypad or display method is used).

This method is needed to simplify the P2PS provision flows in the tests.
This method complies to the P2PS specification regarding the expected
order of the show and display PIN events.

Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
Reviewed-by: Max Stepanov <Max.Stepanov@intel.com>
Reviewed-by: Ilan Peer <ilan.peer@intel.com>
2015-07-26 21:45:35 +03:00
Andrei Otcheretianski
1a1b015622 tests: Add asp_provision method to wpa_supplicant
Add asp_provision method which issues either P2PS PD Request or, if the
status is provided, continues the deferred flow by sending follow on
PD Request.

Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
Reviewed-by: Max Stepanov <Max.Stepanov@intel.com>
Reviewed-by: Ilan Peer <ilan.peer@intel.com>
2015-07-26 21:45:35 +03:00
Jouni Malinen
f751368ec3 tests: Make discovery_auto more robust
This test case could fail if there were old BSS entries remaining in
cfg80211 scan results. That happened, e.g., when running test cases in
the following sequence: "discovery_social_plus_one discovery_auto".

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-07-26 18:45:14 +03:00
Jouni Malinen
898b33095e tests: FST SESSION_INITIATE and SESSION_RESPOND error cases
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-07-26 18:45:14 +03:00
Jouni Malinen
78ca254237 tests: More FST GET_PEER_MBIES coverage
The case of valid but unknown peer address was not covered previously.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-07-26 18:45:13 +03:00
Jouni Malinen
54b227a1ff tests: Use a shared FST setup function
This removes quite a bit of duplicated code. In addition, this starts
using different FST group names to get additional coverage.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-07-26 18:45:13 +03:00
Jouni Malinen
1f9427c9cd tests: Explicitly close hostapd global control socket on RELOG
Without this, the run-tests.py socket could have been left in attached
to receive all hostapd global events during a test case. This could hit
the limit of pending messages on the socket since there is nothing
clearing this socket during the execution of a test case. Fix this by
explicitly closing the socket after having completed the RELOG command.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-07-26 18:12:09 +03:00
Jouni Malinen
5994658309 tests: FST attach errors in wpa_supplicant
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-07-26 18:12:09 +03:00
Jouni Malinen
6e2536fc79 tests: FST Setup Request processing and OOM during MBIE update
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-07-26 18:12:09 +03:00
Jouni Malinen
2fffbd4db8 tests: FST setup multiple times
This verifies FST group dialog_token wrap-around and behavior with large
number of session setups and teardowns.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-07-26 18:12:09 +03:00
Jouni Malinen
3aa1ca9aec tests: Additional FST Setup test coverage
This adds a test case that goes through session initialization through
separate commands that can be modified more easily for special case. The
first such special case is using special FST Setup Request frames with
non-standard MBIE contents to hit different code paths for finding the
interface.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-07-26 18:12:08 +03:00
Jouni Malinen
9162eed42b tests: Extend fst_ap_ctrl_iface to support existing groups
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-07-26 18:12:08 +03:00
Jouni Malinen
6c247100e8 tests: FST protocol tests to verify invalid STIE header
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-07-26 11:22:21 +03:00
Jouni Malinen
8936b095ea tests: Fix ap_wps_wpa_cli_action outside VM
Pass absolute path to the daemonized wpa_cli process and add read
privileges for everyone on the action script to make this test case work
better when run without a VM.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-07-23 20:48:33 +03:00
Jouni Malinen
569f8f9b87 tests: eloop socket re-open from timeout/socket handler
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-07-23 18:39:02 +03:00
Jouni Malinen
2602a2ff9e tests: WPS events and wpa_cli action script
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-07-22 17:12:07 +03:00
Anton Nayshtut
4be0dd2232 tests: hostapd DUP_NETWORK
This test checks the functionality of DUP_NETWORK global control
inteface command.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-07-21 13:56:19 +03:00
Jouni Malinen
7b7e8a2ee7 tests: Use codecov build hostapd/wpa_supplicant in FST tests
Try to use the special build for --codecov purposes, if present, instead
of hardcoding the hostapd/wpa_supplicant binary to the default location.
This is needed to collect code coverage correctly.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-07-19 23:10:55 +03:00
Jouni Malinen
ccfe3e5db9 tests: wpa_supplicant ctrl_iface network OOM in string parsing
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-07-19 23:07:04 +03:00
Jouni Malinen
523061996c tests: wpa_supplicant control interface wait for client
This test case is also adding code coverage for process daemonizing and
Linux tracing.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-07-19 23:07:04 +03:00
Jouni Malinen
5b0afb0a29 tests: UUID parsing error cases
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-07-19 22:04:50 +03:00
Jouni Malinen
bd4b9ee5ca tests: NFC connection handover to form a new P2P group and IP pool OOM
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-07-19 17:28:44 +03:00
Jouni Malinen
ccf4d7644a tests: WPS ER OOM in XML processing
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-07-19 16:44:51 +03:00
Jouni Malinen
2c3a019083 tests: Initial AP configuration and OOM during PSK generation
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-07-19 16:31:12 +03:00
Jouni Malinen
3b765ea545 tests: FST-MANAGER TEST_REQUEST error cases
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-07-18 19:29:39 +03:00
Jouni Malinen
7ba240b90f tests: FST protocol testing for Ack Response
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-07-18 19:08:06 +03:00
Jouni Malinen
ca73f7d2d0 tests: FST protocol testing for Setup Response
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-07-18 19:06:31 +03:00
Jouni Malinen
6b294e57a5 tests: Speed up fst_proto by waiting for MGMT-TX-STATUS event
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-07-18 19:05:31 +03:00
Jouni Malinen
4390030a51 tests: FST-MANAGER TEST_REQUEST GET_FSTS_ID and ID not found
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-07-18 17:23:55 +03:00
Jouni Malinen
e84297a8e6 tests: FST-MANAGER SESSION_RESPOND failure
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-07-18 17:23:55 +03:00
Jouni Malinen
feb64551d9 tests: FST-MANAGER SESSION_ADD OOM
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-07-18 17:23:55 +03:00
Jouni Malinen
f067a05589 tests: FST-MANAGER SESSION_SET parameter parsing error cases
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-07-18 17:23:55 +03:00
Jouni Malinen
a248e29dac tests: FST-ATTACH OOM in fst_iface_create()
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-07-18 11:13:20 +03:00
Jouni Malinen
3da112c5af tests: Use direct fst_test_common access
There is no need to go through fst_module_aux to reach fst_test_common
since both of these get imported here.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-07-18 11:02:46 +03:00
Jouni Malinen
febd7a4c40 tests: FST attach with llt=0
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-07-18 11:01:44 +03:00
Jouni Malinen
742408afa8 tests: Verify wpa parameter in hostapd GET_CONFIG
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-07-18 00:20:23 +03:00
Jouni Malinen
b6387212f5 tests: Add coverage for new vht_capab values
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-07-18 00:00:20 +03:00
Jouni Malinen
087632168b tests: Add hostapd interface with driver specified
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-07-17 23:57:04 +03:00
Jouni Malinen
f752fd9264 tests: FST session create OOM
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-07-17 19:14:15 +03:00
Jouni Malinen
19a0602d86 tests: FST send action OOM
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-07-17 19:14:15 +03:00
Jouni Malinen
d99ed42a15 tests: FST AP configuration and OOM
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-07-17 19:14:15 +03:00
Jouni Malinen
5e2ad41da3 tests: FST protocol testing
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-07-17 19:14:15 +03:00