Commit graph

1746 commits

Author SHA1 Message Date
Jouni Malinen
2286578fe0 tests: TLS v1.2 check in ap_wpa2_eap_tls_versions for internal TLS
The internal TLS implementation in wpa_supplicant supports TLS v1.2, so
verify that this version can be disabled.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-11-29 20:04:26 +02:00
Jouni Malinen
bb0a72ab46 tests: Skip OCSP test cases with the internal TLS implementation
The internal TLS client implementation does not yet support OCSP.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-11-29 19:32:45 +02:00
Jouni Malinen
0fc1b583e2 tests: ap_wpa2_eap_ttls_server_cert_hash with internal TLS client
Since the internal TLS client implementation in wpa_supplicant now has
sufficient support for this functionality, allow the test case to be
executed.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-11-29 19:02:04 +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
d36ae37679 tests: EAP-SIM/AKA/AKA' error cases
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-11-28 20:46:36 +02:00
Jouni Malinen
288b6f8b85 tests: Extended coverage for the EAP-SAKE attribute parser
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-11-28 12:25:22 +02:00
Jouni Malinen
ab4ea0e948 tests: EAP-SAKE local error cases
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-11-28 11:53:31 +02:00
Jouni Malinen
c49b383f45 tests: Convert eap_proto_sake to use newer design
This makes it more convenient to extend the test case with new
message exchanges.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-11-28 11:22:21 +02:00
Jouni Malinen
6f2252614c tests: Fix error message for ap_open_out_of_memory
If hostapd AP started unexpectedly, this test case would fail with
NameError due to incorrect variable name being used to construct the
exception text.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-11-28 00:23:35 +02:00
Johannes Berg
1a4f18d8f4 tests: run-tests: Print more details about NameError
If encountering a NameError, print the entire traceback so that
it's actually debuggable.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2015-11-28 00:21:20 +02:00
Jouni Malinen
b6f17f2f5c tests: ERP protocol tests
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-11-28 00:18:49 +02:00
Jouni Malinen
12fff543b3 tests: Enable 802.11ac support in example wpa_supplicant config
This is needed for proper test execution. The recently added VHT 80+80
test cases started verifying channel bandwidth on the station side and
those checks fail if wpa_supplicant is built without
CONFIG_IEEE80211AC=y.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-11-27 21:11:53 +02:00
Johannes Berg
680ce356c0 tests: Honor HWSIM_TEST_LOG_DIR variable in VM runs
If /tmp has a relatively small size limit, or multiple people run the
tests on the same machine, using the same output directory can easily
cause problems.

Make the test framework honor the new HWSIM_TEST_LOG_DIR environment
variable to make it easier to avoid those problems.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2015-11-27 21:11:53 +02:00
Johannes Berg
10a15590f8 tests: Add a simple wmediumd test
If wmediumd is available on the path, test that it can forward
packets between two virtual nodes and that stopping it makes
the regular in-kernel datapath do the needed work again.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2015-11-27 21:11:53 +02:00
Jouni Malinen
f6c09bf46e tests: Remove HwsimSkip from p2p_channel
With the optimizations from the previous commits, none of the test cases
here need to be skipped.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-11-27 19:38:17 +02:00
Jouni Malinen
858d12f69a tests: Optimize p2p_go_move_active initial wait
There is no need to wait for the initial client timeout in this type of
test sequence since that wait can be cleared by connecting and
disconnecting a client to the group. This allows the test case to be
executed much more quickly and the dependency on --long can be removed.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-11-27 19:37:35 +02:00
Jouni Malinen
ae248721f4 tests: Optimize p2p_go_move_reg_change initial wait
There is no need to wait for the initial client timeout in this type of
test sequence since that wait can be cleared by connecting and
disconnecting a client to the group. This allows the test case to be
executed much more quickly and the dependency on --long can be removed.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-11-27 19:35:51 +02:00
Jouni Malinen
63b87a5aeb tests: Optimize p2p_go_move_scm_multi initial wait
There is no need to wait for the initial client timeout in this type of
test sequence since that wait can be cleared by connecting and
disconnecting a client to the group. This allows the test case to be
executed much more quickly and the dependency on --long can be removed.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-11-27 19:31:44 +02:00
Jouni Malinen
3acf68feb9 tests: Convert p2p_go_move_scm_multi to use dynamic hwsim
Use a dynamically added HWSimRadio to allow the MCC case to be covered
with a single test run with the mac80211_hwsim default radios disabling
MCC.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-11-27 19:30:02 +02:00
Jouni Malinen
d18df681b0 tests: Convert p2p_go_move_scm_peer_does_not_support to dynamic hwsim
Use a dynamically added HWSimRadio to allow the MCC case to be covered
with a single test run with the mac80211_hwsim default radios disabling
MCC.

