Commit graph

119 commits

Author SHA1 Message Date
Markus Theil
3806ad73e1 tests: DFS test for mesh
Add a test which uses a DFS channel, waits for CAC afterwards successful
mesh join and then triggers a radar event and checks if the mesh comes
up again on the same device.

Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de>
2020-12-01 00:37:50 +02:00
Markus Theil
0be9c232a3 tests: Remove wpas_mesh_open_5ghz_coex
This is in preparation for an implementation change that ends up
contradicting the operations enforced in this test case for mesh coex.

Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de>
2020-10-14 12:44:15 +03:00
Masashi Honma
267d619798 tests: Fix mesh_open_vht_160 false negative by using common finalizer
mesh_open_vht_160 might fail with this message:

---------------
wlan0: Country code not reset back to 00: is ZA
wlan0: Country code cleared back to 00
---------------

This patch fixes the issue.

Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
2020-10-12 11:18:53 +03:00
Masashi Honma
fd59cc8924 tests: Fix wpas_mesh_open_vht_80p80 false negative by using common finalizer
wpas_mesh_open_vht_80p80 might fail with this message:

---------------
wlan0: Country code not reset back to 00: is US
wlan0: Country code cleared back to 00
---------------

This patch fixes the issue.

Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
2020-10-12 11:18:46 +03:00
Masashi Honma
54830a2445 tests: Fix wpas_mesh_open_vht20 false negative by using common finalizer
wpas_mesh_open_vht20 might fails with this message:

---------------
wlan0: Country code not reset back to 00: is US
wlan0: Country code cleared back to 00
---------------

This patch fixes the issue.

Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
2020-10-12 11:18:39 +03:00
Masashi Honma
91de752d17 tests: Fix wpas_mesh_open_vht40 false negative by using common finalizer
wpas_mesh_open_vht40 might fail with this message:

---------------
wlan0: Country code not reset back to 00: is US
wlan0: Country code cleared back to 00
---------------

This patch fixes the issue.

Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
2020-10-12 11:18:32 +03:00
Masashi Honma
5eea042220 tests: Fix wpas_mesh_open_ht40 false negative by using common finalizer
wpas_mesh_open_ht40 might fail with this message:

---------------
wlan0: Country code not reset back to 00: is US
wlan0: Country code cleared back to 00
---------------

This patch fixes the issue.

Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
2020-10-12 11:18:25 +03:00
Masashi Honma
0bea288fbe tests: Fix wpas_mesh_open_5ghz false negative by using common finalizer
wpas_mesh_open_5ghz might fail with this message:

---------------
wlan0: Country code not reset back to 00: is US
wlan0: Country code cleared back to 00
---------------

This patch fixes the issue.

Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
2020-10-12 11:18:15 +03:00
Masashi Honma
ee03056a62 tests: Fix mesh_secure_ocv_mix_legacy false negative by using common finalizer
mesh_secure_ocv_mix_legacy might fail with this message:

---------------
wlan0: Country code not reset back to 00: is AZ
wlan0: Country code cleared back to 00
---------------

This patch fixes the issue.

Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
2020-10-12 11:17:52 +03:00
Jouni Malinen
0b21877185 tests: Move clear_scan_cache() and set_world_reg() to utils.py
Signed-off-by: Jouni Malinen <j@w1.fi>
2020-04-18 11:35:32 +03:00
Jouni Malinen
7e88ed8e2d tests: Use function decorator to clean up --long processing
Signed-off-by: Jouni Malinen <j@w1.fi>
2020-04-18 11:35:32 +03:00
Jouni Malinen
21cf2c5baf tests: Skip more tests based on missing TKIP support
This makes it more convenient to run tests with builds that disable
TKIP/WPA(v1) support completely.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2020-04-17 23:51:58 +03:00
Jouni Malinen
97de4a0f9b tests: Verify that HE gets fully enabled for mesh
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2020-03-02 19:56:27 +02:00
Jouni Malinen
6a673d0fb0 tests: Remove mesh SAE Password Identifier test cases for now
IEEE P802.11-REVmd was modified to require H2E to be used whenever
Password Identifier is used with SAE. Since wpa_supplicant and mac80211
do not yet support SAE H2E in mesh, Password Identifier cannot be used
in mesh cases. Remove the test cases that verified this behavior for now
to allow H2E to be required per updated REVmd definition. These test
cases will be restored once H2E is fully functionality in mesh cases.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2020-01-21 13:00:20 +02:00
Jouni Malinen
e62a1cbaf1 tests: Detect tshark regression in wpas_mesh_gate_forwarding
Skip this test case if the used tshark version has regression in mesh
control field parsing:
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=15521

