Commit graph

4367 commits

Author SHA1 Message Date
Jouni Malinen
3550696160 tests: Add forgotten files for expired IMSI privacy cert tests
Fixes: 426932f061 ("tests: EAP-AKA and expired imsi_privacy_key")
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2022-05-24 21:16:36 +03:00
Jouni Malinen
b9a222cdd7 tests: sigma_dut and DPP curve-from-URI special functionality
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2022-05-24 12:49:27 +03:00
Jouni Malinen
fa36e7ee48 tests: sigma_dut controlled STA and EAP-AKA parameters
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2022-05-24 00:44:03 +03:00
Jouni Malinen
99165cc4b0 Rename wpa_supplicant imsi_privacy_key configuration parameter
Use imsi_privacy_cert as the name of the configuration parameter for the
X.509v3 certificate that contains the RSA public key needed for IMSI
privacy. The only allowed format for this information is a PEM-encoded
X.509 certificate, so the previous name was somewhat confusing.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2022-05-24 00:44:03 +03:00
Jouni Malinen
dde7f90a41 tests: Update VM setup example to use Ubuntu 22.04 and UML
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2022-05-24 00:34:08 +03:00
Jouni Malinen
426932f061 tests: EAP-AKA and expired imsi_privacy_key
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2022-05-24 00:34:08 +03:00
Johannes Berg
39e6623082 tests: Work around reentrant logging issues due to __del__ misuse
Unfortunately, some objects (WlantestCapture, WpaSupplicant
and wpaspy.Ctrl) use __del__ and actually have some logic
there. This is more or less wrong, and we should be using
context managers for it. However, cleaning that up is a
pretty large task.

Unfortunately, __del__ can cause reentrant logging which is
wrong too, because it might be invoked while in the middle
of a logging call, and the __del__ of these objects closes
connections and logs while doing that.

Since we're (likely) using cpython, we can work around this
by explicitly calling gc.collect() in a context where the
logging and close is fine, not only ensuring that all the
connections are closed properly before the next test, but
also fixing the issue with reentrant logging.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2022-05-22 11:46:57 +03:00
Jouni Malinen
72641f924e tests: Clean up failed test list in parallel-vm.py
Instead of printing a very long line of the failed tests, print the test
case names on separate lines up to the number of available lines at the
bottom of the screen. This avoids some issues with curses and overlong
lines. Furthermore, display the last failed test cases instead of
somewhat confusing sequence of test case names from the VMs.

Signed-off-by: Jouni Malinen <j@w1.fi>
2022-05-22 11:43:38 +03:00
Jouni Malinen
e36a7c7940 tests: Support pycryptodome
This is a drop-in replacement for pycrypto and the only version that is
now available in Ubuntu 22.04.

Signed-off-by: Jouni Malinen <j@w1.fi>
2022-05-22 11:08:59 +03:00
Jouni Malinen
a44744d3bb tests: Set ECB mode for AES explicitly to work with cryptodome
AES.new() needs the mode to be set explicitly.

Signed-off-by: Jouni Malinen <j@w1.fi>
2022-05-22 11:08:23 +03:00
Jouni Malinen
e90ea900a9 tests: sigma_dut DPP TCP Configurator as initiator with addr from URI
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2022-05-19 22:54:44 +03:00
Jouni Malinen
e58dabbcfb tests: DPP URI with host info
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2022-05-19 17:55:25 +03:00
Jouni Malinen
7173992b96 tests: Flush scan table in ap_wps_priority to make it more robust
This test case could fail if there was an old BSS entry from a previous
test case in the scan results.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2022-05-16 19:09:23 +03:00
Jouni Malinen
b9313e17e8 tests: Update ap_wpa2_psk_ext_delayed_ptk_rekey to match implementation
This test case was checking the exact key info bits in EAPOL-Key frames
during PTK rekeying as such, needs to be updated to match the
implementation change on the Secure bit setting.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2022-05-16 19:06:47 +03:00
Jouni Malinen
d2ce1b4d6c tests: Wait for request before responding in dscp_response
There was a possible race condition here between the hostapd request
transmission and wpa_supplicant response command. Wait for the
wpa_supplicant event that indicates reception of the request before
issuing the DSCP_RESP command to avoid failures.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2022-05-09 11:45:33 +03:00
Ilan Peer
95f4935739 tests: Add coverage for testing disabling collocated 6 GHz scan
Extend 'scan' test to cover 'non_coloc_6ghz' parsing.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
2022-05-07 21:37:08 +03:00
Jouni Malinen
29dcebea70 tests: WPA2-EAP AP with PMF and EAP frame injection
Signed-off-by: Jouni Malinen <j@w1.fi>
2022-05-07 21:37:08 +03:00
Jouni Malinen
18c0ac8901 Provide information about the encryption status of received EAPOL frames
This information was already available from the nl80211 control port RX
path, but it was not provided to upper layers within wpa_supplicant and
hostapd. It can be helpful, so parse the information from the driver
event.

