Commit graph

4659 commits

Author SHA1 Message Date
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
Jouni Malinen
06edbdf4da tests: Downgrade to 20 MHz due to regdb constraints
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2024-02-02 11:16:21 +02:00
Jouni Malinen
dfaedb2095 tests: Remove WpaSupplicant control interface workarounds
Now that run-tests.py closes the control interface sockets explicitly,
there is no need to try to avoid using dev[] within the D-Bus test
cases.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2024-01-31 12:27:48 +02:00
Jouni Malinen
eb1542c8e4 tests: Close wpa_supplicant control interface sockets at the end
Close all the control interface sockets and delete the client socket
files explicitly at the end of the test loop. This removes needs for
various workarounds that tried to force WpaSupplicant and Ctrl class
__del__() to remove the sockets.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2024-01-31 12:16:36 +02:00
Johannes Berg
6777ff621a test: dbus: Wait for connection before disconnect (again)
The same thing as we did previously in dbus_p2p_autogo_pbc
can evidently also happen in dbus_p2p_autogo.

The test here wants to connect and then disconnect again,
but it's driven only by the GO side, so the client may end
up (with UML time-travel) not fully connecting, and then
it all fails. Wait for the client to have connected first.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2024-01-31 12:00:27 +02:00
Jouni Malinen
13837a031a tests: AP MLD behavior with multiple STAs
In particular, verify AID assignment by AP MLD to both non-AP MLDs and
non-MLD STAs.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2024-01-30 11:56:31 +02:00
Johannes Berg
44b7b9178b test: dbus: Wait for connection before disconnect
The test here wants to connect and then disconnect again, but it's
driven only by the GO side, so the client may end up (with UML
time-travel) not fully connecting, and then it all fails. Wait for the
client to have connected first.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2024-01-29 11:05:31 +02:00
Jouni Malinen
846534c2a3 tests: FILS SK and STA requesting PTK rekeying
Signed-off-by: Jouni Malinen <j@w1.fi>
2024-01-28 19:02:55 +02:00
Jouni Malinen
627c3f35dc tests: EAPOL-Key msg 4/4 protocol testing for invalid Key Data encryption
Signed-off-by: Jouni Malinen <j@w1.fi>
2024-01-28 11:06:26 +02:00
Jouni Malinen
c579b07e26 tests: Use the provided timeout for P2P peer discovery
p2p_go_neg_init() ignored the provided timeout value and used the
default 15 second timeout in discover_peer(). This did not allow the
recently added go_neg_pbc() timeout increase for concurrent cases to be
used fully.

Signed-off-by: Jouni Malinen <j@w1.fi>
2024-01-27 11:35:31 +02:00
Jouni Malinen
b292b107d6 tests: Make P2P SD multi-query tests more robust
Accept any sequence and number of responses as long as the needed
Bonjour and UPnP services are found.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2024-01-26 17:13:37 +02:00
Jouni Malinen
e619dcce31 tests: Allow more time for chirping in dpp_chirp_ap_5g
The full scan at the beginning of the chirping step can take over 15
seconds when 6 GHz and S1G channels are included and the timeout here is
not enough to handle that.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2024-01-26 12:18:32 +02:00
Jouni Malinen
30d6231e02 tests: Flush scan cache for rrm_beacon_req_table_detail
Explicitly flush the scan cache in wpa_supplicant and cfg80211 to avoid
test failures here. An additional BSS table entry from a scan based on a
previous test case could result in causing this test case to report
failure since each beacon response could include multiple entries and
the check for the details would fail due to the unexpected data.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2024-01-26 12:10:41 +02:00
Jouni Malinen
e41a51285d tests: Make dfs_etsi more robust
Explicitly wait for the STA to complete connection or channel switch
processing before running the second connectivity check.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2024-01-26 12:00:24 +02:00
Jouni Malinen
2e7b51719b tests: Add more time for concurrent GO group negotiation cases
It is possible for the parallel connection attempt with an AP and P2P
device discovery with P2P search on social channels to take close to the
15 second timeout and these test cases could fail because of that
instead of a real issue. Increase the timeout to make this less likely
to cause test failures. In addition, add a debug entry to the log on the
r_dev timeout to avoid confusing print from the i_dev thread reporting a
timeout even when the first timeout was on the rdev_

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2024-01-26 11:18:24 +02:00
Jouni Malinen
fee037d70d tests: Enable PSK AKMs in EHT+MLO in WPA3 transition mode test
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2024-01-25 19:50:07 +02:00
Jouni Malinen
8356a38f48 tests: Do not enable VHT for EHT test cases on 2.4 GHz
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2024-01-25 19:41:33 +02:00
Johannes Berg
bf26920792 tests: proxyarp_errors: Sync carrier before sending frame
Similar to other cases before, this may end up trying to
send the frame before the carrier state is ready. Ensure
it's ready before sending the frame.

To do that, rename the sync_carrier() function and make
the ifname argument optional.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2024-01-25 12:01:19 +02:00
Johannes Berg
b7ed69206d tests: FST: Leave time to process session request
Due to scheduling in UML time-travel, the test may continue
running and find that the failure didn't trigger when really
the frame just didn't make it through to the other side. Add
some time for the necessary processing.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2024-01-25 12:00:59 +02:00
Jouni Malinen
f873abd0d9 tests: Allow valgrind suppressions to be used
This makes valgrind reports somewhat cleaner when external libraries
have memory leaks that are not straighforward to fix. In addition,
increase the number of functions to include backtraces since the default
was not large enough to cover some cases.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2024-01-22 21:16:47 +02:00
Jouni Malinen
ee9375fb3b tests: Association comeback mechanism in wpa_supplicant
Allow the Timeout Interval Type field in the Timeout Interval element to
be overridden with a different value for testing purposes to be able to
bypass the association comeback processing in mac80211. This allows the
wpa_supplicant internal functionality to be tested.