Signed-off-by: Jouni Malinen <j@w1.fi>
2020-01-04 18:08:03 +02:00
Jouni Malinen
743b234902 tests: Speed up wpas_mesh_gate_forwarding tshark operations
For some reason, running tshark in the test cases can take significant
time especially with UML time-travel. Optimize this by reducing the
number of times tshark needs to be executed in the loop.

Signed-off-by: Jouni Malinen <j@w1.fi>
2019-12-27 00:03:24 +02:00
Jouni Malinen
07e69dfb05 tests: Secure mesh with BIP-GMAC-128, BIP-GMAC-256, and BIP-CMAC-256
Signed-off-by: Jouni Malinen <j@w1.fi>
2019-12-25 23:56:16 +02:00
Jouni Malinen
f11157604c tests: Make wpas_mesh_pmksa_caching_ext more robust
Avoid race conditions in completing mesh group removal/re-addition steps
and starting connectivity check. It seemed to be possible to get to the
connectivity test in some cases before the mesh STA had rejoined the
mesh and completed key configuration.

Signed-off-by: Jouni Malinen <j@w1.fi>
2019-10-27 16:20:19 +02:00
Jouni Malinen
f3c188fa7d tests: Import helper functions directly from utils.py
These were moved from test_sae.py to utils.py, so import them from the
correct location instead of through test_sae.py that imports them from
utils.py.

Signed-off-by: Jouni Malinen <j@w1.fi>
2019-08-24 12:11:53 +03:00
Sven Eckelmann
d1fcf34cb5 tests: Fix wlan.mesh.config.cap workaround for test_wpas_mesh_max_peering
The wlan.mesh.config doesn't have to be the last element of beacon. Things
like VHT or HE oper/cap are usually follow the mesh configuration element.

The workaround must first get the position of a correct reference value in
wlan.mesh.config (ps_protocol) and then calculate the correct
wlan.mesh.config.cap offset based on that.

Reported-by: Johannes Berg <johannes@sipsolutions.net>
Fixes: 2cbaf0de22 ("tests: Work around tshark bug in wpas_mesh_max_peering")
Signed-off-by: Sven Eckelmann <sven@narfation.org>
2019-08-13 13:57:50 +03:00
Jouni Malinen
ea27fcff61 tests: Skip mesh_link_probe if kernel support not present
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2019-06-03 20:30:51 +03:00
Jouni Malinen
a9b4e558af tests: Mesh link probing
Signed-off-by: Jouni Malinen <j@w1.fi>
2019-05-28 15:29:58 +03:00
Jouni Malinen
fad1a1e340 tests: Previously missed aes_s2v() error path
This targets the omac1_aes_vector() call from within the 0..num_elem-1
loop in aes_s2v().

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2019-04-16 20:54:25 +03:00
Jouni Malinen
e71a90711d tests: Fix mesh_sae_groups_invalid to reset sae_groups setting
This test case did not clear a possibly modified sae_groups value from a
prior test case for adev[2] and could fail if the previously set group
was not supported by the AP.

Signed-off-by: Jouni Malinen <j@w1.fi>
2019-03-18 00:02:16 +02:00
Jouni Malinen
fab49f6145 tests: Python coding style cleanup (pylint3 bad-whitespace)
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2019-03-16 18:52:09 +02:00
Jouni Malinen
3507968fd2 tests: SAE anti-clogging request with mesh BSS
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2019-03-15 00:31:09 +02:00
Masashi Honma
54c58f29c0 tests: Replace str.encode('hex') with binascii.hexlify() for python3
Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
Signed-off-by: Jouni Malinen <j@w1.fi>
2019-02-04 12:26:34 +02:00
Masashi Honma
15dfcb69df tests: Use 'b' prefix to mark Bytes literals explicitly for python3
Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
Signed-off-by: Jouni Malinen <j@w1.fi>
2019-02-04 12:26:33 +02:00
Masashi Honma
04fa9fc7fd tests: Decode Popen() output values for python3
Explicit conversion to str is needed here for python3 compatibility.

Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
2019-02-04 12:26:33 +02:00
Masashi Honma
bab493b904 tests: Use python3 compatible "except" statement
This patch is made by using 2to3 command.

$ find . -name *.py | xargs 2to3 -f except -w -n

Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
2019-01-26 12:11:35 +02:00
Jouni Malinen
5d2e9d1cf8 tests: Reduce mesh result code duplication with helper functions
These checks were repeated in almost every test case, so use helper
functions to get rid of duplicated (copy-pasted) code.