Signed-off-by: Jouni Malinen <j@w1.fi>
2022-05-07 21:37:03 +03:00
Jouni Malinen
8bbd62afe4 tests: PMF and EAPOL-Key msg 1/4 injection
Signed-off-by: Jouni Malinen <j@w1.fi>
2022-05-07 18:54:09 +03:00
Jouni Malinen
f8967ece23 tests: Do not require disconnection in ap_wpa2_psk_supp_proto_msg_1_invalid_kde
The wpa_supplicant implementation for this functionality is going to be
changed to not require disconnection, so prepare the test case to not
fail.

Signed-off-by: Jouni Malinen <j@w1.fi>
2022-05-07 18:54:09 +03:00
Jouni Malinen
4f0cff704b tests: WPA2-PSK with PMF and Association Request frame injection
Signed-off-by: Jouni Malinen <j@w1.fi>
2022-05-07 18:54:09 +03:00
Veerendranath Jakkam
9d07b9447e tests: EHT open connection
Signed-off-by: Veerendranath Jakkam <quic_vjakkam@quicinc.com>
2022-05-05 13:26:05 +03:00
Juliusz Sosinowicz
3890fa5031 tests: Enable additional TLS test cases with wolfSSL
Signed-off-by: Juliusz Sosinowicz <juliusz@wolfssl.com>
2022-05-01 17:27:11 +03:00
Juliusz Sosinowicz
b3333a9f4c tests: Add a note for wolfSSL testing with Brainpool curves
Signed-off-by: Juliusz Sosinowicz <juliusz@wolfssl.com>
2022-05-01 17:02:31 +03:00
Jouni Malinen
924fa4c5d9 tests: IMSI privacy with imsi_privacy_key on peer
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2022-05-01 16:25:16 +03:00
Jouni Malinen
9dd2ea5368 tests: IMSI privacy with imsi_identity
Add RSA public key (in an X.509v3 certificate) and private key for IMSI
privacy. These were generated with
openssl req -new -x509 -sha256 -newkey rsa:2048 -nodes -days 7500 \
	-keyout imsi-privacy-key.pem -out imsi-privacy-cert.pem

Test the case where wpa_supplicant side RSA-OAEP operation for IMSI
privacy is done in an external component while the hostapd (EAP server)
processing of the encrypted identity is internal.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2022-05-01 16:25:16 +03:00
Jouni Malinen
894b0a120f tests: HE with 20 MHz channel width on 6 GHz
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2022-04-29 11:19:43 +03:00
Jouni Malinen
794011d465 tests: Update regulatory database to VMs
Update the wireless-regdb database to the wireless-regdb.git version of
2022-04-08.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2022-04-29 11:19:43 +03:00
Jouni Malinen
b5b5a3951a tests: MBO and dynamic association disallowed change with passive scanning
Signed-off-by: Jouni Malinen <j@w1.fi>
2022-04-24 12:12:21 +03:00
Jouni Malinen
387b341ead tests: Fix SAE-PK capability checks for sigma_dut test cases
These were testing only of SAE, not SAE-PK capability, and needs to be
skipped in SAE-PK is not included in the build.

Signed-off-by: Jouni Malinen <j@w1.fi>
2022-04-18 11:20:33 +03:00
Jouni Malinen
cc821f1c32 tests: Check DPP in build for couple of missing cases
These test cases need to be skipped in DPP is not included in the build.

