Commit graph

4697 commits

Author SHA1 Message Date
Rameshkumar Sundaram
84d2a36da0 AP MLD: Require same AKM and pairwise cipher for all links
Signed-off-by: Rameshkumar Sundaram <quic_ramess@quicinc.com>
Co-developed-by: Adil Saeed Musthafa <quic_adilm@quicinc.com>
Signed-off-by: Adil Saeed Musthafa <quic_adilm@quicinc.com>
Signed-off-by: Aditya Kumar Singh <quic_adisi@quicinc.com>
2024-04-20 18:31:11 +03:00
Jouni Malinen
9e3988fc64 tests: Enable TLSv1.3 test cases with OpenSSL 3.3
Signed-off-by: Jouni Malinen <j@w1.fi>
2024-04-20 11:08:50 +03:00
Jouni Malinen
25e465d5b7 tests: Update RSA 3k certificates (2024)
These have not yet expired, but it is easier to get in sync with all
certificate updates.

Signed-off-by: Jouni Malinen <j@w1.fi>
2024-04-17 21:26:36 +03:00
Jouni Malinen
9e59cb8392 tests: Update server and user certificates (2024)
At least some of the previous versions have expired, so need to re-sign
these to avoid EAP test case failures. This contains updates from
running tests/hwsim/auth_server/update.sh.