Signed-off-by: Jouni Malinen <j@w1.fi>
2019-01-07 00:25:08 +02:00
Jouni Malinen
dc1aaa5d07 tests: Mesh with VHT20 and VHT40
Signed-off-by: Jouni Malinen <j@w1.fi>
2019-01-07 00:01:23 +02:00
Peter Oh
03d9019811 tests: Update mesh_oom to match implementation change
The number of direct allocation within wpa_supplicant_mesh_init()
has been reduced due to RSN init function is factored out.

Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com>
2019-01-03 12:07:17 +02:00
Mathy Vanhoef
0059625b77 tests: OCI validation in the AMPE handshake (OCV)
Signed-off-by: Mathy Vanhoef <Mathy.Vanhoef@cs.kuleuven.be>
2018-12-17 15:50:12 +02:00
Jouni Malinen
2cbaf0de22 tests: Work around tshark bug in wpas_mesh_max_peering
It looks like tshark parser was broken at some point for
wlan.mesh.config.cap which is now (tshark 2.6.3) pointing to incorrect
field (same as wlan.mesh.config.ps_protocol). This used to work with
tshark 2.2.6.

For now, assume the capability field ends up being the last octet of the
frame.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2018-10-17 12:33:11 +03:00
Jouni Malinen
13f69792b0 tests: Update mesh_oom to match implementation change
The initial direct allocation within wpa_supplicant_mesh_init() was
removed.

Signed-off-by: Jouni Malinen <j@w1.fi>
2018-05-31 16:14:28 +03:00
Jouni Malinen
9a0ae89d62 tests: SAE with Password Identifier
This verifies SAE Password Identifier functionality in both the
infrastructure and mesh BSS cases.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2018-05-19 17:30:29 +03:00
Jouni Malinen
f75ed521a5 tests: wpa_supplicant secure mesh using sae_password
Signed-off-by: Jouni Malinen <j@w1.fi>
2018-04-13 12:09:33 +03:00
Jouni Malinen
a680f4ef39 tests: Use group 26 instead of 25 in mesh test cases
This allows mesh_sae_groups_invalid and
wpas_mesh_secure_sae_group_negotiation to be run with BoringSSL (group
25 not available anymore).

Signed-off-by: Jouni Malinen <j@w1.fi>
2017-11-18 17:50:08 +02:00
Masashi Honma
704e9d0f21 tests: Add mesh RSSI threshold test
Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
2017-05-08 16:26:06 +03:00
Jouni Malinen
7e6cc3288c tests: Update mesh_oom to match the wpa_supplicant_mesh_init() change
There is now one fewer direct allocation call in this function, so the
counters need to be updated to avoid test failures.

Signed-off-by: Jouni Malinen <j@w1.fi>
2017-02-04 22:46:06 +02:00
Jouni Malinen
e91877fb62 tests: Mesh and HT40 support difference
Signed-off-by: Jouni Malinen <j@w1.fi>
2017-01-29 18:31:54 +02:00
Jouni Malinen
5edd051961 tests: wpa_supplicant mesh with dynamic interface and removal
This is a regression test case for SIGSEGV in
wpa_supplicant_remove_iface() if the main interface is removed while a
separate mesh interface is in use.

Signed-off-by: Jouni Malinen <j@w1.fi>
2017-01-29 17:42:02 +02:00
Jouni Malinen
3ca712028d tests: Remove mesh before trying to clear BSS cache
The flush_scan_cache() operations in the finally part of these test
cases ended up getting called when the mesh group was still operating.
This could result in unexpected behavior due to offchannel scan being
performed before the device becomes idle. Clean this up by explicitly
removing the mesh group before cleaning up.

Signed-off-by: Jouni Malinen <j@w1.fi>
2017-01-29 16:27:07 +02:00
Jouni Malinen
6363396325 tests: Secure mesh network and PMKSA caching and external storage
Signed-off-by: Jouni Malinen <j@w1.fi>
2017-01-14 18:27:19 +02:00
Jouni Malinen
7f2905e0da tests: Mesh with two stations that can't reach each other directly (RSN)
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2017-01-13 23:26:20 +02:00
Johannes Berg
f5a270b5dc tests: Add a test for mesh forwarding
Add a new test that tests connectivity between two stations that
can't reach each other directly in the mesh, but need forwarding
on another station to talk to each other.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2017-01-13 15:05:26 +02:00
Jouni Malinen
963041c3cb tests: Fix mesh_open_vht_160 skipping
It is possible for wireless-regdb to include a 160 MHz channel, but with
DFS required. This test case need the regulatory information to allow
160 MHz channel without DFS. Fix false failures by skipping the test if
this exact combination is not found.

Signed-off-by: Jouni Malinen <j@w1.fi>
2016-12-25 00:47:01 +02:00
Jouni Malinen
f05a893eda tests: Check MESH flag in BSS output in wpas_mesh_mode_scan
In addition, use a single channel scan to make the test case run faster.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-12-22 14:17:48 +02:00
Jouni Malinen
e3b38d6e04 tests: Mesh network on 5 GHz band and 20/40 coex change
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-12-13 20:07:52 +02:00