Commit graph

146 commits

Author SHA1 Message Date
Jouni Malinen 20c48fd99b tests: Allow PIN generation failure during OOM in ap_wps_random_ap_pin
This is needed to avoid reporting failures after a change to remove the
fallback path in PIN generation.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-02-19 18:44:39 +02:00
Jouni Malinen bd3948c0eb tests: Memory allocation failing for expanded EAP-Nak
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-02-07 20:35:35 +02:00
Jouni Malinen d8e5a55f1e tests: WPS and EAP-WSC in network profile
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>
2016-01-13 22:08:04 +02:00
Jouni Malinen 1e35aa15a4 tests: WPS and EAP-WSC error cases
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-01-06 20:57:31 +02:00
Jouni Malinen ff518fbd05 tests: WPS PIN provisioning with configured AP (WPA+WPA2)
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-01-01 13:42:04 +02:00
Jouni Malinen 161c8515cc tests: Make ap_wps_probe_req_ie_oom more robust
It was possible to hit a race condition between WPS_CANCEL and
immediately following WPS_PIN command. Wait for a disconnection event to
avoid that. This was seen with the following test case sequence:
ap_wpa2_psk_supp_proto_wrong_group_key_len ap_wps_probe_req_ie_oom

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-12-28 17:21:08 +02:00
Jouni Malinen d1341917ce tests: WPS and fragment ack OOM
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-12-05 21:35:45 +02:00
Jouni Malinen d887ed3f95 tests: Fix ap_wps_er_multi_add_enrollee cleanup steps
Only one of the ERs was stopped at the end of the test case and this
could result in the following test case failing, e.g., when executing
this test case sequence: ap_wps_er_multi_add_enrollee ap_wps_upnp.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-12-02 18:19:39 +02:00
Jouni Malinen 6a5f578cac tests: Force concurrent exchange in ap_wps_er_multi_add_enrollee
This makes it more likely for the two ERs to go through WPS UPnP
exchange in parallel. This was already happening every now and then and
resulted in failures. However, now that there is support for multiple
concurrent exchanges, it is useful to have this test case hit that
possibility more frequently.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-11-30 16:58:47 +02:00
Jouni Malinen 9b35afd6ac tests: Fix OOM eloop_register_sock() test cases with new gcc
gcc 4.8 vs 5.2 seem to compile eloop_register_sock() differently. With
5.2, that function name does not show up in the backtrace since
eloop_sock_table_add_sock() is used without a separate function call.
This broke the memory allocation failure checking in this test case. Fix
this by matching against the eloop_sock_table_add_sock() function which
shows up in the backtrace for both gcc versions.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-11-28 20:48:16 +02:00
Jouni Malinen 4f524e99d2 tests: Clear scan cache at the end of ap_wps_per_station_psk
It was possible for the WPS PBC state to get cached through to the
following test cases and that would trigger false failures. Fix this by
explicitly clearing the scan cache at the end of ap_wps_per_station_psk.
This issue was triggered with the following test case sequence:
ap_wps_per_station_psk autogo_pbc

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-11-18 18:03:22 +02: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 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 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
Jouni Malinen eb95ced2d2 tests: WPS ER subscribe OOM
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-09-07 16:38:38 +03:00
Jouni Malinen d840350aca tests: WPS ER caching AP settings (OOM)
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-09-07 16:31:38 +03:00
Jouni Malinen 7511ead0a7 tests: WPS against external implementation
This adds a Python-based minimal WSC protocol implementation to allow
more testing coverage to be reached for various error cases in protected
attributes. The wps_ext test case completes successful exchange in both
the Enrollee and Registrar roles acting in the middle of AP and STA. The
other test cases cover error cases.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-09-07 15:20:04 +03:00
Jouni Malinen 07536b18ce tests: WPS ER init failure
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-09-07 13:47:08 +03:00
Jouni Malinen 4c355e3ed1 tests: WPS AP configured for special ap_setup_locked=2 mode
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-09-07 13:42:30 +03:00
Jouni Malinen d91a64c426 tests: WPS AP and UPnP event subscription and many events
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-09-06 11:56:10 +03:00
Jouni Malinen 61c3d464e6 tests: Multiple WPS ERs adding a new enrollee using PIN
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-09-06 11:32:02 +03:00
Jouni Malinen 926404a6b2 tests: WPS config method update for WPS and P2P
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-09-05 21:58:18 +03:00
Jouni Malinen d188367148 tests: WPS Enrollee protocol testing
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-09-01 12:31:16 +03:00
Jouni Malinen fbf6b71791 tests: AP configuration using wps_config and wps_cred_processing=2
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-09-01 12:31:16 +03:00
Jouni Malinen ea982de1ee tests: WPS ER timing out STA entry after negotiation
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-09-01 12:31:16 +03:00
Jouni Malinen 96038a5f85 tests: WPS AP and advertisement OOM
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-08-31 17:25:20 +03:00
Jouni Malinen 476daa0585 tests: WPS UPnP SetSelectedRegistrar protocol testing
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-08-31 17:25:20 +03:00
Jouni Malinen 31e56b953c tests: WPS ER Selected Registrar timeout
This extends ap_wps_pbc_timeout to cover another long WPS timeout:
ER-initiated SetSelectedRegistrar timeout on AP. Using the same test
case for this avoids the need for another 120 second test case.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-08-31 17:25:20 +03:00
Jouni Malinen 24b7f2822e tests: More WPS/HTTP test coverage
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-08-31 17:25:20 +03:00
Jouni Malinen 6aaa661af1 tests: More WPS ER coverage
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-08-26 21:09:37 +03:00
Jouni Malinen 4c3ae1c0d1 tests: More WPS ER HTTP protocol testing
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-08-19 01:36:48 +03:00
Jouni Malinen c965ae034a tests: WPS ER protocol testing
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-08-17 00:18:32 +03:00
Jouni Malinen df1d01cfed tests: WPS and non-WPS AP in single hostapd process
This is a regression test case for WPS_AP_PIN triggered hostapd segfault
when a non-WPS interface was enabled.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-08-16 23:14:44 +03:00
Jouni Malinen 5c267d718d tests: Fix WPS HTTP test case exceptions
resp.status is an integer, not a string.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-08-16 21:26:01 +03:00
Jouni Malinen e1eb0e9e6e tests: AP config using wps_config command with invalid passphrase
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-08-06 20:47:25 +03:00
Jouni Malinen a1eabc74b8 tests: Skip WPA(V1) test cases in FIPS mode
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-08-02 16:52:56 +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 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
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 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 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 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 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