Signed-off-by: Jouni Malinen <j@w1.fi>
2022-04-18 11:11:29 +03:00
Juliusz Sosinowicz
af052e6e11 tests: Include additional tests for wolfSSL builds
Signed-off-by: Juliusz Sosinowicz <juliusz@wolfssl.com>
2022-04-17 22:02:55 +03:00
Juliusz Sosinowicz
1cda3e76fc tests: Include EAP-pwd for wolfSSL builds
Signed-off-by: Juliusz Sosinowicz <juliusz@wolfssl.com>
2022-04-17 22:02:55 +03:00
Johannes Berg
2f336ca580 tests: Pretend the RNG is initialized withinthe VM
We don't particularly care about the quality of random numbers
during the test. So far, there hasn't been an issue with the
RNG not being initialized completely, we only get a few prints
about uninitialized reads from urandom. However, if some tool
were to actually use /dev/random, it might get stuck. Call the
RNDADDTOENTCNT ioctl to unblock this.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2022-04-16 16:51:54 +03:00
Jouni Malinen
698c05da2b tests: Update server and user certificates (2022)
The previous versions are going to be expiring soon, 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>
2022-04-16 13:22:16 +03:00
Jouni Malinen
86877bbc32 tests: Remove unused DH file from TLS client fuzzer
Signed-off-by: Jouni Malinen <j@w1.fi>
2022-04-15 23:42:15 +03:00
Jouni Malinen
b08d100de6 tests: Remove test cases for wpa_supplicant dh_file parameter
This parameter has no impact to TLS client functionality, so these is
not really any point to maintain these test cases.

Signed-off-by: Jouni Malinen <j@w1.fi>
2022-04-15 23:42:15 +03:00
Jouni Malinen
6c9e76e58a tests: Fix ap_wpa2_eap_fast_eap_vendor to check EAP-FAST support in build
Signed-off-by: Jouni Malinen <j@w1.fi>
2022-04-15 13:49:19 +03:00
Jouni Malinen
e9078209c4 tests: Use group 20 instead of 25 in some SAE test cases
BoringSSL does not support group 25, so replace these cases with a
supported group 20 to meet the real testing need here.

Signed-off-by: Jouni Malinen <j@w1.fi>
2022-04-15 13:47:58 +03:00
Jouni Malinen
ae301fd37a tests: Skip sigma_dut_suite_b_rsa DHE case with BoringSSL
BoringSSL is known not to support this option, so skip it to allow rest
of the test case to be performed without known failures.

Signed-off-by: Jouni Malinen <j@w1.fi>
2022-04-15 13:43:30 +03:00
Jouni Malinen
26dd47f1d1 tests: Skip sae_pwe_group_25 with BoringSSL
BoringSSL does not support this 192-bit EC group, so do not try to run
the test case that is known to fail.

Signed-off-by: Jouni Malinen <j@w1.fi>
2022-04-15 13:36:35 +03:00
Jouni Malinen
3f94dcdd1a tests: Build with LibreSSL 3.4
Signed-off-by: Jouni Malinen <j@w1.fi>
2022-04-15 13:00:26 +03:00
Jouni Malinen
364022ddef tests: sigma_dut DPP URI curves list override
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2022-04-14 17:06:02 +03:00
Jouni Malinen
339aef0980 tests: DPP URI supported curves
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2022-04-14 16:59:15 +03:00
Jouni Malinen
73b41762d0 tests: Fetch commitid on the host when running tests in a VM
git has started rejecting repositories owned by other users and refusing
to run the "git rev-parse HEAD" command in this type of cases. That
resulted in issues with the VM testing model where the VM is practically
running everything as root while the host is a normal development
environment and likely a non-root user owned files.

