Commit graph

919 commits

Author SHA1 Message Date
Jouni Malinen
4fb26cee95 tests: Remove ap_ht40_csa and ap_ht40_csa3 workarounds
The issue in mac80211 was identified and proposed fix is now available,
so remove the workaround here and start reporting failures from
unexpected disconnection during CSA.

Signed-off-by: Jouni Malinen <j@w1.fi>
2014-10-28 14:01:16 +02:00
Jouni Malinen
5e29a90079 tests: Scan result update changing last_scan_res and connect_work
This verifies that last_scan_res and connect work pointers to BSS
entries get updated when scan result update ends up removing or
reallocating a BSS entry.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2014-10-28 00:43:58 +02:00
Jouni Malinen
1531402ee4 tests: WPS with ap_scan=2
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2014-10-27 20:19:45 +02:00
Jouni Malinen
72a8e30b96 tests: Allow GCMP to be added into ap_wps_mixed_cred network profile
This is needed in preparation for WPS AES being mapped to enabling both
CCMP and GCMP if the driver supports both ciphers.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2014-10-27 16:52:10 +02:00
Ilan Peer
3bfa5f10a9 tests: Add support for reading modules list from a file
The new run-tests.py argument "-l <file>" can now be used to specify the
test modules using a text file.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
2014-10-26 23:27:26 +02:00
Ilan Peer
6492a9cada tests: Add usage() to build.sh
Signed-off-by: Ilan Peer <ilan.peer@intel.com>
2014-10-26 19:21:04 +02:00
Ilan Peer
2593aadb3b tests: Add an option to force copy config files
"./build.sh --force-config" can be used to force copying configuration
files before building. This will overwrite any changes in .config files.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
2014-10-26 19:19:39 +02:00
Ilan Peer
102c2bf461 tests: Add an option to build with code coverage
"./build.sh --codecov" can now be used to request CONFIG_CODE_COVERAGE=y
to be added to hostapd and wpa_supplicant .config files.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
2014-10-26 19:18:34 +02:00
Jouni Malinen
412d764727 tests: cfg80211 connect command for WEP connection
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-10-26 17:01:37 +02:00
Jouni Malinen
8619c33420 tests: External bridge control for hostapd interface
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-10-26 11:29:16 +02:00
Jouni Malinen
cded555f06 tests: hostapd rfkill
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-10-26 10:53:37 +02:00
Jouni Malinen
ac69c33297 tests: Print failure exeception if logger output goes to file
This makes it more convenient to determine failure reasons during test
case development and VM testing.

Signed-off-by: Jouni Malinen <j@w1.fi>
2014-10-26 10:39:32 +02:00
Jouni Malinen
9d3d2dbdcb tests: IP address in STATUS
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-10-26 10:21:48 +02:00
Jouni Malinen
85b60adddd tests: Make ap_ht40_csa and ap_ht40_csa3 less likely to fail
It looks like cfg80211 can trigger disconnection even without disabling
HT, so the same issue may be hit with both of the channel switches in
these test cases.

Signed-off-by: Jouni Malinen <j@w1.fi>
2014-10-25 23:19:48 +03:00
Jouni Malinen
42a4ba2865 tests: Group formation wait for peer with driver increasing ROC duration
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-10-25 21:46:39 +03:00
Jouni Malinen
99e5f0e616 tests: Channel switch with HT40
ap_ht40_csa and ap_ht40_csa3 seem to show a cfg80211/mac80211 issue
where a CSA from HT40+ to HT40- channel results in HT getting disabled
due to cfg80211_chandef_compatible() check on c1->width == c2->width
claiming that the new channel is not compatible. For now, comment out
the FAIL case for these known issues to avoid constant failure for cases
that are not wpa_supplicant/hostapd issues. Once the kernel side design
has been reviewed, these error cases can be enabled here.