Signed-off-by: Jouni Malinen <j@w1.fi>
2024-01-21 12:17:23 +02:00
Jouni Malinen
a86709b52e tests: Write more info and statistics in parallel-vm.log
This is helpful in tracking how the total test execution time changes.

Signed-off-by: Jouni Malinen <j@w1.fi>
2024-01-20 20:53:21 +02:00
Damien Dejean
0ef4b1e1db D-Bus: Add a signal for HS2.0 terms and conditions
Add HS20TermsAndConditions signal to D-Bus API to allow clients to be
notified when the network requires the acceptance of terms and
conditions. The URL of the T&C page is provided as a signal parameter.

Signed-off-by: Damien Dejean <damiendejean@chromium.org>
2024-01-20 20:16:36 +02:00
Jouni Malinen
f580691897 tests: FT with dynamic RxKHs configuration
Signed-off-by: Jouni Malinen <j@w1.fi>
2024-01-20 10:46:23 +02:00
Benjamin Berg
71bcb97b8c tests: Use pgrep instead of ps
The ps command as shipped by busybox does not support the "command"
column. Change the code to use pgrep instead which will work fine in all
environments.

In addition, raise an exception if PID was not found since the test
would just hang with pid = 0.

Signed-off-by: Benjamin Berg <benjamin.berg@intel.com>
2024-01-20 09:35:39 +02:00
Jouni Malinen
1a38056930 tests: Encrypted Key Data field in EAPOL-Key msg 2/4 and 4/4
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2024-01-16 22:05:02 +02:00
Jouni Malinen
d1b043750c tests: Extra element and KDE in EAPOL-Key msg 2/4 and 4/4
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2024-01-16 16:38:30 +02:00
Jouni Malinen
8afeb0760d tests: Supplicant protocol testing for EAPOL-Key msg 1/4 and 3/4
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2024-01-16 13:06:49 +02:00
Jouni Malinen
2a61071182 tests: Make wpas_ap_wps more robust
Avoid race conditions (especially with UML time travel) between AP
completion of 4-way handshake and traffic test.

Signed-off-by: Jouni Malinen <j@w1.fi>
2024-01-14 21:27:38 +02:00
Jouni Malinen
97403b7fef tests: Longer association comeback time
Verify functionality with 10000 TU comeback time in addition to the
hostapd default of 1000 TU.

Signed-off-by: Jouni Malinen <j@w1.fi>
2024-01-14 21:13:24 +02:00
Jouni Malinen
9aa82da229 tests: Make ACS tests more reliable
The test cases that used country code ZA for the actual test on the 5
GHz band ended up failing in some cases due to various race conditions
with the initial AP start on the 5 GHz band using country code US.
Reduce the risk for that type of failures by using the same country code
ZA for both AP starts.

Signed-off-by: Jouni Malinen <j@w1.fi>
2024-01-14 19:42:23 +02:00
Johannes Berg
c0674fb4f4 tests: Add a test for kernel KUnit tests
Add a test that runs the cfg80211/mac80211 kunit tests (they must be
built as modules to run at this point), and checks the results. The test
is skipped if all the modules fail to load.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2024-01-14 17:54:27 +02:00
Jouni Malinen
44b233b641 tests: Increase timeout for dpp_qr_code_auth_broadcast
This allows another initiation round to be executed if the first
broadcast frame fails to get through.

Signed-off-by: Jouni Malinen <j@w1.fi>
2024-01-14 12:44:15 +02:00
Ilan Peer
bcc28d4453 tests: Add couple of MBO and RRM tests with MLD
To validate correct operation when configured as MLD.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
2024-01-14 11:48:28 +02:00
Daniel Gabay
75ac1f1ac0 tests: Extend MSCS testing
Add tests for new response handling logic:
1. Verify MSCS change response handling in association / action frame.
2. Verify MSCS unsolicited response handling.

Signed-off-by: Daniel Gabay <daniel.gabay@intel.com>
2024-01-14 11:26:56 +02:00
Daniel Gabay
3055838ebe tests: Refactor MSCS
Add helper functions for common logic.

Signed-off-by: Daniel Gabay <daniel.gabay@intel.com>
2024-01-14 11:19:43 +02:00
Jouni Malinen
6aa16abbe4 tests: Allow more time for dpp_qr_code_no_chan_list_broadcast
It looks like the first broadcast frame might be missed in some cases,
so increase the timeout here to allow another round of frames to be
attempted.

Signed-off-by: Jouni Malinen <j@w1.fi>
2024-01-14 00:21:57 +02:00
Jouni Malinen
30975951de tests: Skip test cases that need FILS if CONFIG_FILS=y was not used
fils_offload_to_driver2 and wpas_config_file_key_mgmt require
CONFIG_FILS=y, but they did not use check_fils_capa().

Signed-off-by: Jouni Malinen <j@w1.fi>
2024-01-13 23:48:38 +02:00
Ilan Peer
9dcb72046f tests: Add MLD tests for deauthentication and disassociation
Verifying that the station can successfully associate again
after being deauthenticated or disassociated.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
2024-01-13 22:32:04 +02:00