Signed-off-by: Jouni Malinen <j@w1.fi>
2024-04-17 21:25:56 +03:00
Jouni Malinen
ea2c5fe4d1 tests: Fix sigma_dut_dpp_pb_ap to clear sae_groups
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2024-04-16 11:22:41 +03:00
Johannes Berg
ae1a9909e0 tests: Add test with stuck ECSA in Probe Response frames
Add a test behaving like an Asus RT-AC53 with firmware
3.0.0.4.380_10760-g21a5898, which (in some cases?) can have an ECSA
element stuck in the probe response, when the channel switch is long
finished.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2024-04-16 10:46:15 +03:00
Johannes Berg
41fd49958d tests: Add connecting-while-CSA tests
Add a few tests to validate what happens with connections
while an AP is doing CSA:
 - quiet to diff channel (shouldn't connect)
 - quiet to same channel (shouldn't connect)
 - non-quiet to diff channel (shouldn't connect)
 - non-quiet to same channel (should connect)

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2024-04-16 10:46:13 +03:00
Jouni Malinen
a6062568ab tests: Fix he_6ghz_reg to clear sae_groups
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2024-04-15 23:35:29 +03:00
Vinay Gannevaram
ab37a57314 Replace PMKSA cache inline stubs with wrapper function stubs
PMKSA cache API is included in libpasn.so used by external modules,
e.g., Wi-Fi Aware. To avoid dependency on IEEE8021X_EAPOL define for the
external modules at compile time, remove PMKSA cache static inline
functions from the header file and add wrapper function stubs.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2024-04-06 00:12:52 +03:00
Jouni Malinen
e2ae53e1db tests: MBSSID and beacon protection disabled/enabled
Verify that the Extended Capabilities element for the TX BSS shows
beacon protection disabled and the Extended Capabilities element for the
non-TX BSS (within the Multiple BSSID element) shows it enabled.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2024-04-04 20:44:22 +03:00
Jouni Malinen
07c9f183ea tests: Avoid control interface throttling in various test cases
These can cause unexpected test failures, so dump the pending monitor
socket events more frequently in some cases where event throttling is
seen.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2024-03-27 23:48:39 +02:00
Jouni Malinen
0e4bff095b tests: Flush scan cache to make dbus_anqp_get more reliable
This test could have failed if scan results from a previously executed
test case were still the in the driver cache.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2024-03-27 22:33:38 +02:00
Aditya Kumar Singh
e51f1109b0 tests: AP MLD: Remove mld_id config
mld_id config is not used anymore. Remove its use from test cases.

Signed-off-by: Aditya Kumar Singh <quic_adisi@quicinc.com>
2024-03-26 20:20:55 +02:00
Jouni Malinen
272c253dc9 tests: Clear sae_groups in eht_mld_legacy_stas
This is needed to avoid failures due to previous test cases having left
sae_groups set to something else than the default.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2024-03-26 19:14:48 +02:00
Jouni Malinen
bd52684498 tests: Convert sigma_dut control to a context manager class
This cleans up the implementation and makes stopping of sigma_dut (and
cleanup after some parameters it might leave behind) more robust.

Signed-off-by: Jouni Malinen <j@w1.fi>
2024-03-24 00:24:07 +02:00
Jouni Malinen
64c3c58080 tests: Make rrm_reassociation more robust
It was possible for this test case to fail if a previously executed test
case left another BSS entry for the BSSID used by the second AP here.
That could have skipped the needed scan with scan_for_bss(bssid2). Force
this command to run a new scan to discover the second AP correctly.

Signed-off-by: Jouni Malinen <j@w1.fi>
2024-03-23 22:22:07 +02:00
Janusz Dziedzic
2342d95821 tests: remotehost: Extend proc API
Signed-off-by: Janusz Dziedzic <janusz.dziedzic@gmail.com>
2024-03-23 21:58:59 +02:00
Jouni Malinen
b83797a3eb tests: Clear scan cache for SAE-EXT-KEY tests
These test cases check the BSS entry information and if the kernel scan
cache maintains an old BSS entry for a previous test case for the same
BSSID this can result in a false failure.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2024-03-20 18:13:08 +02:00
Jouni Malinen
91b9786ced tests: cfg80211_tx_frame: filter frames based on SA
This makes the test care less likely to fail due to another STA
happening to be listening for Public Action frames and replying to the
P2P GO Negotiation Request.

Signed-off-by: Jouni Malinen <j@w1.fi>
2024-03-17 19:55:11 +02:00
Jouni Malinen
ab719621b7 tests: Allow WlantestCapture to be used with context managers
In addition, convert many of the uses to do so.

Signed-off-by: Jouni Malinen <j@w1.fi>
2024-03-17 17:10:33 +02:00
Jouni Malinen
91282e29ff tests: Clean up test case importing
Move this to a helper function and return a set of test names instead of
a list.

Signed-off-by: Jouni Malinen <j@w1.fi>
2024-03-17 15:39:54 +02:00
Jouni Malinen
3054112254 tests: Add missed test case __doc__ strings
Signed-off-by: Jouni Malinen <j@w1.fi>
2024-03-17 15:21:11 +02:00
Jouni Malinen
caf0cda761 tests: Verify test case function documentation
Check that each test case function includes a title in __doc__ and also
verify that the same test case is not added multiple times from
different files.

Signed-off-by: Jouni Malinen <j@w1.fi>
2024-03-17 15:20:26 +02:00
Jouni Malinen
695277a5b3 tests: Use CS more carefully in p2p_device_autogo_chan_switch
Do not disable HT support on the GO and wait for the channel switch
event on the P2P Client before proceeding with connectivity test.

Signed-off-by: Jouni Malinen <j@w1.fi>
2024-03-09 18:08:52 +02:00
Jouni Malinen
541fa25246 tests: Use triple double quotes around docstrings more consistently
Signed-off-by: Jouni Malinen <j@w1.fi>
2024-03-09 17:59:25 +02:00
Damien Dejean
2ae1e6f18b DBus: Add ANQP fields to BSS properties
Add ANQP fields to the BSS properties to allow DBus clients to be
notified and obtain the values when it changes.

Signed-off-by: Damien Dejean <damiendejean@chromium.org>
2024-03-09 17:59:22 +02:00
Damien Dejean
2ea04435ec DBus: Signal ANQP query done
Add a D-Bus signal "ANQPQueryDone" to notify of the result of an ANQP
request.

Signed-off-by: Damien Dejean <damiendejean@chromium.org>
2024-03-09 17:20:52 +02:00
Damien Dejean
d71c838519 DBus: Add a method to get ANQP fields
Add a D-Bus method to perform ANQP get requests. The new method is
equivalent to the "anqp_get" command available in wpa_cli.

Signed-off-by: Damien Dejean <damiendejean@chromium.org>
2024-03-09 17:16:27 +02:00
Jouni Malinen
d8dca78a3a tests: Wait for a specific DPP-PB-STATUS event
This wait for a specific event is needed to allow a new DPP-PB-STATUS
event to be added at the start of the PB operation.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2024-03-08 10:37:28 +02:00
Aditya Kumar Singh
2986146d9c tests: Add basic MLO CSA test case
Verify that CSA can be performed on the first link of an AP MLD and
further check that traffic still continues even after channel switch.

Finally, check again that a subsequent CSA can be performed without
affecting the data traffic.

Signed-off-by: Aditya Kumar Singh <quic_adisi@quicinc.com>
2024-03-08 10:26:34 +02:00
Johannes Berg
da833a7520 tests: Set valid configuration for EHT puncturing tests
When puncturing is used on EHT, the HT/VHT/HE channel configuration must
not encompass the punctured subchannel, so must use a lower bandwidth.
Change the puncturing tests accordingly.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2024-03-08 10:20:51 +02:00
Jouni Malinen
e625b46a9d Revert "tests: Remove eht_5ghz_80mhz_puncturing_override_1 for now"
This reverts commit eecaceed8f. This test
case can now be restored since hostapd is modified to allow test cases
changes to be done to cover the special impact from EHT puncturing to
available HT/VHT/HE channel bandwidth in this particular case.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2024-03-08 10:20:51 +02:00
Jouni Malinen
eecaceed8f tests: Remove eht_5ghz_80mhz_puncturing_override_1 for now
mac80211 has been modified to reject the configuration that is used in
this test case. For now, remove this until the puncturing of the second
20 MHz segment can be handled in a manner that allows mac80211 STA to
use EHT.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2024-03-06 22:38:09 +02:00
Jouni Malinen
0eb67e43bb tests: Do not drop HT capability on CS to avoid test failures
Leave the HT capability of the AP as-is when running channel switch test
cases that started failing with a recent kernel change that disconnects
on such "unexpected" change in AP capabilities.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2024-03-06 19:32:16 +02:00
Jouni Malinen
0a321d1733 tests: Fix fuzzing tester for WNM
Processing of WNM frames can results in a lookup of the current BSS
table. As such, the testing tool needs to initialize the BSS table to
avoid NULL pointer dereferences. This is not an issue that would show up
with real production uses with wpa_supplicant since wpa_bss_init() is
called there.

Credit to OSS-Fuzz: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=67244
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2024-03-06 17:38:08 +02:00
Jouni Malinen
40d5fecac2 Fix fuzzing test build
The commit that renamed the WNM BTM deallocation function forgot to
update the fuzz tester tool.

Fixes: e508c070c4 ("WNM: Keep BTM information until connection completes")
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2024-03-05 17:24:50 +02:00
Jouni Malinen
27dac87b7c tests: Update Supported Operating Classes element validation
The wpa_supplicant implementation for building the Supported Operating
Classes element was modified to add support for 80 MHz and wider
bandwidth on the 6 GHz band, 2-octet operating classes, and freq_list on
the 6 GHz band. Update the test cases that verify exact encoding of this
information to match the implementation changes.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2024-03-05 17:24:50 +02:00
Jouni Malinen
460df51ed8 tests: Verify supported operating classes indication for 6 GHz
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2024-03-04 19:20:03 +02:00
Jouni Malinen
16f7072888 tests: More debug info for eht_mld_sae_legacy_client
It looks like this test case can fail in some cases. Add more debug info
and event wait that might help with a race condition.

Signed-off-by: Jouni Malinen <j@w1.fi>
2024-03-03 19:25:27 +02:00
Jouni Malinen
6889380177 tests: Use even larger timeout of concurrent P2P operations
It looks like the 30 second timeout, i.e., 25 second to discover and
receive GO Negotiation Request, was not sufficient for all cases.

Signed-off-by: Jouni Malinen <j@w1.fi>
2024-03-03 19:09:10 +02:00
Jouni Malinen
0e399ced32 tests: wpa_supplicant configuration parser range checking
Signed-off-by: Jouni Malinen <j@w1.fi>
2024-03-03 18:47:16 +02:00
Benjamin Berg
45fffac0fe BSS: Switch struct wpa_bss to use valid_links bitmask
This aligns both the wpa_supplicant and bss structures to use the same
pattern of a valid_links bitmask plus per-link entries.

Signed-off-by: Benjamin Berg <benjamin.berg@intel.com>
2024-03-02 12:24:15 +02:00
Benjamin Berg
b532201034 tests: Add missing scan cache flush
Otherwise a BSS from a previous test may still be in the cache.

Signed-off-by: Benjamin Berg <benjamin.berg@intel.com>
2024-03-02 10:46:55 +02:00
Jouni Malinen
88a0ab87a2 tests: Make ap_wpa2_gtk_rekey_fail_1_sta more robust
Slight differences in timing might make the final data connectivity
check fail, so disable the incorrect behavior first and wait for a
successfully completed GTK rekeying at the end before the final test.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2024-02-29 11:55:31 +02:00
Jouni Malinen
8aff823649 tests: RADIUS/TLS with FreeRADIUS
Signed-off-by: Jouni Malinen <j@w1.fi>
2024-02-25 20:54:14 +02:00
Jouni Malinen
39da3c7c63 test: Clear country config param at the end of kernel_reg_disconnect
This is needed to avoid causing issues for following test cases.

Signed-off-by: Jouni Malinen <j@w1.fi>
2024-02-18 11:03:55 +02:00
Jouni Malinen
9c281a9eaa tests: NAN USD
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2024-02-15 19:54:17 +02:00
Jouni Malinen
8270afcdee tests: FT and prepending PMKR1NAme to EAPOL-Key msg 2/4
Signed-off-by: Jouni Malinen <j@w1.fi>
2024-02-03 20:58:01 +02:00
Jouni Malinen
e3d16575c4 tests: AP MLD with two links and disabling/enabling full AP MLD
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2024-02-02 22:52:50 +02:00
Jouni Malinen
6a91e3608f tests: 40 MHz HT40 plus/minus to 20 MHz downgrade
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2024-02-02 17:54:03 +02:00