In addition, remove dependency on --long since this test case does not
really take that long.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-11-27 19:27:25 +02:00
Jouni Malinen
f0b39e057a tests: Convert p2p_go_move_scm_peer_supports to use dynamic hwsim
Use a dynamically added HWSimRadio to allow the MCC case to be covered
with a single test run with the mac80211_hwsim default radios disabling
MCC.

In addition, remove dependency on --long since this test case does not
really take that long (just couple of seconds).

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-11-27 19:24:33 +02:00
Jouni Malinen
b98445f6ba tests: Optimize p2p_go_move_scm initial wait
There is no need to wait for the initial client timeout in this type of
test sequence since that wait can be cleared by connecting and
disconnecting a client to the group. This allows the test case to be
executed much more quickly and the dependency on --long can be removed.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-11-27 19:22:30 +02:00
Jouni Malinen
262825e896 tests: Convert p2p_go_move_scm to use dynamic hwsim
Use a dynamically added HWSimRadio to allow the MCC case to be covered
with a single test run with the mac80211_hwsim default radios disabling
MCC.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-11-27 19:14:38 +02:00
Jouni Malinen
1002684e11 tests: Convert p2p_go_move_active to use dynamic hwsim
Use a dynamically added HWSimRadio to allow the MCC case to be covered
with a single test run with the mac80211_hwsim default radios disabling
MCC.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-11-27 19:11:27 +02:00
Jouni Malinen
78fdab307e tests: Dynamic hwsim p2ps_channel_active_go_and_station_different_mcc
Convert p2ps_channel_active_go_and_station_different_mcc to use a
dynamically added HWSimRadio to allow the MCC case to be covered with a
single test run with the mac80211_hwsim default radios disabling MCC.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-11-27 19:01:10 +02:00
Jouni Malinen
d2e7cfc0bd tests: Use wlantest without capture file write buffering
This makes the run_tshark() operations more reliable while still
allowing to reduce the extra wait by forcing wlantest to flush the
packets to the pcapng file.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-11-27 00:12:38 +02:00
Jouni Malinen
b25f04d44a tests: Clean up frequency list in scan_dfs
This makes the test log more readable by converting the values to
integers and sorting the array.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-11-26 23:42:30 +02:00
Jouni Malinen
3960585785 tests: VHT with 80 MHz channel width and local power constraint
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-11-26 20:41:55 +02:00
Jouni Malinen
7767687109 tests: Abort scan
This verifies the nl80211 behavior to abort a scan on an explicit
control interface request and on connection request.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-11-26 19:44:14 +02:00
Jouni Malinen
f9bf222552 tests: Scan on DFS channels
This is a test case for mac80211 behavior regarding active scanning on
DFS channels.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-11-26 19:24:25 +02:00
Jouni Malinen
a74a1e4eab tests: Open mesh network on VHT 80+80 MHz channel
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-11-26 18:47:40 +02:00
Jouni Malinen
13f6ef9c79 tests: IBSS on VHT 80+80 MHz channel
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-11-26 18:47:40 +02:00
Jouni Malinen
05032725e1 tests: P2P client joining a group before having found GO Device Address
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-11-26 15:17:36 +02:00
Jouni Malinen
bcf4e38c5f tests: AP with open mode and REASSOCIATE not finding a match
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-11-26 12:23:19 +02:00
Jouni Malinen
35b61a496a tests: Verify P2P group formation with 80+80 MHz channel
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-11-25 22:43:38 +02:00
Jouni Malinen
08e47376ec tests: Import p2p_utils instead of functions from old locations
These couple of files were forgotten when moving P2P helper functions
into the new p2p_utils.py file.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-11-25 15:47:16 +02:00
Johannes Berg
f2a438f51d tests: Print test name to kernel log buffer
Print the test name to the kernel log buffer so debugging
cross-test issues becomes easier.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2015-11-24 16:28:24 +02:00
Anton Nayshtut
81822ce688 tests: Make FST tests aware of unconditional station's MB IE exposure
This syncs the test cases with the implementation change in station's MB
IE creation. FST tests should expect MB IE regardless of the station
connection state and whether the current connection is FST-enabled or
not. This fixes the follow test cases that started reporting failures
with the previous commit change in src/fst/fst_group.c:
fst_disconnect_1_of_2_stas_from_non_fst_ap
fst_sta_connect_to_non_fst_ap
fst_second_sta_connect_to_non_fst_ap
fst_disconnect_2_of_2_stas_from_non_fst_ap
fst_second_sta_connect_to_fst_ap
fst_disconnect_1_of_2_stas_from_fst_ap

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-11-23 20:36:54 +02:00
Ilan Peer
edb63af6ba tests: Test no P2P GO move when invitation is in progress
Add a test to verify that a P2P GO does not start a CSA
once invitation signalling is done, and the P2P client is
about to connect.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
2015-11-22 22:16:32 +02:00
Jouni Malinen
845d48c133 tests: Make dbus_p2p_group_idle_timeout more robust
This test case was failing if a PropertiesChanged signal for P2P peer
gets delivered from a previous test case. Avoid that by waiting for the
new group to be formed before processing any PropertiesChanged signals.