Fix this by fetching the commitid on the host and pass it to the VM so
that no git operations need to be run within the VM itself.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2022-04-14 11:59:22 +03:00
Jouni Malinen
58701128e8 tests: Handle git rev-parse failures more robustly
Do not add the --commit argument if the current git commitid cannot be
determined. This prevents complete failure to run the tests if the git
command cannot be used for some reason (like a recent change that
stopped allowing root user within the VM from running the git operation
for the case where the host system uses non-root account).

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2022-04-14 11:50:41 +03:00
Jouni Malinen
658296ea5b tests: Use build_beacon_request() to make beacon request more readable
Signed-off-by: Jouni Malinen <j@w1.fi>
2022-04-09 19:37:58 +03:00
Jouni Malinen
060a522576 tests: Beacon request - active scan mode and NO_IR channel
Signed-off-by: Jouni Malinen <j@w1.fi>
2022-04-09 19:17:00 +03:00
Jouni Malinen
7310995d87 tests: EAP-TLSv1.3 with OCSP stapling
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2022-04-07 00:47:31 +03:00
Jouni Malinen
1ba0043034 tests: EAP-TLSv1.3 and fragmentation
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2022-04-07 00:47:31 +03:00
Jouni Malinen
202842b8b3 tests: EAP-TLSv1.3 and missing protected success indication
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2022-04-07 00:45:40 +03:00
Jouni Malinen
e955998220 tests: WPA2-PSK AP and GTK rekey failing with one STA
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2022-04-05 17:25:24 +03:00
Jouni Malinen
b1cc775cf3 tests: Opportunistic Wireless Encryption - duplicated association attempt
Signed-off-by: Jouni Malinen <j@w1.fi>
2022-04-02 17:52:50 +03:00
Jouni Malinen
1a630283db tests: wpa_psk_radius=3
Signed-off-by: Jouni Malinen <j@w1.fi>
2022-04-02 17:52:50 +03:00
Jouni Malinen
1fb907a684 tests: wpa_supplicant AP mode - ACL management
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2022-03-24 23:22:42 +02:00
Jouni Malinen
b37bbcc390 tests: Clear country configuration at the end of wpas_ap_async_fail
This was causing a failure in the following sequence:
wpas_ap_async_fail wpas_ctrl_country

Signed-off-by: Jouni Malinen <j@w1.fi>
2022-03-13 18:26:45 +02:00
Jouni Malinen
7f661f942d tests: Make DPP relay tests more robust
Flush scan results to avoid failure caused by incorrect channel
selection based on an old result for the same BSSID. This was found with
the following test sequence:
ap_track_sta_no_auth dpp_network_intro_version_missing_req dpp_controller_relay_pkex

Signed-off-by: Jouni Malinen <j@w1.fi>
2022-03-13 18:26:45 +02:00
Jouni Malinen
7c8fcd6baf tests: Fix sigma_dut_cmd() processing for the return value
The first sock.recv() may return both the status,RUNNING and the
following status line if the sigma_dut process ends up being faster in
writing the result than the test script is in reading the result. This
resulted in unexpected behavior and odd error messages when parsing the
result in the test cases. Fix this by dropping the status,RUNNING line
from the result in case the buffer includes multiple lines.

