Commit graph

175 commits

Author SHA1 Message Date
Jouni Malinen d33222d1fe tests: hostapd with zero length ap_pin parameter
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2017-08-18 21:10:52 +03:00
Jouni Malinen 5b52e1adc2 tests: Update base64 OOM test cases to match implementation changes
Introduction of the new base64 helper function changed the backtraces
for these OOM test cases and resulted in test failures. Update the test
scripts to work with the new implementation.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2017-06-17 18:04:32 +03:00
Jouni Malinen 2087feb6b5 tests: WPS and random UUID on Enrollee
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2017-04-13 21:45:57 +03:00
Jouni Malinen 6f9b4de228 tests: Make ap_wps_er_http_proto less likely to fail
The test step for concurrent HTTP connections seems to be failing quite
frequently when running in a virtual machine with run-tests.py (but not
that much with kvm and vm-run.sh). The failures are due to only 8 or 9
sockets getting a response from the HTTP server. This is sufficient for
testing purposes, to drop the pass criterium from 10 to 8 concurrent
connections. This avoids unnecessary test failures and also allows the
rest of the test case to be performed.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2017-02-08 13:53:11 +02:00
Jouni Malinen cc5bf65f29 tests: WPS_AP_PIN failure
Signed-off-by: Jouni Malinen <j@w1.fi>
2017-01-08 17:36:57 +02:00
Jouni Malinen 35320d7a44 tests: WPS_PIN start failure
Signed-off-by: Jouni Malinen <j@w1.fi>
2017-01-08 17:28:15 +02:00
Jouni Malinen 3381d324c9 tests: PIN generation failure
Signed-off-by: Jouni Malinen <j@w1.fi>
2017-01-08 17:24:12 +02:00
Jouni Malinen 93b85d4419 tests: WPS and pbc_in_m1
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-12-30 00:47:19 +02:00
Jouni Malinen cde2143c21 tests: WPS and wps_rf_bands configuration
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-12-29 12:17:17 +02:00
Jouni Malinen 454b66d2c5 tests: WPS PIN provisioning with configured AP using dummy cred
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-12-28 14:31:42 +02:00
Jouni Malinen db98b58736 tests: Remove trailing whitespace
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-12-28 14:31:42 +02:00
Jouni Malinen 82358a2a63 tests: Additional hostapd WPS control interface coverage
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-12-28 14:31:42 +02:00
Jouni Malinen 5026406dd5 tests: WPS getting disabled due to conflicting parameters
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-12-27 11:16:50 +02:00
Jouni Malinen aed9e23ae5 tests: WPS ER enrolling a new device to a configured AP
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-12-19 17:44:51 +02:00
Jouni Malinen 3615bde6fe tests: Clear scan cache at the end of ap_wps_per_station_psk_failure
It was possible for ap_wps_per_station_psk_failure to leave behind scan
entries with active PBC mode if cfg80211 BSS table. This could result in
a following test case failing due PBC overlap. Fix this by clearing the
cfg80211 BSS table explicitly.

This was found with the following test case sequence:
ap_wps_per_station_psk_failure autogo_pbc

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-12-13 13:03:52 +02:00
Jouni Malinen 74b23fafe9 tests: WPS PBC with two APs advertising same SSID
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-10-11 00:30:15 +03:00
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