aboutsummaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* tests: Generate new certificates for Suite B test casesJouni Malinen2016-02-0110-139/+139
| | | | | | | The previous version expired in January. The new ones are from running ec-generate.sh and ec2-generate.sh again. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* tests: Verify that ip_addr_* gets written to config fileJouni Malinen2016-01-151-0/+12
| | | | Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* tests: Roam between two WPA2-PSK APs and try to hit a disconnection raceJouni Malinen2016-01-151-0/+20
| | | | | | | | | This is a regression test case for hostapd bug where the disconnection/deauthentication TX status callback timeout could be forgotten after new association if no ACK frame was received and the STA managed to reconnect within two seconds. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* tests: Fix EAP-SAKE error test case coverageJouni Malinen2016-01-151-0/+2
| | | | | | | This was missing the second eap_sake_compute_mic() call in eap_sake_process_confirm(). Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* tests: More EAP-MSCHAPv2 error coverageJouni Malinen2016-01-151-49/+189
| | | | Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* tests: Fix wpas_ctrl_oomJouni Malinen2016-01-151-16/+18
| | | | | | | | The OpenSSL memory allocation changes broke this test case. Fix this by removing the cases that do not get triggered anymore and add a separate wpas_ctrl_error test case to cover the fail_test() versions of errors. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* tests: Clean up eap_proto_ikev2Jouni Malinen2016-01-151-4/+26
| | | | | | | Use helper variable to indicate end of the test case instead of having to use a fixed length of the loop. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* tests: EAP-IKEv2 with default fragment_sizeJouni Malinen2016-01-151-0/+6
| | | | Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* tests: More EAP-SIM and EAP-AKA local error coverageJouni Malinen2016-01-141-1/+106
| | | | Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* tests: fail_test instead of alloc_fail for aes_{encrypt,decrypt}_initJouni Malinen2016-01-143-43/+56
| | | | | | | | This is needed to fix ap_wpa2_eap_psk_oom, ap_wpa2_eap_sim_oom, eap_proto_psk_errors, and ap_ft_oom with the new OpenSSL dynamic memory allocation design. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* tests: Additional EAP-pwd error case coverageJouni Malinen2016-01-141-11/+42
| | | | Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* tests: WPS and EAP-WSC in network profileJouni Malinen2016-01-132-0/+116
| | | | | | | This goes through some error paths that do not really show up in real WPS use cases. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* tests: Fix ERP anonymous_identity test casesJouni Malinen2016-01-132-1/+17
| | | | | | | These need to be run without realm in the identity value to allow the realm from the anonymous_identity to be used. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* tests: EAP-WSC protocol testsJouni Malinen2016-01-131-0/+179
| | | | Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* tests: Renew the expired OCSP responder certificateJouni Malinen2016-01-121-18/+18
| | | | | | This certificate expired and that makes couple of test cases fail. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* tests: EAP protocol tests for canned EAP-Success after identityJouni Malinen2016-01-121-0/+54
| | | | Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* tests: ERP and local error casesJouni Malinen2016-01-121-1/+79
| | | | Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* tests: ERP and anonymous identityJouni Malinen2016-01-121-1/+72
| | | | Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* tests: EAP-SIM/AKA with external GSM/UMTS auth failingJouni Malinen2016-01-081-0/+84
| | | | Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* tests: EAP-SIM with external GSM auth and replacing SIMJouni Malinen2016-01-082-0/+210
| | | | | | | | | | These test cases verify that EAP-SIM with external GSM auth supports the use case of replacing the SIM. The first test case does this incorrectly by not clearing the pseudonym identity (anonymous_identity in the network profile) while the second one clears that and shows successful connection. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* tests: Make eap_check_auth() error on missing selectedMethod clearerJouni Malinen2016-01-061-0/+3
| | | | | | | | | | It was possible to hit an error case in ap_wpa2_eap_in_bridge where the selectedMethod STATUS field was not available. This resulted in not very helpful "'selectedMethod'" message in the test log file. Make this clearer by dumping all received STATUS fields and a clearer exception message indicating that selectedMethod was missing. Signed-off-by: Jouni Malinen <j@w1.fi>
* tests: EAP-PAX local error casesJouni Malinen2016-01-061-0/+50
| | | | Signed-off-by: Jouni Malinen <j@w1.fi>
* tests: WPS and EAP-WSC error casesJouni Malinen2016-01-061-0/+78
| | | | Signed-off-by: Jouni Malinen <j@w1.fi>
* tests: EAP-OTP local error casesJouni Malinen2016-01-061-0/+37
| | | | Signed-off-by: Jouni Malinen <j@w1.fi>
* tests: WPA2-Enterprise connection using EAP-TTLS/EAP-GTC (OOM)Jouni Malinen2016-01-061-0/+19
| | | | Signed-off-by: Jouni Malinen <j@w1.fi>
* tests: EAP-EKE peer OOM in building ID messageJouni Malinen2016-01-061-0/+1
| | | | | | | The previous attempt at testing this path ended up selecting a different wpabuf_alloc() call. Signed-off-by: Jouni Malinen <j@w1.fi>
* tests: WPA2-Enterprise connection using EAP vendor test (OOM)Jouni Malinen2016-01-061-0/+18
| | | | Signed-off-by: Jouni Malinen <j@w1.fi>
* tests: Speed up discovery_group_client and nfc_p2p_clientJouni Malinen2016-01-063-5/+13
| | | | | | | There is no need for these to go through a full scan when the GO operating channel is known. Signed-off-by: Jouni Malinen <j@w1.fi>
* tests: Make P2P discovery on non-social channel cases more robustJouni Malinen2016-01-041-0/+13
| | | | | | | | | | | | The test cases discovery_ctrl_char_in_devname and discovery_group_client tried to allow three P2P_FIND instances to be used before reporting an error. However, this did not really work properly since the second and third attempts would likely fail to start the initial special P2P_FIND scan due to an already ongoing p2p_scan operation. Fix this by stopping the previous P2P_FIND and waiting for the scan to complete if a retry is needed. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* tests: EAP-LEAP protocol tests (error paths)Jouni Malinen2016-01-041-0/+284
| | | | Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* tests: wpa_supplicant AP mode - unexpected P2P IE in Association RequestJouni Malinen2016-01-011-0/+27
| | | | | | | | | This verifies that there is no NULL pointer dereference when the AP code processes Probe Request and (Re)Association Request frames with a P2P IE in case P2P support is explicitly disabled on the AP mode interface. This is a regression test case for the fixes in the previous commit. Signed-off-by: Jouni Malinen <j@w1.fi>
* tests: WPS PIN provisioning with configured AP (WPA+WPA2)Jouni Malinen2016-01-011-0/+58
| | | | Signed-off-by: Jouni Malinen <j@w1.fi>
* tests: Use full prefix of the P2P-GO-NEG-FAILUREJouni Malinen2015-12-311-2/+2
| | | | | | | | Couple of waits for this event used the "GO-NEG-FAILURE" string instead of the full event prefix. While this worked in the tests due to a substring matching, it is better to use the full event prefix here. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* tests: Do not dump pending events in p2p_go_neg_init timeout=0 caseJouni Malinen2015-12-311-1/+0
| | | | | | | | | It was possible for the dump_monitor() call to drop a P2P-GO-NEG-FAILURE event that was indicated quickly after the P2P_CONNECT command was issued. This could result in grpform_reject test case failing to see the expected event and fail the test due to "Rejection not reported". Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* tests: EAP-FAST and different TLS cipher suitesJouni Malinen2015-12-311-0/+39
| | | | Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* tests: Clear BSS table at the end of rsn_ie_proto_eap_staJouni Malinen2015-12-301-0/+4
| | | | | | | | | | | | | rsn_ie_proto_eap_sta followed by eap_ttls_mschapv2_session_resumption showed a failure case where the special RSNE from rsn_ie_proto_eap_sta ended up remaining in a wpa_supplicant BSS entry and the SELECT_NETWORK command used the previous scan results without checking for changed AP configuration. This resulted in test failure due to RSN IE being claimed to be different in EAPOL-Key msg 3/4. This is not really a real world issue, but try to avoid false failure reports by explicitly clearing the BSS table at the end of rsn_ie_proto_eap_sta. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* tests: P2P_LISTEN immediately followed by P2P_FINDJouni Malinen2015-12-301-0/+22
| | | | | | | | | This verifies that the previous commit works correctly by forcing a P2P_LISTEN command execution to be interupted by a P2P_FIND command timed in a manner that forces it to show up before the kernel ROC has started for the Listen. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* tests: GO Negotiation stopped after TX startJouni Malinen2015-12-301-0/+18
| | | | | | | | | This verifies that P2P_STOP_FIND stops a pending offchannel TX wait in the kernel by checking that a listen operation can be started in less than a second after stopping a pending Action frame TX. This verifies that the optimization introduced in the previous commit works properly. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* Revert "tests: vm: Output everything on console"Jouni Malinen2015-12-301-2/+0
| | | | | | | | | | | | | | | | This reverts commit be9fe3d8aff394ea6868f1a2347e8c12609b086e. While I did manage to complete multiple test runs without failures, it looks like this change increases full test run duration by about 30 seconds when using seven VMs. The most visible reason for that seems to be in "breaking" active scanning quite frequently with the Probe Response frame coming out about 40 ms (or more) after the Probe Request frame which is long enough for the station to already have left the channel. Since this logging change is not critical, it is simplest to revert it for now rather than make changes to huge number of test cases to allow more scan attempts to be performed before timing out. Signed-off-by: Jouni Malinen <j@w1.fi>
* tests: Increase connection timeout for number of EAP test casesJouni Malinen2015-12-301-12/+12
| | | | | | | | | | The previously used 10 second timeout allowed only two scan attempts (five seconds between scans) and it was possible to hit a failure every now and then when running under heavy load and the Probe Response frame got delayed by 40 ms or so twice in a row. Add more time for one more scan attempt to reduce the likelihood of this happening. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* tests: Make scan test cases more robust by allowing retriesJouni Malinen2015-12-301-10/+26
| | | | | | | | | | These test caases depended on a single active scan round finding the AP. It is possible for the Probe Response frame to get delayed sufficiently to miss the response especially when testing under heavy load with multiple parallel VMs. Allow couple of scan retries to avoid reporting failures from these test cases. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* tests: Make P2PS join-a-group cases more robustJouni Malinen2015-12-301-7/+11
| | | | | | | | | | Use the group SSID (if known) when requesting a join operation. This makes some of the P2PS test cases more robust in cases where previously executed tests have added older groups into the cached scan results with the same MAC addresses and an incorrect BSS could have been picked previously. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* tests: Dump control interface sockets during FST operationsJouni Malinen2015-12-301-0/+28
| | | | | | | | | | | This makes it less likely to hit issues with running out of control interface TX queue when running multiple FST test in a row. Number of the FST operation sequences seemed to leave quite a few event messages pending in one of the attached control interface sockets for wlan5 which could result in test failure if the buffer space ran out and some of the wpa_supplicant events were not delivered. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* tests: Use logger.info() instead of print in FST test casesJouni Malinen2015-12-301-7/+7
| | | | | | | It is better to get these messages into the actual debug log instead of hoping they will be noticed from stdout. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* tests: Clean up at the end of connect_cmd_disconnect_eventJouni Malinen2015-12-301-0/+8
| | | | | | | | | | | | | | | This test case used to leave the dynamically added wlan5 interface in a state where it was still trying to reconnect to a network. This could result in the following test cases being unable to clear the cfg80211 scan cache. Avoid this type of issues by explicitly stopping the connection attempt and making sure that there are no scan results in the cache at the end of connect_cmd_disconnect_event. The following test case sequence triggered a failure due to the remaining BSS table entry: connect_cmd_disconnect_event connect_cmd_wep ap_hs20_random_mac_addr Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* tests: Clear ignore_old_scan_res explicitly in test cases where it is usedJouni Malinen2015-12-283-3/+22
| | | | | | | This parameter is used only in couple of test cases and there is no need to maintain the code to reset it in WpaSupplicant::reset(). Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* tests: Clear p2p_pref_chan explicitly in test cases where it is usedJouni Malinen2015-12-282-18/+23
| | | | | | | This parameter is used only in couple of test cases and there is no need to maintain the code to reset it in WpaSupplicant::reset(). Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* tests: Clear p2p_go_intent explicitly in test cases where it is usedJouni Malinen2015-12-282-1/+50
| | | | | | | This parameter is used only in couple of test cases and there is no need to maintain the code to reset it in WpaSupplicant::reset(). Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* tests: Clear p2p_add_cli_chan explicitly in test cases where it is usedJouni Malinen2015-12-283-47/+66
| | | | | | | This parameter is used only in couple of test cases and there is no need to maintain the code to reset it in WpaSupplicant::reset(). Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* tests: Clear p2p_no_go_freq explicitly in test cases where it is usedJouni Malinen2015-12-282-13/+18
| | | | | | | This parameter is used only in couple of test cases and there is no need to maintain the code to reset it in WpaSupplicant::reset(). Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>