Commit graph

85 commits

Author SHA1 Message Date
Jouni Malinen
b21df6e779 tests: Run dump_monitor() again if scan was pending
In addition to running the FLUSH command again, the pending monitor
interface events need be cleared in case the driver was running a scan
when reset() is called. This avoids issues, e.g., with discovery_dev_id
failing due to an unexpected P2P-DEVICE-FOUND event that was generated
by the pending scan operation that had not yet complete when the first
dump_monitor() call in reset() happened.

Signed-hostap: Jouni Malinen <j@w1.fi>
2014-01-15 00:09:56 +02:00
Jouni Malinen
7559ad7af6 tests: Double the connection timeout for EAP cases
It looks like slow virtual machines may have issues to complete some EAP
authentication cases (e.g., EAP-EKE in ap_ft_eap) within the 10 second
timeout under load. Double the timeout to avoid incorrect test failures.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
2014-01-13 20:47:01 +02:00
Jouni Malinen
c57c1ed6b3 tests: Clear data from ongoing scan on reset()
It was possible for the previous test case to leave unexpected BSS or
P2P peer table entries if a scan was in progress when the FLUSH command
was used. This could result in test failures, e.g., when running
discovery_dev_type_go followed by discovery_group_client where a P2P
peer was discovered on another channel at the end of the former test
case from a scan that was running durign the FLUSH operation that was
supposed to remove all P2P peers. This could result in
discovery_group_client failing due to dev[2] trying to send the
discoverability frame on incorrect channel (the one learned in the
previous test case) since discover_peer() skipped a new device
discovery. Fix this by running FLUSH operation again if a pending scan
operation is detected during the first FLUSH operation.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
2014-01-13 20:26:22 +02:00
Jouni Malinen
c70ebce0ba tests: P2P device discovery filtering on Device ID and Device Type
Signed-hostap: Jouni Malinen <j@w1.fi>
2014-01-08 22:25:58 +02:00
Jouni Malinen
d4c7a2b9e6 tests: EAP-TLS with OCSP
Signed-hostap: Jouni Malinen <j@w1.fi>
2014-01-08 17:45:56 +02:00
Jouni Malinen
2d10eb0efd tests: PKCS#12 use for EAP-TLS
Signed-hostap: Jouni Malinen <j@w1.fi>
2014-01-08 17:18:22 +02:00
Jouni Malinen
3b74982f93 tests: subject_match and altsubject_match
Signed-hostap: Jouni Malinen <j@w1.fi>
2014-01-08 17:04:35 +02:00
Jouni Malinen
53a6f06a0b tests: EAP-FAST
Signed-hostap: Jouni Malinen <j@w1.fi>
2014-01-08 16:42:15 +02:00
Jouni Malinen
33de4f2d7a tests: External password storage
Signed-hostap: Jouni Malinen <j@w1.fi>
2014-01-07 22:32:12 +02:00
Jouni Malinen
f19ee5b7f7 tests: Hidden SSID
In addition, add the earlier tests in the new test_ssid.py file that was
forgotten from the previous commit
d78f33030d.

Signed-hostap: Jouni Malinen <j@w1.fi>
2014-01-07 20:23:56 +02:00
Jouni Malinen
d0ce105068 tests: Verify EAP-PEAP/EAP-TLS
Signed-hostap: Jouni Malinen <j@w1.fi>
2014-01-07 10:45:11 +02:00
Jouni Malinen
6daf5b9c1c tests: Add more EAP fragmentation tests
Signed-hostap: Jouni Malinen <j@w1.fi>
2014-01-07 10:45:11 +02:00
Jouni Malinen
d4b21766e5 tests: Force p2p_find in p2p_service_discovery_fragmentation
It was possible for this test case to fail if P2P_FLUSH was issued
during a search scan and that scan adding back the peer. Avoid this by
forcing p2p_find to be started regardless of the current P2P peer table
contents for each round of service discovery.

Signed-hostap: Jouni Malinen <j@w1.fi>
2014-01-07 10:45:11 +02:00
Jouni Malinen
710f96fd8c tests: Remove unnecessary reset() steps
The FLUSH command clears disallow_aps, p2p_disabled, and
p2p_per_sta_psk, so there is no need to clear them separately.