Signed-off-by: Jouni Malinen <j@w1.fi>
2022-03-12 19:00:36 +02:00
Jouni Malinen
0c51cf624c tests: sigma_dut DPP Configurator (MUD URL, NAK change)
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2022-03-10 18:29:34 +02:00
Jouni Malinen
e792f38db8 tests: DPP PKEX with netAccessKey curve change
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2022-03-10 01:30:33 +02:00
Jouni Malinen
5ce5ed88a9 tests: Fix dpp_own_config_curve_mismatch to match implementation
This test case was assuming the Configurator would change the
netAccessKey curve every time based on the protocol keys, but that is
not the case anymore, so force that change here for a negative test.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2022-03-10 01:30:33 +02:00
Jouni Malinen
c4a36d050a tests: Fix dpp_intro_mismatch to match implementation
This test case was assuming the Configurator would change the
netAccessKey curve every time based on the protocol keys, but that is
not the case anymore, so force that change here for a negative test.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2022-03-10 01:30:33 +02:00
Jouni Malinen
800ae647df tests: Check DPP3 support in the build for netAccessKey curve changes
These test cases need to be skipped if CONFIG_DPP3=y is not defined in
the build.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2022-03-09 21:26:28 +02:00
Jouni Malinen
77ae98511d tests: sigma_dut and DPP netAccessKey curve change
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2022-03-09 01:20:49 +02:00
Jouni Malinen
117dc4ea41 tests: DPP curve change for netAccessKey
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2022-03-09 01:07:59 +02:00
Jouni Malinen
1d4cd24d0b tests: sigma_dut and DPP Reconfig Auth Req error cases
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2022-03-08 00:06:00 +02:00
Jouni Malinen
fc78c13550 tests: sigma_dut and DPP PKEXv1 responder
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2022-03-07 21:38:25 +02:00
Jouni Malinen
c34b35b54e tests: WPA3 with SAE password from RADIUS
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2022-03-04 12:25:47 +02:00
Jouni Malinen
08cd7a75bf tests: HE AP and capability parsing
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2022-03-03 01:51:56 +02:00
Jouni Malinen
a201ab385e tests: Fetch all event messages in wpas_ctrl_many_networks
Do not leave a large number of network added/removed events remaining
for the following test case to handle. This removes some possible
failure test case sequences like the following one:
wpas_ctrl_many_networks dbus_ap_scan_2_ap_mode_scan

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2022-02-26 19:12:11 +02:00
Jouni Malinen
a038e6dea4 tests: wpa_supplicant AP mode and PSK/PTK lifetime in memory"
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2022-02-26 19:12:11 +02:00
Jouni Malinen
fa34e3255e tests: Make test cases more robust by clearing scan cache explicitly
This test cases can fail if previously executed tests leave older scan
results in cfg80211 scan table. Clear that scan table explicitly to
avoid such issues.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2022-02-26 19:12:11 +02:00
Jouni Malinen
7a8fff486f tests: Make OCV test cases more robust by clearing scan results on AP
This is needed to avoid pri/sec channel switching based on potential
scan results from the previous test cases.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2022-02-24 00:23:25 +02:00
Jouni Malinen
d5fba20c1e tests: Add a script for find a minimal failing test sequence
min-seq.py can be used to find a minimal test sequence that can be used
to reproduce test failures. This is meant for being able to process the
recently added "Failure sequence:" entries from parallel-vm.log to
reduce manual work needed to debug commonly failing test case sequences.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2022-02-24 00:23:25 +02:00
Jouni Malinen
010e7dddce tests: Clear sae_groups in sigma_dut_ap_ft_rsnxe_used_mismatch
This is needed to avoid test failures when a previous test case might
have restricted the set of allowed SAE groups.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2022-02-24 00:23:25 +02:00
Jouni Malinen
00163fd741 tests: Make rrm_beacon_req_frame_body_fragmentation more robust
Flush scan results to avoid unexpected behavior due to scan results
remaining available from previous test cases.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2022-02-22 00:05:56 +02:00
Jouni Malinen
b367366dd7 tests: Make WNM BSS TM tests more robust
Flush scan results to avoid unexpected behavior due to scan results
remaining available from previous test cases.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2022-02-22 00:04:15 +02:00
Jouni Malinen
aa2f595bf2 tests: Fix a test case name
The test case name ap_ft_pmf_over_ds was used for two different test
cases which resulted in only one of those being used. Fix this by using
unique test case names.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2022-02-21 18:34:42 +02:00
Jouni Malinen
e942c32e97 tests: Make FT-over-DS test cases more robust
Clear scan cache to avoid issues with old scan results from earlier test
cases. This caused issues like the following test case sequence failing:
rrm_beacon_req_active_ap_channels ap_ft_eap_dis_over_ds

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2022-02-21 18:26:02 +02:00
Jouni Malinen
d5fbbbbc4c tests: Make wpas_mesh_mode_scan more robust
Clear scan results to avoid issues with get_bss() finding an entry from
an earlier test case when checking for mesh information.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2022-02-18 16:47:29 +02:00
Jouni Malinen
d2e11b7dea tests: MACsec with GCM-AES-256
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2022-02-17 01:05:08 +02:00
Jouni Malinen
1e0af0cc7e tests: Make wpa2_ocv_ap_ht_mismatch more robust
Clear the scan cache on the AP before running this test since the HT40
operation on the 2.4 GHz band might get disallowed based on scan results
from earlier test cases. This was found with the following hwsim test
case sequence failing:
ap_acs_with_fallback_to_20 wpa2_ocv_ap_ht_mismatch

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2022-02-16 21:29:54 +02:00
Jouni Malinen
64008a1ee8 tests: Make SAE roaming test cases more reliable
Flush the scan table explicitly to avoid issues with the ROAM command if
the new AP is not found and an entry from a previous test case is used
instead. This was happening in a number of cases where a SAE test case
was run after sigma_dut_ap_cipher_gcmp_256 which used the second AP
instance and allowed that to show up in the scan results in the next
text case.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2022-02-16 19:57:49 +02:00
Jouni Malinen
2e166d9e5b tests: Write full failure sequences into parallel-vm.log
This can be helpful in discovering test case sequences that result in
failures frequently.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2022-02-15 20:54:24 +02:00
Jouni Malinen
346b490505 tests: DPP session clearing on failure during GAS request handling
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2022-02-15 16:41:25 +02:00
Jouni Malinen
db7f14c825 tests: Make FILS BSS result checks more robust
These can fail if the scan results from the previous test case remain,
e.g., when run immediately after scan_bss_limit.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2022-02-15 13:06:36 +02:00
Jouni Malinen
b81c568223 tests: Additional wpa_supplicant AP mode testing
Add a couple of more channel configuration cases and log the channel
parameters with more details in the test log.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2022-02-15 12:45:09 +02:00
Jouni Malinen
b9897f1f3c tests: Clear AP scan cache after primary BSS on channel 40
A number of test cases using 40 MHz or wider channels with the primary
channel 36 were failing when executed after dpp_chirp_ap_5g since that
test case was running an AP on the channel 40 and resulting in need to
swap the primary and the secondary channels in the following test case.
Fix this by clearing the AP scan cache explicitly for such cases.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2022-02-15 00:34:55 +02:00
Jouni Malinen
f5ce9111c5 tests: Make GAS/ANQP test cases more robust
Flush the scan cache for all test cases that used get_bss() to check for
particular ANQP information. This was already done for one such case
based on commit dd900637b2 ("tests: Make gas_anqp_extra_elements more
robust"), but other test cases need this as well.

This was showing with frequent errors in test cases sequences like this
one:
dfs_radar_no_ht gas_fragment_with_comeback_delay gas_unknown_adv_proto gas_anqp_venue_url

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2022-02-15 00:18:07 +02:00
Jouni Malinen
781720fb1a tests: Clear scan cache at the end of ap_wps_cancel
This is needed to avoid leaving behind a BSS entry with WPS enabled for
the next text case in some cases. In particular, this was causing issues
in the following sequence of test cases:
ap_wps_conf_chan14 ap_wps_cancel ap_wps_pin_request_file

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2022-02-15 00:02:34 +02:00
Jouni Malinen
f1e4b23086 tests: WPA2-PSK-FT and different OCV capability between APs
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2022-02-09 17:30:02 +02:00
Jouni Malinen
c4dc90c1c0 tests: Remove ignore_old_scan_res clearing from the test scripts
Now that wpa_supplicant does this internally as a part of the FLUSH
command, there is no need for the test scripts to try to clear the
parameter between test cases.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2022-02-04 21:29:52 +02:00
Jouni Malinen
f80d7757fa tests: Use a more reasonable age for a scan result in scan_parsing
This test case could fail in some sequences like "sigma_dut_sae
scan_parsing" due to the ignore_old_scan_res parameter accidentally
being left to 1 by the former test case and the simulated scan result
being older than the previous scan trigger. Reduce the age of that scan
entry to make this less likely to happen.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2022-02-04 21:24:19 +02:00
Jouni Malinen
3fb6b7fed6 tests: Increase the wait time of Configurator GAS timeout
dpp_gas_timeout could fail with an increased timeout for the
Configurator.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2022-02-04 00:23:19 +02:00
Jouni Malinen
8121cd3934 tests: Increase wait in dpp_qr_code_config_event_initiator_no_response
The DPP Enrollee might wait for up to 60 seconds for the configuration,
so use a longer timeout value to be able to cover this negative test
case where the Configurator never sends the response.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2022-02-04 00:23:19 +02:00
Jouni Malinen
263daa30b5 tests: DPP Configurator with config query
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2022-02-03 00:35:49 +02:00
Jouni Malinen
bf4002e251 tests: WPA2-PSK AP with PMF association comeback (using radio_disabled)
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2022-02-01 19:53:08 +02:00
Jouni Malinen
c0e6aa3450 tests: DPP/PKEXv2 over TCP while associated
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2022-02-01 19:53:08 +02:00
Jouni Malinen
a8c43b1822 tests: Use check_sae_capab() where possible
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2022-02-01 18:16:35 +02:00
Jouni Malinen
4feb46ddb4 tests: Fix CONFIG_DPP3=y dependency in couple of test cases
These could not pass without DPP3 support.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2022-01-31 18:16:29 +02:00