Commit graph

1660 commits

Author SHA1 Message Date
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
Jouni Malinen 6f3815c0da tests: WPA2-PSK-FT RRB protocol testing
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-07-17 11:16:15 +03:00
Anton Nayshtut 6f7b96145f tests: hostapd global-to-local control interface redirection
This implements basic global-to-local control interface command
redirection tests.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-07-16 20:23:26 +03:00
Jouni Malinen 2531dc9f6b tests: wpa_supplicant ctrl_iface DUP_NETWORK (global)
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-07-16 18:26:16 +03:00
Jouni Malinen c0183847d9 tests: Silence unnecessary get_driver_status() prints
Commit 53606b105c ('tests: Wait for scan
to complete on all interfaces in reset()') added option of passing
ifname to get_driver_status(). This could result in FAIL-NO-IFNAME-MATCH
returns that get printed out in "Ignore unexpected status-driver line"
messages if the interface is not found. Check for this case to avoid
that unnecessary print.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-07-16 18:26:16 +03:00
Jouni Malinen 85eb89fe56 tests: FST with RSN
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-07-16 18:26:16 +03:00
Jouni Malinen 86ba832cf2 tests: FST AP setup failing due to OOM
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-07-16 18:26:16 +03:00
Jouni Malinen d6d549c47c tests: FST control interface behavior
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-07-16 18:26:16 +03:00
Anton Nayshtut 41a256ecd9 tests: Add FST module tests
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-07-16 18:26:16 +03:00
Jouni Malinen dca95e6924 tests: Invalid P2PS attribute parsing
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-07-13 00:51:15 +03:00
Jouni Malinen 2496adf046 tests: IEEE 802.1X and EAPOL Authenticator aWhile handling
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-07-12 11:45:16 +03:00
Jouni Malinen b7bdfb68f2 tests: IEEE 802.1X and EAPOL_SET command
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-07-12 11:34:18 +03:00
Jouni Malinen a32a6d2ca2 tests: IEEE 802.1X and EAPOL_REAUTH request
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-07-12 11:34:16 +03:00
Jouni Malinen 778325501b tests: More coverage for EAPOL Authenticator state dump
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-07-12 00:20:44 +03:00
Nishant Chaprana bcc332e760 tests: Fix resource leak in test-rsa-sig-ver on error paths
The opened FILE pointer needs to be closed on error paths.

Signed-off-by: Nishant Chaprana <n.chaprana@samsung.com>
2015-07-10 21:10:24 +03:00
Jouni Malinen 6c4b5da46d tests: EAP-TLS and TLS version configuration
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-07-08 19:52:14 +03:00
Andrei Otcheretianski 1ee6dd2671 tests: Few trivial cleanups to P2PS tests
Remove unused variables and replace split(" ") with just split().

Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
Reviewed-by: Ilan Peer <ilan.peer@intel.com>
2015-07-08 16:52:42 +03:00
Andrei Otcheretianski 53606b105c tests: Wait for scan to complete on all interfaces in reset()
When WpaSupplicant executes reset() it waits until all the ongoing scans
are completed. However, it checks the status of the wlanX interface
only. If a dedicated P2P device interface is used, scan may be still
running on the P2P Device interface, e.g., due to P2P_FIND. This might
affect subsequent tests.

Fix this by waiting until the scan is done both on wlanX and P2P
Device interfaces.

Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
Reviewed-by: Ilan Peer <ilan.peer@intel.com>
2015-07-08 16:52:42 +03:00
Jouni Malinen ba53a8a009 tests: Additional invalid NDEF records
These are regression tests for NDEF message parsing issues with payload
length validation.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-07-08 16:52:42 +03:00
Jouni Malinen e0236b152c tests: IEEE 802.1X and HELD state
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-07-07 19:25:31 +03:00
Jouni Malinen 1f560ff08f tests: Add Undefined Behavior Sanitizer (ubsan) configuration
This allows hostapd and wpa_supplicant to be built for hwsim test cases
with ubsan functinality from the recent gcc/clang compiler versions.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-07-07 18:23:04 +03:00
Jouni Malinen 34d3eaa8ee tests: WPA2-PSK-FT AP over DS protocol testing
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-07-07 16:25:06 +03:00
Jouni Malinen cf671d54bd tests: WPA2-PSK-FT and OOM
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-07-07 16:25:06 +03:00
Jouni Malinen 7b741a5383 tests: WPA2-PSK-FT AP with GCMP-256 cipher
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-07-07 16:25:06 +03:00
Jouni Malinen 348bc4e0eb tests: IEEE 802.1X connection and EAPOL-Key protocol tests
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-07-07 16:25:06 +03:00
Jouni Malinen 2ff4928967 tests: IEEE 802.1X and EAPOL-Start retransmissions
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-07-07 16:25:06 +03:00
Jouni Malinen 85774b70a1 tests: EAP server and OOM
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-07-01 00:42:09 +03:00
Jouni Malinen 405c621cdb tests: WPA2-Enterprise connection using MAC ACL
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-07-01 00:34:27 +03:00
Jouni Malinen df7ad0fa11 tests: EAP-TLS and unknown OCSP signer
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-06-30 22:05:37 +03:00
Jouni Malinen d2a1047e67 tests: Invalid OCSP data (parsing failure)
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-06-30 22:01:05 +03:00
Jouni Malinen 7be5ec991d tests: Invalid openssl_ciphers value
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-06-30 21:55:59 +03:00
Jouni Malinen 6eddd5303c tests: EAP-FAST/MSCHAPv2 and server OOM
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-06-30 21:36:12 +03:00
Jouni Malinen b3ff3decf6 tests: DH parameter file DSA conversion and error cases
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-06-29 23:23:56 +03:00
Jouni Malinen 0c83ae0469 tests: EAP-TLS with PKCS12 that includes additional certificates
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-06-29 23:23:56 +03:00
Jouni Malinen b1fb42751a tests: EAP-TLS and OOM
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-06-29 23:23:56 +03:00
Jouni Malinen b197a8194b tests: EAP-TLS and server checking CRL
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-06-29 23:23:56 +03:00
Jouni Malinen 486f4e3c83 tests: EAP-SIM and OOM
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-06-29 23:23:56 +03:00
Jouni Malinen f1ab79c34c tests: WPA2-Enterprise connection using EAP-IKEv2 and OOM
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-06-29 23:23:56 +03:00
Jouni Malinen 8c4e4c01f6 tests: WPA2-Enterprise connection using EAP-PSK and OOM
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-06-29 23:23:56 +03:00
Jouni Malinen 10ba4ae4d3 tests: SAE and no random numbers available
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-06-29 23:23:56 +03:00
Jouni Malinen bf7071bb0c tests: WPA2-PSK AP and no random numbers available
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-06-29 23:23:56 +03:00
Jouni Malinen 0937ea746b tests: Concurrent P2P autonomous GO on 5 GHz and HT40 co-ex
This verifies that 20/40 MHz co-ex scan does not force MCC with PRI/SEC
channel switch.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-06-29 23:23:56 +03:00
Jouni Malinen 7c1fd15f86 tests: Use 16 instead of 13 as the cwmin/cwmax invalid case
This is needed to allow the parser to accept 15 which is actually a
valid value.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-06-27 23:24:15 +03:00
Jouni Malinen fee39910ee tests: Check GAS and ANQP completion events in gas_fragment
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-06-27 17:13:24 +03:00
Jouni Malinen 17ce7bb9db tests: SAE and invalid commit-scalar value 1
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-06-27 12:51:15 +03:00
Jouni Malinen a3704b2aae tests: Use the new CTRL-EVENT-NETWORK-NOT-FOUND in ap_open_select_any
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-06-27 11:09:22 +03:00
Jouni Malinen 9e286d5ea2 tests: sae_groups to include Brainpool EC groups
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-06-26 22:41:51 +03:00
Jouni Malinen b1f487cb74 tests: Try heavier SAE groups in sae_groups
This changes the sae_groups test case design to try with every group and
skip triggering test failure for the heavier ones that are likely to
fail in some VM setups under load. This provides more testing coverage
by not limiting the test based on lowest common setup.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-06-25 20:53:07 +03:00
Jouni Malinen 33dcced589 tests: SAE with number of different passwords
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-06-24 21:07:18 +03:00
Jouni Malinen 1965e1965e tests: SAE anti clogging protocol testing
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-06-23 23:10:36 +03:00
Jouni Malinen 939527b59d tests: SAE reflection attack
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-06-23 23:10:36 +03:00
Jouni Malinen d5479878b8 tests: HT40 co-ex scan conflict (HT40-)
This verifies a case where the neighboring BSS is at the other end of
the band and has its PRI channel further away.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-06-23 11:25:22 +03:00
Jouni Malinen 24f4ad04f7 tests: Use different channel offset for the second 160 MHz VHT AP
This increases testing coverage a bit.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-06-23 02:42:17 +03:00
Jouni Malinen 5161ea8e30 tests: VHT 80 MHz with different HT40 channel options
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-06-23 02:30:24 +03:00
Jouni Malinen 5527a3911a tests: SAE protocol tests
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-06-22 00:04:09 +03:00
Jouni Malinen 80dcede592 tests: HT40 co-ex scan and other BSS not affected
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-06-21 22:27:34 +03:00
Jouni Malinen eb6d353270 tests: SAE and OOM in wpa_supplicant
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-06-20 23:31:12 +03:00
Jouni Malinen 6e3ee4c532 tests: Suite B with external RADIUS server
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-06-20 23:04:31 +03:00
Jouni Malinen d9e2a057c8 tests: D-Bus AddNetwork and connection with WPA+WPA2-Enterprise AP
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-06-20 23:04:31 +03:00
Jouni Malinen 4b0e0c53fc tests: WPA IE parsing
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-06-20 23:04:31 +03:00
Jouni Malinen 1275208c82 tests: Update wpas_ctrl_network to match removal of WEP as group cipher
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-06-20 23:04:31 +03:00
Jouni Malinen 664093b55b tests: WPA2-PSK-FT AP and invalid response IEs
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-06-20 18:04:50 +03:00
Jouni Malinen 50a19b0107 tests: HT40 co-ex scan finding an AP advertising 40 MHz intolerant
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-06-20 16:16:11 +03:00
Jouni Malinen f0b347b615 tests: HT40 co-ex scan conflict with HT 20 MHz AP
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-06-20 16:02:53 +03:00
Jouni Malinen 97e4688b2f tests: HT40 on 5 GHz with invalid channel pair
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-06-20 15:51:41 +03:00
Jouni Malinen 5ce2a9ac50 tests: Make dbus_old_wps_pbc more robust
Flush the cfg80211 scan cache explicitly to avoid false failure reports
if a BSS entry from an earlier test case remain. Such a failure could be
hit, e.g., with the following test case sequence:
wpas_mesh_mode_scan p2p_channel_random_social dbus_old_wps_pbc

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-06-20 15:35:52 +03:00
Jouni Malinen 81f8e7e9fb tests: Increase HTTPConnection timeout in ap_wps_upnp_http_proto
It looks like the previous timeout of 0.1 seconds could be hit under
parallel VM load, so double this to 0.2 second to avoid hitting
unnecessary test failures.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-06-19 13:45:16 +03:00
Jouni Malinen 001c4bf5b3 tests: D-Bus RemoveClient()
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-06-19 13:07:03 +03:00
Ben Rosenfeld 2e96aef298 tests: Wait on the global control interface for CTRL-EVENT-REGDOM-CHANGE
The event is not interface specific, so wait for it on the global
control interface socket.

Signed-off-by: Ben Rosenfeld <ben.rosenfeld@intel.com>
2015-06-19 11:31:53 +03:00
Avraham Stern 99b83d0abd tests: Fix grpform_wait_peer group removal in P2P Device case
Get the P2P group interface name so it will be used for group removal to
support configurations that use a dedicated P2P Device interface.

Signed-off-by: Avraham Stern <avraham.stern@intel.com>
2015-06-19 11:28:20 +03:00
Avraham Stern c340e0e8f4 tests: Fix p2p_set_discoverability waiting for CTRL-EVENT-CONNECTED
Wait on the group control interface to support configurations that
use a dedicated P2P Device interface.

Signed-off-by: Avraham Stern <avraham.stern@intel.com>
2015-06-19 11:27:15 +03:00
Ilan Peer bab3191718 tests: Fix wifi_display to use the global control interface
This is needed if the configuration is using a dedicated P2P Device
interface.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
2015-06-19 11:14:30 +03:00
Ilan Peer 063006328a tests: Fix wifi_display_persistent_group with P2P Device
Use the global control interface to list the P2P Device persistent
networks. Get and parse the P2P-GROUP-STARTED events, so later the
interface names would be available for the connectivity test etc. Both
of these are required when a dedicated P2P Device interface is used.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
2015-06-19 11:12:33 +03:00
Ilan Peer 5590d2ecd1 tests: Fix autogo_pbc() waiting for WPS-PBC
Wait on the global control interface to support
configurations that use a dedicated P2P Device interface.

Note that the group interface cannot be used, as the group
interface name is not saved since no group was created.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
2015-06-19 10:59:01 +03:00
Ilan Peer c0b57b241a tests: Use global and group control interface in test_p2p_autogo
This is required when a dedicated P2P Device is used.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
2015-06-19 10:46:17 +03:00
Ilan Peer a2168cf476 tests: Modify reset() to use the global control interface
Change the reset() method to use the global control interface
for resetting P2P state and also add a call to P2P_FLUSH.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
2015-06-19 10:38:22 +03:00
Ben Rosenfeld 0208e8329d tests: Use global interface for "P2P_SET"
Setting P2P per_sta_psk should be done using the global control
interface.

Signed-off-by: Ben Rosenfeld <ben.rosenfeld@intel.com>
2015-06-19 10:37:08 +03:00
Jouni Malinen 31bd8ea2e9 tests: NFC static handover with invalid contents
This adds test coverage to p2p_procesS_nfc_connection_handover() error
paths. This is also a regression test case for a memory leak on two of
these error paths.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-06-19 01:23:24 +03:00
Jouni Malinen 27f2fab021 tests: WPA2-Enterprise connection using EAP-FAST and OOM in PRF
This is a regression test case for a memory leak on a TLS PRF error
path. In addition, this provides more coverage for this error path.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-06-19 01:23:24 +03:00
Jouni Malinen 0b5740fdef tests: More RADIUS testing coverage with CUI/User-Name in ACL response
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-06-19 00:23:49 +03:00
Jouni Malinen e51c8b2e97 tests: Make ap_wps_ap_scan_2 more robust
The test sequence "scan_and_bss_entry_removed ap_wps_ap_scan_2" resulted
in failure due to an old BSS entry remaining from the first test case to
the second and the WPS_PBC operation on a forced BSSID ending up picking
the incorrect BSS entry. Make this more robust by clearing the scan
results from cfg80211.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-06-18 22:33:48 +03:00
Jouni Malinen 492c3a9180 tests: Make ap_wps_pbc_overlap_2* less likely to cause issues
Both of these test cases were leaving out BSS entries with active PBC
mode at the end of the test. This could result in the next text case
failing, e.g., in "ap_wps_pbc_overlap_2ap grpform_ext_listen" and
"ap_wps_pbc_overlap_2sta grpform_ext_listen" sequences. Fix this by
flushing the scan results more carefully at the end of the PBC overlap
test cases.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-06-18 22:29:14 +03:00
Jouni Malinen 9f622398e4 tests: Print a command line to re-run failed test sequence
This makes it easier to test whether a specific test sequence results in
a reproducible test failure.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-06-18 21:39:24 +03:00
Jouni Malinen 7242b3df37 tests: P2PS with large number of services in Probe Request/Response
This verifies capability to split the response into multiple P2P
elements.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-06-18 18:14:04 +03:00
Jouni Malinen 3d7d9f18db tests: Extend P2PS service seek test to cover multiple services
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-06-18 18:14:04 +03:00
Max Stepanov 5a2c379736 tests: P2PS wildcard SD probe
Verify that advertiser returns 'org.wi-fi.wfds' wildcard in a Probe
Response frame if at least one P2PS advertisement is present.

Signed-off-by: Max Stepanov <Max.Stepanov@intel.com>
Reviewed-by: Ilan Peer <ilan.peer@intel.com>
2015-06-18 18:14:04 +03:00
Jouni Malinen 866eb800e5 tests: VENDOR_ELEM_ADD for various frames
This increases testing coverage for VENDOR_ELEM mechanism by explicitly
verifying that the requested element gets added to each of the supported
frame types.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-06-15 14:16:30 +03:00
Andrei Otcheretianski a4c4c1d0e4 tests: Add p2ps_cli_probe and p2ps_go_probe tests
Test P2PS GO and CLI discoverability on group operating channel.
In order to implement these tests, refactor p2ps_connect_p2ps_method
and test_p2ps_connect_adv_go_pin_method to reuse the code for
connection establishment. Also change p2ps_exact_seek so it will
allow getting Probe Response frames from several peers.

Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
Reviewed-by: Ilan Peer <ilan.peer@intel.com>
2015-06-14 23:16:55 +03:00
Andrei Otcheretianski d134a2868e tests: Fix inconsistent indentation
Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
Reviewed-by: Ilan Peer <ilan.peer@intel.com>
2015-06-14 23:16:55 +03:00
Andrei Otcheretianski ce394d33e7 tests: Fix p2ps_connect_adv_go_pin_method case
test_p2ps_connect_adv_go_pin_method() expects that
p2ps_provision_keypad_method() returns P2PS-PROV-DONE with details
needed for a connection. However, this event was overridden which
resulted in an incorrect test flow skipping the connection
establishement. The test would pass, however, without really trying to
connect. Fix this by returning the correct event.

Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
Reviewed-by: Ilan Peer <ilan.peer@intel.com>
2015-06-14 23:16:55 +03:00
Jouni Malinen dd025790e5 tests: IBSS on 5 GHz band
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-06-14 19:35:19 +03:00
Jouni Malinen 8cc9bc0775 tests: WNM BSS Transition Management in different countries
This increases testing coverage for ieee802_chan_to_freq*() functions.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-06-14 18:11:14 +03:00
Jouni Malinen 6d01255e57 tests: GAS/ANQP query and OOM
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-06-14 16:17:33 +03:00
Michael Braun 54cf411f4c tests: Verify correct VLAN operation in multi-BSS multi-VLAN case
This adds hwsim test ap_vlan_iface_cleanup_multibss. It connects two
stations in different BSS but the same hostapd process. First both
stations are in VLAN 1, then they get reauthenticated into VLAN 2. Due
to the ordering of the stations moving around, this test checks that
bridge and tagged interface referencing counting is done globally, such
that the tagged interface is not removed too early and no bridge is
left over.

Signed-off-by: Michael Braun <michael-dev@fami-braun.de>
2015-06-14 13:40:50 +03:00
Jouni Malinen 13b3497245 tests: D-Bus Reconnect command
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-06-14 11:38:14 +03:00
Jouni Malinen c1e38fec75 tests: Make flush_scan_cache() more robust
There seem to be cases where flush_scan_cache() was unable to clear all
BSS entries due to a hidden SSID BSS (SSID length 0) showing up again
from cfg80211 BSS table. Check for this and run the flush operation
again if any entries remain.

This fixes an issue where the following hwsim test case sequence
resulted in the last test case failing due to the old BSS entry from the
first test case being in place and showing unexpected flags information:
ap_hs20_min_bandwidth_home_hidden_ssid_in_scan_res
ap_hs20_remediation_required
ap_mixed_security

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-06-12 21:28:14 +03:00
Jouni Malinen ee19ba74cd tests: P2P GO and 5 GHz channels 165 (allowed) and 169 (disallowed) in US
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-06-12 20:54:01 +03:00
Jouni Malinen c518fecc82 tests: Pending GAS query interrupted with deinit
These are regression test cases for a segmentation fault issue (use of
freed memory) where interface removal happened while a gas-query item
was pending.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-06-11 02:57:34 +03:00
Jouni Malinen 1a5041791e tests: Create a P2P persistent group with ADD_NETWORK
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-06-11 00:02:05 +03:00
Jouni Malinen 3a59cda1d0 tests: D-Bus WPS/PBC operation and signal for PBC overlap
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-06-10 20:51:30 +03:00
Jouni Malinen ee120ff381 Remove [MU-BEAMFORMEE] option from hostapd vht_capab parameter
The standard hardcodes the MU Beamformee Capable subfield is hardcoded
to 0 when transmitting by an AP, so there is no need to provide a
configuration parameter for setting this to one.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-06-10 13:41:54 +03:00
Jouni Malinen f5d5161db1 tests: Allow D-Bus GONegotiationRequest signal to include extra argument
This is needed to allow the GO Intent argument to be added without
breaking these test cases.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-06-06 18:16:19 +03:00
Jouni Malinen d4518fe8ed tests: More WPA2-EAP + PMF test coverage
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-06-06 17:13:21 +03:00
Jouni Malinen 98c71cf6b5 tests: Control interface behavior on scan SSID parameter
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-06-05 15:55:26 +03:00
Jouni Malinen d6f6a86a04 tests: wps_priority in configuration and WPS behavior
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-06-04 14:04:16 +03:00
Jouni Malinen f572ae809a tests: D-Bus P2P Cancel
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-05-29 21:13:31 +03:00
Jouni Malinen 2a8e3f35ef tests: D-Bus WPS Cancel operation
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-05-29 21:00:02 +03:00
Jouni Malinen be43588a3c tests: P2P group re-invocation with invitation response getting lost
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-05-29 13:34:22 +03:00
Jouni Malinen 571a1af270 tests: D-Bus FindStopped signal
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-05-25 18:31:09 +03:00
Jouni Malinen efe353d1aa tests: UPDATE_BEACON to change vendor_elements at runtime
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-05-24 13:43:30 +03:00
Jouni Malinen 5e0bedc63c tests: EAP-EKE with server OOM
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-05-24 13:36:16 +03:00
Jouni Malinen f7e3c17b68 tests: WPA2-Enterprise connection using EAP-EKE with serverid NAI
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-05-24 12:48:52 +03:00
Jouni Malinen b4b2f300db tests: ERP with EAP-EKE
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-05-24 12:01:25 +03:00
Jouni Malinen 5748d1e5f8 tests: EAP-TTLS with server certificate valid beyond UNIX time 2^31
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-05-24 11:24:35 +03:00
Jouni Malinen 768ea0bc32 tests: DH params with 2048-bit key
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-05-24 11:03:42 +03:00
Jouni Malinen 75e41ab78a tests: Automatic channel selection with chanlist set
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-05-24 10:43:44 +03:00
Jouni Malinen 38ad1ea317 tests: Fix persistent_group_per_sta_psk for P2P Device case
The dev[1] <--> dev[2] data connectivity test was using incorrect
function. dev[2] is also using a P2P group and as such, can have a
different group interface.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-05-08 18:33:20 +03:00
Jouni Malinen 36e6633415 tests: Fix go_neg_with_bss_connected with P2P Device
Group interface name was fetched from the results of an incorrect group
formation and because of this, group removal failed in case P2P Device
is used and dev[1] ends up getting different group ifname for the
groups.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-05-08 18:33:16 +03:00
Jouni Malinen f033200e94 tests: Add P2P Device support for persistent_group
The network operations need to use the global control interface to be
performed on the interface that stores the network profiles for
persistent groups.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-05-08 18:33:11 +03:00
Ben Rosenfeld 622ef15b77 tests: Update group_ifname after group start
After P2P-GROUP-STARTED event, use group_form_result in order to update
the group_ifname for the device. This is needed when using P2P Device
for managing P2P operations which results in a separate group interface
being used.

Signed-off-by: Ben Rosenfeld <ben.rosenfeld@intel.com>
2015-05-08 18:32:34 +03:00
Ben Rosenfeld 6f27f79084 tests: Use list_networks with p2p=true in test_p2p_channel
In case that there is a need to list the persistent P2P networks,
the global control interface needs to be used.

Signed-off-by: Ben Rosenfeld <ben.rosenfeld@intel.com>
2015-05-08 18:31:05 +03:00
Ben Rosenfeld 9766d403a6 tests: Change persistent_go_client_list to use global interface
Signed-off-by: Ben Rosenfeld <ben.rosenfeld@intel.com>
2015-05-08 18:30:45 +03:00
Ben Rosenfeld 85ef1f4345 tests: Use global interface in persistent_group_invite_removed_client
When removing a persistent P2P group, global interface needs to be used.

Signed-off-by: Ben Rosenfeld <ben.rosenfeld@intel.com>
2015-05-08 18:29:29 +03:00
Ben Rosenfeld 8e751cfa05 tests: Change list_networks() to use global interface with P2P
list_networks() always used the wlanX control interface to query for the
current list of networks. However, when a dedicated P2P Device is used,
the global control interface should be used when checking persistent
group network profiles.

Fix this by adding an optional parameter indicating that the P2P
networks are requested, and in such a case use the global control
interface.

In addition update test_p2p_persistent to use the argument when needed.

Signed-off-by: Ben Rosenfeld <ben.rosenfeld@intel.com>
2015-05-08 18:29:03 +03:00
Ben Rosenfeld d7e2d79b1a tests: Change persistent_group_per_sta_psk to use global interface
This is required for cases that a dedicated P2P Device interface
is used and then the event will happen on the global interface.

Signed-off-by: Ben Rosenfeld <ben.rosenfeld@intel.com>
2015-05-08 18:27:25 +03:00
Ben Rosenfeld cbeab59c9f tests: Change test_p2p_persistent to use the global control interface
Send request to set persistent_reconnect on the global control
interface so it would also work when using a dedicated P2P Device
interface.

Signed-off-by: Ben Rosenfeld <ben.rosenfeld@intel.com>
2015-05-08 18:27:04 +03:00
Ben Rosenfeld cf5d768b33 tests: Change p2p_device_nfc_invite to use global interface
When testing P2P invitation flow, setting the NFC selector
should be done using the global control interface.

Signed-off-by: Ben Rosenfeld <ben.rosenfeld@intel.com>
2015-05-07 21:35:29 +03:00
Ben Rosenfeld cc259e2650 tests: Change p2p_device_misuses() to use group interface
Calling "DISASSOCIATE" should be done on the group interface.

Signed-off-by: Ben Rosenfeld <ben.rosenfeld@intel.com>
2015-05-07 21:30:40 +03:00
Ilan Peer 6420643d45 tests: Skip some tests in P2PS when a dedicated P2P Device is used
Some tests in test_p2ps.py test a scenario where a separate P2P
group interface is not used. However, this is not a valid case
when a dedicated P2P Device interface is used, as in such a case
a separate group interface must be used.

Handle this by skipping such tests in case a dedicated P2P Device is
used.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
2015-05-07 21:19:38 +03:00
Ilan Peer 5cef80647e tests: Fix test_p2ps.py to save group results
Call group_form_result() whenever a new group is started, so that
group_ifname gets updated and later, the group can be removed when
needed.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
2015-05-07 21:17:31 +03:00
Ben Rosenfeld 09f60224a5 tests: Remove all P2P networks in call to reset
When resetting a device, remove all the P2P networks to prevent
unexpected behavior in following tests. This is needed for the case
where P2P Device interface is used.

Signed-off-by: Ben Rosenfeld <ben.rosenfeld@intel.com>
2015-05-07 21:14:31 +03:00
Ben Rosenfeld 6f96fdaefb tests: Change test_p2p_messages to use global interface
This is required for cases where P2P Device is used and the event
happens on the global interface.

Signed-off-by: Ben Rosenfeld <ben.rosenfeld@intel.com>
2015-05-07 21:11:03 +03:00
Ben Rosenfeld eb1d68eff0 tests: Change set_country() to use the global interface to get event
This is required for cases that multiple interfaces are used and the
event can happen on any of them, for example when a dedicated P2P Device
interface is used.

Signed-off-by: Ben Rosenfeld <ben.rosenfeld@intel.com>
2015-05-07 21:09:29 +03:00
Ben Rosenfeld 91d3483273 tests: Change p2p_set_ssid_postfix to use the group interface for SSID
This is required for cases where thea P2P Device interface is used.

Signed-off-by: Ben Rosenfeld <ben.rosenfeld@intel.com>
2015-05-07 21:07:20 +03:00
Ben Rosenfeld 3d5b1a6452 tests: Fix test_ap_pmf to use own_addr
The tests used p2p_dev_addr that can be different from own_addr,
if a dedicated P2P Device interface is used.

Signed-off-by: Ben Rosenfeld <ben.rosenfeld@intel.com>
2015-05-07 21:02:37 +03:00
Jouni Malinen f79a5fa006 tests: Add a STA entry for ap-mgmt-fuzzer
This increases the coverage for AP mode management frame fuzzing by
allowing number of additional Action frame code paths to be executed.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-05-03 18:26:50 +03:00