Signed-hostap: Jouni Malinen <j@w1.fi>
2014-01-07 10:45:10 +02:00
Jouni Malinen
36408936f8 tests: Optimize wait_event()
Replace the fixed 100 ms waits with a select()-based wait and timeout
for full wait based on monotonic time to optimize wait_event().

Signed-hostap: Jouni Malinen <j@w1.fi>
2014-01-07 10:45:10 +02:00
Jouni Malinen
d7a99700de tests: Clean up and optimize gas_concurrent_scan and _connect
No need to run a full scan as the first step since it only needs to find
the AP from a known channel for the GAS operation.

Signed-hostap: Jouni Malinen <j@w1.fi>
2014-01-05 22:33:06 +02:00
Jouni Malinen
ad36d27d6a tests: Remove ignore_old_scan_res workaround
Now that wpa_supplicant requests the driver (cfg80211) to clear its scan
cache automatically after each BSS_FLUSH/FLUSH command, the previously
used ignore_old_scan_res workaround should not be needed for the hwsim
test cases anymore.

Signed-hostap: Jouni Malinen <j@w1.fi>
2014-01-03 08:59:59 +02:00
Jouni Malinen
d78f33030d tests: SSID contents and encoding
Signed-hostap: Jouni Malinen <j@w1.fi>
2013-12-31 19:03:39 +02:00
Jouni Malinen
20e5c2830f tests: Add IEEE 802.1X and dynamic WEP test cases
Signed-hostap: Jouni Malinen <j@w1.fi>
2013-12-31 19:03:39 +02:00
Jouni Malinen
6e917c3e25 tests: Increase nl80211 test coverage with monitor/connect
Add test cases to use connect command instead of auth+assoc commands and
AP mode operations using the old monitor interface design.

Signed-hostap: Jouni Malinen <j@w1.fi>
2013-12-31 15:45:18 +02:00
Jouni Malinen
9489637b42 tests: Verify dynamic wpa_supplicant interface addition/removal
Signed-hostap: Jouni Malinen <j@w1.fi>
2013-12-31 15:45:18 +02:00
Jouni Malinen
0fab9ce67a tests: Verify PMKSA caching
Signed-hostap: Jouni Malinen <j@w1.fi>
2013-12-29 19:25:42 +02:00
Jouni Malinen
a6cf5cd655 tests: Verify SAE anti-clogging mechanism
Signed-hostap: Jouni Malinen <j@w1.fi>
2013-12-29 17:18:17 +02:00
Jouni Malinen
6645ff5094 tests: Verify WPS AP Setup Locking on AP PIN failures
Signed-hostap: Jouni Malinen <j@w1.fi>
2013-12-29 10:00:32 +02:00
Jouni Malinen
b553eab1a9 tests: Verify FT-over-DS
Signed-hostap: Jouni Malinen <j@w1.fi>
2013-12-29 10:00:31 +02:00
Jouni Malinen
4a5a5792f1 tests: Verify PeerKey handshake
NOTE: Actual use of the direct link (DLS) is not supported in
mac80211_hwsim, so this operation fails at setting the keys after
successfully completed 4-way handshake. This test case does allow the
key negotiation part to be tested for coverage, though.

Signed-hostap: Jouni Malinen <j@w1.fi>
2013-12-28 16:32:54 +02:00
Jouni Malinen
cf9189b94c tests: Verify scan behavior
Signed-hostap: Jouni Malinen <j@w1.fi>
2013-12-26 20:50:23 +02:00
Jouni Malinen
dcd6816817 tests: Verify Interworking network selection with other EAP types
This adds number of test cases to go through various possible EAP
configurations for Interworking network selection.

Signed-hostap: Jouni Malinen <j@w1.fi>
2013-12-26 16:55:45 +02:00
Jouni Malinen
e209eb989c tests: Verify Interworking network selection based on roaming consortium
In addition, use PEAP as the EAP method to increase testing coverage.