Signed-off-by: Jouni Malinen <j@w1.fi>
2014-10-25 12:09:02 +03:00
Jouni Malinen
d4792c0cb7 tests: Channel switch with VHT80
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-10-25 11:29:28 +03:00
Jouni Malinen
bd5a7691bf tests: Radar detection on HT40 channel
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-10-25 10:52:06 +03:00
Jouni Malinen
fbb79f94eb tests: Allow time for go_neg_pbc() GO Neg Resp to go out
It was possible for the not-pre-authorized GO Negotiation case to end up
starting new GO Negotiation before the GO Negotiation Response frame
with status=1 was transmitted. While this works for group formation, it
could reduce test coverage for the common case where that response is
received. At a small sleep to make it less likely for this unexpected
sequence to happen during testing.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2014-10-23 16:33:25 +03:00
Johannes Berg
1e3c7e82b5 tests: Disable support_p2p_device by default
When loading the hwsim module, disable support_p2p_device by default.
This will also become the default in the kernel, but until then it
makes sure it's not turned on by default.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2014-10-22 10:53:52 +03:00
Johannes Berg
5a8d165cd8 tests: Use dynamic radio for P2P_DEVICE tests
Use dynamic radios for P2P_DEVICE tests to be able to test
support when the default in hwsim is to not support it.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2014-10-22 10:53:45 +03:00
Jouni Malinen
9b2c227216 tests: Run run-tests.py as root from run-all.sh
This will be needed to be able to control dynamic mac80211_hwsim
operations like adding and removing a phy. In the past, it has been
possible to start the main programs as root and then use non-root
account for run-tests.py. However, there is already a large number of
cases within the test scripts where sudo is needed. Moving that
requirement to execution of run-tests.py allows those to be simplified
as well.

Signed-off-by: Jouni Malinen <j@w1.fi>
2014-10-22 10:50:57 +03:00
Jouni Malinen
81ea400d37 tests: P2P SD with GO
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2014-10-21 23:32:17 +03:00
Jouni Malinen
4181c3964d tests: BSS Load updates
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2014-10-21 23:32:11 +03:00
Johannes Berg
8a5cc2fe38 tests: Introduce hwsim radio context manager
The new HWSimRadio context manager allows the following
syntax to create (and appropriately destroy) a new radio:

  with HWSimRadio([...]) as (radio_id, iface_name):
    [...]

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2014-10-21 17:35:20 +03:00
Johannes Berg
91d7a9a1c5 tests: Allow creating radio with p2p-device support
For testing P2P-Device support properly, allow dynamically
creating radios with support for it in hwsim.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2014-10-21 17:35:20 +03:00
Jouni Malinen
eb92d389a8 tests: Remove wlan5-related interfaces based on list
Instead of hardcoding reset_devs() to remove wlan5, remove all wlan*
interfaces renaming in the wpa_supplicant process to support the case of
dynamically added hwsim phy.

Signed-off-by: Jouni Malinen <j@w1.fi>
2014-10-20 12:52:25 +03:00
Jouni Malinen
5f797376f2 tests: Make RELOG command use global control interface
This allows RELOG to be used even if a wpa_supplicant process does not
have any interfaces configured.

Signed-off-by: Jouni Malinen <j@w1.fi>
2014-10-20 12:52:25 +03:00
Jouni Malinen
ce9c8c4097 tests: Use internal DATA_TEST_* functionality instead of hwsim_test
This replaces use of the external hwsim_test tool for most data
connectivity test cases. Only the cases where a special interface
(bridge/VLAN) is used are still executed through hwsim_test.

The internal DATA_TEST_* functionality makes it easier to extend the
connectivity test cases through an external device with real WLAN
hardware instead of the hwsim test setup. In addition, the error reports
from this code can be made more informative.

Signed-off-by: Jouni Malinen <j@w1.fi>
2014-10-19 22:27:37 +03:00
Jouni Malinen
4823566ca7 tests: Add WpaSupplicant.wait_group_event()
This can be used to wait for events from a P2P group interface.

Signed-off-by: Jouni Malinen <j@w1.fi>
2014-10-19 22:27:37 +03:00
Jouni Malinen
f6420942cb tests: Add own_addr() for both Hostapd and WpaSupplicant classes
This makes it easier to use instances of control interfaces in common
code without having to separately address hostapd and wpa_supplicant
behavior differences.

Signed-off-by: Jouni Malinen <j@w1.fi>
2014-10-19 22:27:37 +03:00
Jouni Malinen
a8375c94c0 tests: Pass wpas/hapd instance to test_connectivity()
This makes it easier to replace data connectivity testing to use
something else than local hwsim_test binary on the controller device.

