Commit graph

159 commits

Author SHA1 Message Date
Jouni Malinen e5d3e13a5c tests: Fix ap_wps_er_http_proto max concurrent requests case
Commit 2d6a526ac3 ('tests: Make
ap_wps_er_http_proto more robust') tried to work around the timeouts
here, but that was not really the best approach since the one second
timeout that was used here for connect() ended up being very close to
the limit even before the kernel change. The longer connect() time is
caused by a sequence where the listen() backlog ignores the connection
instead of accept() followed by close() within the wpa_supplicant ER
HTTP connection handling. The time to retransmit the SYN changed a bit
in the kernel from 1.0 sec to about 1.03 sec. This was enough to push
that over the one second timeout.

Fix this by using a sufficiently long timeout (10 sec) to allow SYN
retransmission to occur to recover from the listen() backlog case.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-08-17 13:37:25 +03:00
Jouni Malinen 2d6a526ac3 tests: Make ap_wps_er_http_proto more robust
It looks like connect() for a TCP socket can time out at least with a
recent kernel. Handle that case more gracefully by ignoring that socket
while allowing the test to continue.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-08-11 15:58:13 +03:00
Jouni Malinen bc6e32880f tests: Remove extra semicolons from python scripts
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-03 22:37:01 +03:00
Jonathan Afek 9fd6804d61 tests: Mark 525 tests as remote compatible
After successfully passing the 525 tests on a remote setup mark the
tests as remote compatible.

Signed-off-by: Jonathan Afek <jonathanx.afek@intel.com>
2016-06-27 21:47:37 +03:00
Jouni Malinen 4425b1ed71 tests: WPS and wpa_supplicant BSS entry limit
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-06-17 14:01:57 +03:00
Andrei Otcheretianski aa713e71e9 tests: Don't use proxy in urllib.urlopen()
Some environments define default system wide HTTP proxy. Using default
system configuration may result in a failure to open some HTTP URLs. Fix
this by ensuring that no proxies are used.

Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
2016-04-25 00:05:34 +03:00
Janusz Dziedzic 5148b392ab tests: Use hapd from hostapd.add_bss()
Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
2016-04-24 20:16:30 +03:00
Janusz Dziedzic 6f334bf7a0 tests: Use hapd from hostapd.add_ap()
Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
2016-04-24 20:16:29 +03:00
Janusz Dziedzic 01703a9f2f tests: Use hostapd.remove_bss() instead of HostapdGlobal() (WPS)
This makes ap_wps_twice more usable for testing with remote hosts.

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
2016-04-24 19:24:55 +03:00
Janusz Dziedzic 9cd6f4c015 tests: Pass apdev to hostapd.add_bss()
Pass apdev param to hostapd.add_bss(). Kill hardcoded phy param and get
phy base on apdev. These are needed to support operation with a remote
test host.

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
2016-04-24 16:18:46 +03:00
Janusz Dziedzic afc26df29c tests: Pass full apdev to add_ap() function (4)
Pass the full apdev to the add_ap() function instead of just ifname.
This allows us to handle also remote hosts while we can check
apdev['hostname'], apdev['port'].

This step (4) converts the cases that call hostapd.add_ap() from a
helper function that got apdev[i] as an argument.

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
2016-04-03 22:46:12 +03:00
Janusz Dziedzic 21aa8b7e3c tests: Pass full apdev to add_ap() function (2)
Pass the full apdev to the add_ap() function instead of just ifname.
This allows us to handle also remote hosts while we can check
apdev['hostname'], apdev['port'].

This step (2) converts the cases that use the add_ssdp_ap() helper
function.

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
2016-04-03 22:46:00 +03:00
Janusz Dziedzic 8b8a1864ff tests: Pass full apdev to add_ap() function (1)
Pass the full apdev to the add_ap() function instead of just ifname.
This allows us to handle also remote hosts while we can check
apdev['hostname'], apdev['port'].

This step (1) converts the cases where apdev[#]['ifname'] was used as
the argument to hostapd.add_ap().

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
2016-04-03 22:45:57 +03:00
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