Signed-hostap: Jouni Malinen <j@w1.fi>
2013-12-26 16:55:45 +02:00
Jouni Malinen
459e96cd3b tests: Interworking network select with simulated SIM/USIM
Signed-hostap: Jouni Malinen <j@w1.fi>
2013-12-26 16:55:45 +02:00
Jouni Malinen
2cdd91d8b1 tests: Verify sharing and unsharing of ANQP results
Signed-hostap: Jouni Malinen <j@w1.fi>
2013-12-26 16:55:44 +02:00
Jouni Malinen
0589f40146 tests: Use a single channel scan to avoid unnecessary full scans
Signed-hostap: Jouni Malinen <j@w1.fi>
2013-12-26 16:55:44 +02:00
Jouni Malinen
715bf904ff tests: Verify Interworking Probe Request filtering
Signed-hostap: Jouni Malinen <j@w1.fi>
2013-12-26 13:37:06 +02:00
Jouni Malinen
0eff1ab3cb tests: Add test cases for various ciphers
Signed-hostap: Jouni Malinen <j@w1.fi>
2013-12-25 11:17:32 +02:00
Jouni Malinen
41af1305d7 tests: Add test cases for concurrent P2P operations
Signed-hostap: Jouni Malinen <j@w1.fi>
2013-11-24 21:20:15 +02:00
Jouni Malinen
19ae1d0788 tests: Verify P2P operations with a separate group interface
This extends P2P test coverage to include the case of separate group
interface use with autonomous GO and group formation through GO
negotiation.

Signed-hostap: Jouni Malinen <j@w1.fi>
2013-11-24 15:32:52 +02:00
Jouni Malinen
b4264f8f67 tests: Verify disallow_aps with Interworking
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
2013-11-07 00:12:30 +02:00
Jouni Malinen
6a0b400273 tests: Verify no-duplicate-networks with Interworking connection
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
2013-11-07 00:12:30 +02:00
Jouni Malinen
d355372ce4 tests: HS 2.0 excluded SSID
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
2013-11-04 14:48:33 +02:00
Jouni Malinen
d1ba402fe5 tests: HS 2.0 required roaming consortium
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
2013-11-04 14:48:28 +02:00
Jouni Malinen
2232edf8e2 tests: Use dictionary as add_cred_values() parameter
This makes it more convenient to use this function for cases that modify
credential parameters.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
2013-11-04 13:12:34 +02:00
Jouni Malinen
e114c49cfc tests: Add an EAP-TLS test case
This fixes the user.key file (incorrect key was copied previously) and
adds a test case for EAP-TLS with WPA2-Enterprise.

Signed-hostap: Jouni Malinen <j@w1.fi>
2013-11-03 19:51:06 +02:00
Jouni Malinen
22b99086ce tests: Add more EAP test cases
This increases EAP method coverage for WPA2-Enterprise to include
EAP-pwd, EAP-GPSK, EAP-SAKE, EAP-EKE, EAP-IKEv2, EAP-PAX, and EAP-PSK.

Signed-hostap: Jouni Malinen <j@w1.fi>
2013-11-03 19:51:06 +02:00
Jouni Malinen
57661377df tests: Use a helper function to rename wpa_supplicant/hostapd logs
Signed-hostap: Jouni Malinen <j@w1.fi>
2013-11-02 13:04:06 +02:00
Jouni Malinen
c9aa430896 tests: Split run-tests.py logger info into per test case files
The run-tests.py -l argument does not take an argument value anymore.
Instead, debug output is directed to a separate file <test>.log for each
test case.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
2013-10-31 12:51:08 +02:00
Jouni Malinen
709f18d501 tests: Add a test for dynamic hostapd config change
test_ap_change_ssid verifies that the SET and RELOAD control interface
commands can be used to change the SSID of a hostapd-controlled WPA2-PSK
AP, i.e., for a case where the PSK needs to be derived again after the
SSID change.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
2013-10-29 17:17:04 +02:00
Jouni Malinen
bbe867672e tests: Add helper functions for Hotspot 2.0 test cases
These make it easier to add new test cases for Interworking network
selection.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
2013-10-29 14:20:29 +02:00
Jouni Malinen
46f2cfcefc tests: Add P2P channel selection test cases for group formation
Signed-hostap: Jouni Malinen <j@w1.fi>
2013-10-26 23:49:10 +03:00
Jouni Malinen
72c052d525 tests: Add domain_suffix_match validation
This verifies that domain_suffix_match works correctly both for the
matching and mismatching cases.

Signed-hostap: Jouni Malinen <j@w1.fi>
2013-10-20 21:38:02 +03:00
Jouni Malinen
efd43d85bd tests: Test case for Hotspot 2.0 with external SIM processing
This verifies network selection using 3GPP Network Information and
connection using EAP-SIM with GSM authentication handled by an external
program.

Signed-hostap: Jouni Malinen <j@w1.fi>
2013-10-20 13:41:23 +03:00