Signed-off-by: Jouni Malinen <j@w1.fi>
2014-10-19 17:54:49 +03:00
Luciano Coelho
5d7746b589 tests: Add test cases for AP channel switch announcement
Signed-hostap: Luciano Coelho <luciano.coelho@intel.com>

Skip CSA tests if the driver doesn't support this in AP mode.

Signed-hostap: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
2014-10-19 16:04:31 +03:00
Jouni Malinen
a709c5e29f Add a test vector for AES-SIV
This verifies that the AES-SIV implementation results matches RFC 5297
test vector A.1.

Signed-off-by: Jouni Malinen <j@w1.fi>
2014-10-19 12:43:40 +03:00
Jouni Malinen
71c41d45af tests: Provide more details of parallel testing with curses UI
This extends parallel-vm.py to show more details about testing progress
from each VM.

Signed-off-by: Jouni Malinen <j@w1.fi>
2014-10-19 11:19:49 +03:00
Jouni Malinen
9c2d2378ba tests: P2P re-invocation with p2p_add_cli_chan=1
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-10-18 17:00:57 +03:00
Toby Gray
fd1776536b tests: Removing a P2P group via the group control interface
This adds a test which attempts to use the control interface for the
P2P group to remove the P2P group.

Signed-off-by: Toby Gray <toby.gray@realvnc.com>
2014-10-18 16:22:25 +03:00
Jouni Malinen
19d3a6e364 tests: SAE PMKSA caching
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-10-18 13:03:17 +03:00
Jouni Malinen
414236b5db tests: RADIUS accounting with PMKSA caching
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-10-18 10:20:07 +03:00
Jouni Malinen
a87e123a96 tests: Add Python-version of parallel-vm.sh
This is a more advanced version of the simple parallel-vm.sh script.
Status of each VM is printed out during the test and results are
provided in more convenient format in the end.

Signed-off-by: Jouni Malinen <j@w1.fi>
2014-10-12 21:49:36 +03:00
Jouni Malinen
3f08d1cde8 tests: WPS PBC triggered based on hostapd event
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-10-12 17:58:04 +03:00
Jouni Malinen
6503deb9ac tests: Wi-Fi Display element updates and P2P-DEVICE-FOUND
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-10-12 16:46:24 +03:00
Jouni Malinen
0a5787162a tests: Make ap_hs20_fetch_osu more robust under heavy load
Use scan_for_bss() instead of scan() to avoid errors if the active scan
fails, e.g., due to heavy load under parallel-vm.sh test run.

Signed-off-by: Jouni Malinen <j@w1.fi>
2014-10-12 12:38:18 +03:00
Jouni Malinen
89f20842f6 tests: OpenSSL cipherlist configuration
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-10-12 11:59:04 +03:00
Jouni Malinen
b43ac5d5ab tests: P2P group formation with WSC_Done missing
This verifies that GO is able to complete group formation even if the
P2P Client does not send WSC_Done message (or that message is dropped
for any reason) in case the P2P Client completes 4-way handshake
successfully.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2014-10-10 18:40:57 +03:00
Jouni Malinen
cf0b9c86c5 tests: 4-way exchange using external EAPOL I/O
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2014-10-10 18:40:57 +03:00
Jouni Malinen
64502039c0 tests: Make ap_hs20_session_info more robust
It looks like mac80211 scan-while-associated can now take over 10
seconds with the current wireless-regdb rules for world roaming due to
number of additional DFS channel having been enabled for passive
scanning. This resulted in ap_hs20_session_info failing due to the wait
for the scan result event timing out. That is not really a real failure,
so increase the timeout to avoid reporting this incorrectly.

Signed-off-by: Jouni Malinen <j@w1.fi>
2014-10-10 00:37:07 +03:00
Jouni Malinen
74ed673f33 tests: VHT 80+80 MHz
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2014-10-09 14:27:23 +03:00
Jouni Malinen
bc86d8c158 tests: Fix DFS radar-during-CAC test case
This uses mac80211_hwsim dfs_simulate_radar to get the real kernel side
CAC operation executed and aborted due to radar detection. This allows
another channel to be selected properly through another CAC run.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2014-10-09 02:10:34 +03:00
Jouni Malinen
831cb7af96 tests: Extend DFS testing to include channel switch
Simulate a radar detection event to verify that hostapd switches
channels properly and the station follows the AP to the new channel.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2014-10-09 01:23:21 +03:00