This failure was triggered by the following test case sequence:
dbus_p2p_two_groups dbus_p2p_group_idle_timeout

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-11-22 21:28:49 +02:00
Jouni Malinen
e1246a6e2c tests: Make ap_open_select_twice less likely to fail
It looks like a previous P2P test case can cause the initial single
channel scan in ap_open_select_twice take more than five seconds in some
cases. While that is not really expected behavior, this test case should
not fail. Increase the timeout to avoid reporting false failures here.

This could be triggered with the following test case sequence:
p2p_msg_unexpected_go_neg_resp ap_open_select_twice

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-11-22 20:14:06 +02:00
Jouni Malinen
05bc2b44c1 tests: INTERFACE_ADD create testing coverage
This covers an invalid interface type and interface type 'sta'.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-11-22 17:59:54 +02:00
Ilan Peer
061190308d tests: wpa_supplicant interface creation in AP mode
Add a test case that creates a new interface in AP mode.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
2015-11-22 17:54:07 +02:00
Jouni Malinen
29fb191cfd tests: Clear scan cache at the start of ap_vht80*
These test cases depend on the HT40 co-ex scans not swapping PRI/SEC
channels. It was possible for a test case to fail, e.g., in the
following sequence: ap_ht40_5ghz_match ap_vht80b.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-11-21 19:04:12 +02:00
Jouni Malinen
fe5aa8cb9c tests: EAP-pwd local error cases
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-11-21 18:00:33 +02:00
Jouni Malinen
d5482411cf tests: EAP-MD5 local error cases
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-11-21 18:00:33 +02:00
Jouni Malinen
6fb8b4bf84 tests: AP with open mode and select network twice
This verifies that the second SELECT_NETWORK for the same network starts
a new scan immediately if the previous connection attempt is waiting for
the next scan iteration to start.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-11-20 00:48:25 +02:00
Jouni Malinen
364418661d tests: PMKSA caching and EAPOL reauthentication
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-11-19 21:16:36 +02:00
Jouni Malinen
4013d6885b tests: Verify EAPOL reauthentication after FT protocol
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-11-19 21:16:29 +02:00
Jouni Malinen
119562cfdf tests: Clear FST sessions at the end of fst_setup_mbie_diff
This avoids issues with following test cases failing due to unexpected
starting state. This issue showed up with the following hwsim test case
sequence:
fst_setup_mbie_diff fst_dynamic_iface_attach

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-11-19 17:33:34 +02:00