Commit graph

93 commits

Author SHA1 Message Date
Jouni Malinen
5be9dcbb86 tests: Remove unnecessary interpreter line from most python files
Only run-tests.py is actually executed, so there is no need to specify
the interpreter in all the helper files and test script files.

Signed-off-by: Jouni Malinen <j@w1.fi>
2014-02-21 20:21:53 +02:00
Jouni Malinen
6f939e591e tests: Convert connect() to use kwargs
This makes it more convenient to add new network block parameters.

Signed-off-by: Jouni Malinen <j@w1.fi>
2014-02-15 21:58:09 +02:00
Jouni Malinen
242219c563 tests: Set dh_file on EAP client
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-02-15 10:42:56 +02:00
Jouni Malinen
e01929c668 tests: Report unexpected STATUS lines instead of stopping
It looks like get_status() has failed in some test runs because of a
STATUS command returning an line without '=' on it. Instead of stopping
there on exception, report the unexpected line in the log and ignore it
to allow test to continue.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
2014-02-04 13:23:35 +02:00
Jouni Malinen
ca5b81a5bb tests: wpa_supplicant ctrl_iface
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
2014-02-04 13:10:57 +02:00
Jouni Malinen
e1a5e09ab7 tests: AP mode operations with wpa_supplicant
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
2014-02-04 13:10:57 +02:00
Jouni Malinen
da10266224 tests: WEP
Signed-hostap: Jouni Malinen <j@w1.fi>
2014-02-04 13:10:57 +02:00
Jouni Malinen
c9dc56231b tests: Add test cases for P2P+NFC
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
2014-01-27 22:08:13 +02:00
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