Commit Graph

4180 Commits (vlan_per_psk)

Author SHA1 Message Date
Jouni Malinen 9c47624fc8 tests: VENDOR command
Signed-off-by: Jouni Malinen <j@w1.fi>
3 years ago
Jouni Malinen 0a549776ce tests: VHT CSA with VHT80+80 getting enabled
Signed-off-by: Jouni Malinen <j@w1.fi>
3 years ago
Jouni Malinen 3c5ea9fd9f tests: VHT CSA with invalid parameters
Signed-off-by: Jouni Malinen <j@w1.fi>
3 years ago
Jouni Malinen 0922519091 tests: Additional GET_PMK coverage
Signed-off-by: Jouni Malinen <j@w1.fi>
3 years ago
Jouni Malinen f7835ac163 tests: IGTK and BIGTK replay protection
Signed-off-by: Jouni Malinen <j@w1.fi>
3 years ago
Jouni Malinen 5a7e806b69 tests: Invalid MGMT_TX_STATUS_PROCESS
Signed-off-by: Jouni Malinen <j@w1.fi>
3 years ago
Jouni Malinen f5439acf6a tests: RELOAD_WPA_PSK failure
Signed-off-by: Jouni Malinen <j@w1.fi>
3 years ago
Jouni Malinen b54410127d tests: hapd->tmp_eap_user clearing on interface deinit/reinit
Signed-off-by: Jouni Malinen <j@w1.fi>
3 years ago
Jouni Malinen 3e735adf0b tests: WNM time advertisement and interface restart
Signed-off-by: Jouni Malinen <j@w1.fi>
3 years ago
Jouni Malinen fa4cd46c37 tests: Roam command during a scan operation
Signed-off-by: Jouni Malinen <j@w1.fi>
3 years ago
Jouni Malinen 8d80aa3fca tests: Fix openssl_systemwide_policy cleanup
Need to close the WpaSupplicant instance on the extra radio before
returning from this test case since that interface is going to be
removed and WpaSupplicant.__del__() can time out on trying to detach the
monitor connection after that.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
3 years ago
Jouni Malinen 024fcb22ca tests: hostapd RELOAD with invalid configuration
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
3 years ago
Jouni Malinen ff6a305ced tests: OCV override in FT Reassociation Response
Signed-off-by: Jouni Malinen <j@w1.fi>
3 years ago
Jouni Malinen fdb8c40c7f tests: OCV override in FILS Association Response
Signed-off-by: Jouni Malinen <j@w1.fi>
3 years ago
Jouni Malinen ecc46f2900 tests: Move ERP/FILS capability checks to utils.py
Signed-off-by: Jouni Malinen <j@w1.fi>
3 years ago
Jouni Malinen 8884e33eef tests: WMM parameter update failing during beacon template update
Signed-off-by: Jouni Malinen <j@w1.fi>
3 years ago
Jouni Malinen 811d26705a tests: DPP config overrides in hostapd
Signed-off-by: Jouni Malinen <j@w1.fi>
3 years ago
Jouni Malinen e5ee60ade0 tests: hostapd and setband
Signed-off-by: Jouni Malinen <j@w1.fi>
3 years ago
Jouni Malinen 6abf7c0419 tests: wpa_deny_ptk0_rekey in hostapd GET_CONFIG
Signed-off-by: Jouni Malinen <j@w1.fi>
3 years ago
Jouni Malinen 0f51caa513 tests: hostapd GET_CONFIG entries for Multi-AP
Signed-off-by: Jouni Malinen <j@w1.fi>
3 years ago
Jouni Malinen 250cb99f4d tests: Additional coverage for hostapd GET_CONFIG key_mgmt values
Signed-off-by: Jouni Malinen <j@w1.fi>
3 years ago
Jouni Malinen 8c6723b7f3 tests: Invalid COLOC_INTF_REQ parameters
Signed-off-by: Jouni Malinen <j@w1.fi>
3 years ago
Jouni Malinen 73a3ef8c5d tests: WPS status "Timed-out" from hostapd
Signed-off-by: Jouni Malinen <j@w1.fi>
3 years ago
Jouni Malinen 35672faae5 tests: WPS PBC overlap indication from hostapd
Signed-off-by: Jouni Malinen <j@w1.fi>
3 years ago
Jouni Malinen e8e2d9ff6b tests: Additional coverage for WPS_AP_PIN error case
Signed-off-by: Jouni Malinen <j@w1.fi>
3 years ago
Jouni Malinen 38e700198e tests: Display unexpected stdout and stderr prints in parallel-vm.py
Make it more difficult to miss issues that were previously only printed
out in /tmp/hwsim-test-logs/*-parallel.log. This covers things like
memory leaks and test script failures or forgotten development time
prints to stdout.

Signed-off-by: Jouni Malinen <j@w1.fi>
3 years ago
Jouni Malinen 8ea3561c6c tests: Fix sigma_dut_ap_dpp_tcp_enrollee_init to stop hostapd
This test case was missing an explicit CAPI ap_reset_default and that
could result in hostapd being left running at the end of the test case.
This could result in issues with following test cases if they used a new
radio interface from HWSimRadio().

Signed-off-by: Jouni Malinen <j@w1.fi>
3 years ago
Jouni Malinen 468efe79a7 tests: Work around exception handling issue in wpas_config_file
Raising an exception while the wlan5 interface was remove (i.e., between
wpas.interface_remove() and .interface_add() calls) would result in the
cleanup code failing and generating yet another exception while the
first one was being processed. Work around this by re-adding the wlan5
interface back temporarily if the interface is not available for the
cleanup operations.

Signed-off-by: Jouni Malinen <j@w1.fi>
3 years ago
Jouni Malinen 90d3ee383f tests: RADIUS client device specified
Signed-off-by: Jouni Malinen <j@w1.fi>
3 years ago
Jouni Malinen 39fac5abd1 tests: Fix clean at the end of sigma_dut_client_privacy
These commands were being issues to incorrect wpa_supplicant instance
and were missing clearing of the MAC_RAND_SCAN parameter.

Signed-off-by: Jouni Malinen <j@w1.fi>
3 years ago
Jouni Malinen c210aed4b6 tests: Fix the cleanup at the end of scan_setband
The iteration of WpaSupplicant instances used incorrect variable and
ended up cleaning up only the wlan5 interface. This left unexpected
setband parameter for wlan0/wlan1/wlan2 which could result in
consecutive test cases failing due to scan not finding the expected
BSSs.

Signed-off-by: Jouni Malinen <j@w1.fi>
3 years ago
Jouni Malinen fcdf5d93ea tests: EAP-TTLS and PEAP with TLS 1.3
Signed-off-by: Jouni Malinen <j@w1.fi>
3 years ago
Jouni Malinen 9acf8da223 tests: Use a longer timeout for connection in sigma_dut DPP test cases
It was possible for these test cases to fail if the first scan iteration
did not find the AP since the 10 second timeout was small enough to
terminate the second attempt before fetching the scan results. Increase
this timeout to allow at least two full scan iterations to be completed
before declaring failure.

Signed-off-by: Jouni Malinen <j@w1.fi>
3 years ago
Jouni Malinen 6ef749ce15 tests: Clear scan results at the end of scan-ssid-list tests
These test cases use hidden SSIDs and left behind a BSS entry with no
SSID. That can cause issues for consecutive test cases where the BSSID
can be used as the key for finding a BSS entry. That could end up
picking the old hidden SSID BSS instead of the one that was meant to be
used in the test case.

Flush the scan cache at the end of the scan-ssid-list test cases to
reduce invalid test failures for the consecutive test cases.

Signed-off-by: Jouni Malinen <j@w1.fi>
3 years ago
Jouni Malinen 751ce086aa tests: Make PASN tests more robust
The PASN_START command can fail if there is an old BSS entry for the
same BSSID from an earlier test case. Try to avoid this by flushing the
scan results before running these test cases.

Signed-off-by: Jouni Malinen <j@w1.fi>
3 years ago
Andrei Otcheretianski fb83e4fbc3 tests: Replace deprecated thread isAlive function
The isAlive() function is deprecated in newer versions of Python
so replace it with the is_alive() instead.

Signed-off-by: Oren Givon <oren.givon@intel.com>
Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
3 years ago
Jouni Malinen 3811645e99 tests: P2P device discovery with invalid group client info
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
3 years ago
Jouni Malinen 7eb222aa89 tests: EXT PW file backend
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
3 years ago
Patrick Steinhardt e9f449ba59 wpa_supplicant: Move wpa_config_get_line() into utils
The function wpa_config_get_line() is used by the wpa_supplicant config
file parser to retrieve the next non-comment non-blank line. We'll need
the same kind of functionality to implement the file-based external
password backend, so as a preparatory step this commit extracts the
function into its own standalone file in the utils package.

No functional changes are expected from this commit.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
3 years ago
Jouni Malinen fd78ab8270 tests: ACS for HE 40 MHz channel in 2.4 GHz
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
3 years ago
Jouni Malinen 11736a1a78 tests: Make ap_sae_tdls more robust
Need to clear sae_groups parameter before using SAE in this test case to
avoid issues if previous test cases have left a specific group
configured.

Signed-off-by: Jouni Malinen <j@w1.fi>
3 years ago
Jouni Malinen 2c98cbecb4 tests: Make multi_ap_backhaul_roam_with_bridge more robust
Clear the scan cache and make sure the new AP gets discovered before
issuing the ROAM command.

Signed-off-by: Jouni Malinen <j@w1.fi>
3 years ago
Jouni Malinen 7a7e45ae68 tests: FILS Discovery frame generation
Signed-off-by: Jouni Malinen <j@w1.fi>
3 years ago
Jouni Malinen a000710835 tests: Multi-AP backhaul BSS reassociation to another BSS with bridge
Signed-off-by: Jouni Malinen <j@w1.fi>
3 years ago
Jouni Malinen ffcca901e7 tests: DPP Authentication Request destination address in chirp case
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
3 years ago
Jouni Malinen cc96f45f4f tests: New HE configuration parameters
Signed-off-by: Jouni Malinen <j@w1.fi>
3 years ago
Jouni Malinen bd8b170302 EAP-AKA: Check that ID message storing succeeds
This could fail in theory if running out of memory, so better check for
this explicitly instead of allowing the exchange to continue and fail
later due to checkcode mismatch.

Signed-off-by: Jouni Malinen <j@w1.fi>
3 years ago
Jouni Malinen 11cd1ffc71 tests: Fix fuzzing test build after file rename
Signed-off-by: Jouni Malinen <j@w1.fi>
3 years ago
Jouni Malinen 626fc0dcd0 Rename wpa_blacklist to wpa_bssid_ignore
This is more accurate name for this functionality of temporarily
ignoring BSSIDs.

Signed-off-by: Jouni Malinen <j@w1.fi>
3 years ago
Jouni Malinen 7a1f1d8d77 tests: Use the new BSSID_IGNORE name for the command
Signed-off-by: Jouni Malinen <j@w1.fi>
3 years ago
Jouni Malinen 125f0748e4 tests: Use new names for network profile BSSID ignore/accept parameters
Signed-off-by: Jouni Malinen <j@w1.fi>
3 years ago
Janusz Dziedzic fce6fb0ec2 tests: DFS pre CAC tests
Add test cases that check preCAC, which is available for EU regulatory
domain. Also confirm that preCAC is not used for US.

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@gmail.com>
3 years ago
Jouni Malinen 045a24273e tests: MAC ACL accept list changes
Signed-off-by: Jouni Malinen <j@w1.fi>
3 years ago
Janusz Dziedzic 0f8994b11d tests: Extend Multi AP tests
Add option to:
 - add a new AP on the same phy that the backhaul-sta uses
 - run CSA from the parent

Adding a new AP (backhaul/fronthaul) on the same phy we have for
backhaul-sta is closer to the real repeater implementation.

Add a test case for that and run CSA.

This is a common problem when we have on the same phy:
 - connected backhaul STA
 - we started fronthaul/backhaul AP
 - we receive (from parent) CSA on the STA interface

This is multi_ap_wps_shared_apdev_csa test case, which fails today with
both mac80211_hwsim and ath9k. To avoid always failing test cases,
ignore this failure for now. Full validation can be enabled once the
issue behind this is fixed.

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@gmail.com>
3 years ago
Janusz Dziedzic e663221727 tests: Pass ful params_backhaul in Multi AP test cases
Pass the backhaul parameters as a parameter. This is in preparation for
channel switch test for Multi AP.

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@gmail.com>
3 years ago
Raphaël Mélotte 3a3ea68a36 tests: Add WPS test with dynamic update
This test first configure hostapd with an initial SSID
('test-wpa2-psk-start'). Then a new SSID is configured
('test-wpa2-psk-new') using SET and RELOAD. Next, a station is
associated using WPS, and the test verifies that the new SSID was served
to the station.

Signed-off-by: Raphaël Mélotte <raphael.melotte@mind.be>
3 years ago
Andrei Otcheretianski a033e886b2 tests: Fix regdom cleanup in some p2p_channel tests
cfg80211 may ignore user hints while there are active COUNTRY_IE hints,
thus at some timings it may ignore the country setting back to world
domain. Fix it by making sure the country is set only after all the
interfaces are stopped. In addition, call a more robust
clear_regdom_dev() function.

Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
3 years ago
Raphaël Mélotte 9ec28b657e tests: Add ap_notify_mgmt_frames
Test that if notify_mgmt_frames is enabled and a station connects we do
get AP-MGMT-FRAME-RECEIVED, and that it includes an Authentication
frame.

Also test that if notify_mgmt_frames is disabled, no Management frame is
sent on ctrl_iface when a station connects.

Signed-off-by: Raphaël Mélotte <raphael.melotte@mind.be>
3 years ago
Andrei Otcheretianski ba7542f62d tests: Add mixed SAE/WPA-PSK AP test
Verify WPA-PSK/TKIP connection on SAE configured AP.

Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
3 years ago
Andrei Otcheretianski 5acc20e8f4 tests: Fix sporadic failures in p2p_channel_avoid3
The P2P group may be originally formed on UNII-3, so disabling UNII-1
and UNII-2 will not result in a channel switch failing the test.
Fix this by setting 44 as a preferred channel.

Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
3 years ago
Andrei Otcheretianski 7546a70fbb tests: Fix ap_ft_r0_key_expiration test
The test configures ft_r0_key_lifetime parameter, however ft_params
already contain the r0_key_lifetime. Since both options are accepted by
hostapd and set the same field, one of them gets overwritten.
As the dictionary enumeration order is not guaranteed in python, the
test may sporadically fail.
Fix that by explicitely removing the unneeded parameter.

Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
3 years ago
Jouni Malinen 32cb91549e tests: he_tkip to match implementation change
HE is now getting disabled just like HT and VHT when only TKIP is
enabled.

Signed-off-by: Jouni Malinen <j@w1.fi>
3 years ago
Ilan Peer b07b9387d4 tests: Add PASN tests with FT key derivation
Signed-off-by: Ilan Peer <ilan.peer@intel.com>
3 years ago
Ilan Peer 09a9e9939c tests: Add PASN with FILS tests
Signed-off-by: Ilan Peer <ilan.peer@intel.com>
3 years ago
Ilan Peer 8a4a52293a tests: Add PASN tests with SAE
Signed-off-by: Ilan Peer <ilan.peer@intel.com>
3 years ago
Ilan Peer cd2a0a84ce tests: Add PASN test coverage
Signed-off-by: Ilan Peer <ilan.peer@intel.com>
3 years ago
Jouni Malinen 995ee4c94b tests: DPP Responder behavior on missing Auth Confirm
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
3 years ago
Jouni Malinen f34493f2a8 tests: Fix rfkill testing with updated kernel
Kernel commit 14486c82612a ("rfkill: add a reason to the HW rfkill
state") added an extra byte to the end of the rfkill events and that
confused the read loop here since python tried to buffer the results
from multiple read() calls into the local buffer that then delivered the
extra octets in consecutive events. Fix this by disabling buffering for
these reads.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
3 years ago
Andrei Otcheretianski 03125c9ddc tests: Fix ap_ft_eap_pull_wildcard_multi_bss
Python enumerates dictionaries in an arbitrary order, thus the resulting
configuration file will have the parameters shuffled randomly. This may
cause the test to fail when, for example, auth_server_addr is placed
after auth_server_port. Fix this by enforcing some of the fields to be
placed before the others.

Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
3 years ago
Janusz Dziedzic cb9cc66b35 tests: remote: Allow shuffle
With -S option we will run tests in random order.

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@gmail.com>
3 years ago
Janusz Dziedzic 3c6468a7f3 tests: remotehost: Add missed select import
Signed-off-by: Janusz Dziedzic <janusz.dziedzic@gmail.com>
3 years ago
Janusz Dziedzic b02a56bedb tests: remotehost: Remove wait_execute_complete
Today we have thread_wait().

Fixes: 11b3af3dad ("tests: remotehost: Use correct name")
Signed-off-by: Janusz Dziedzic <janusz.dziedzic@gmail.com>
3 years ago
Jouni Malinen 694722516e tests: FT reassociation SAE-PSK-SAE
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
3 years ago
Jouni Malinen 581dfcc413 tests: Fix p2p fuzzer build after API change
Commit 7b121af26a ("P2P: Delay P2P scan when an external scan is in
progress") added a new argument to p2p_scan_res_handled(), but did not
update this test tool. Fix this by using hardcoded value 0 for the new
delay argument.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
3 years ago
Jouni Malinen b3f88b15fb tests: Update ap_open_unexpected_assoc_event to match implementation
Now that wpa_supplicant ignores the unexpected association event in
disconnected-not-trying-to-connect state, this test cases needs to be
modified to avoid incorrect failures.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
3 years ago
Jouni Malinen 9a411882bd tests: setband with band combination
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
3 years ago
Jouni Malinen e4c815a77a tests: Update scan_fail to match implementation change
The function name for adding frequency lists changed, so this test case
needs a matching change to avoid failures.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
3 years ago
Johannes Berg d215f42538 tests: HE: Add a test for wifi generation on 2.4 GHz
This was broken in the kernel in mac80211 for a while, until commit
780a8c9efc65 ("mac80211: do not disable HE if HT is missing on 2.4 GHz")
fixed it.

Add a test for wifi generation on 2.4 GHz in addition to the 5 GHz one.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
4 years ago
Janusz Dziedzic 3fd22b6ef4 tests: remotehost: Introduce wait_event()
Allow to run local/remote process like:
 - ubus listen
 - logread -f
 - tail -f
 - wpa_cli
 - hostapd_cli
And next wait for specific event(s).

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@gmail.com>
4 years ago
Janusz Dziedzic 11b3af3dad tests: remotehost: Use correct name
While we start thread use:
 - thread_run
 - therad_stop
 - thread_wait

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@gmail.com>
4 years ago
Andrei Otcheretianski eac2b65635 tests: Skip dpp_enterprise_tcp tests without OpenSSL
Skip these tests if OpenSSL wasn't loaded, instead of crashing.

Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
4 years ago
Jouni Malinen 348447c486 tests: Determine number of parallel make jobs automatically
Use nproc (if available) instead of the hardcoded 8 parallel make jobs.

Signed-off-by: Jouni Malinen <j@w1.fi>
4 years ago
Jouni Malinen 0dcfdd5e47 tests: Skip test cases properly if tshark is not available
Instead of trying to process empty results, mark the test case as
skipped if tshark is not available.

Signed-off-by: Jouni Malinen <j@w1.fi>
4 years ago
Thomas Pedersen 95cff14c6f tests: Fix p2p_autogo_pref_chan_not_in_regulatory
Sweden now allows channel 149 in the updated wireless-regdb. Choose
Japan for the negative test instead.

Signed-off-by: Thomas Pedersen <thomas@adapt-ip.com>
4 years ago
Jouni Malinen 67d5328b3c tests: DFS and no available channel after radar detection
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
4 years ago
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>
4 years ago
Jouni Malinen 1759a8e3f3 tests: WPA2-PSK and supplicant receiving unexpected EAPOL-Key frames
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
4 years ago
Jouni Malinen 0ea870324e tests: Use helper functions for PSK ext EAPOL-Key processing
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
4 years ago
Jouni Malinen ff7cae3444 tests: ANQP protection indication
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
4 years ago
Jouni Malinen 5027f34a33 tests: Fix test description strings for couple of SAE cases
Remove the extraneous closing parenthesis.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
4 years ago
Jouni Malinen f14df9b56a tests: Prepare for control interface message change
Update ap_wpa2_psk_supp_proto_too_long_gtk_in_group_msg to accept
upcoming change in the parsing validation step that catches the issue.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
4 years ago
Jouni Malinen 3b89dbaa7d tests: TDLS with SAE
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
4 years ago
Jouni Malinen 2d8a7cf3f5 tests: Update dpp_controller_rx_errors to use the assigned TCP port
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
4 years ago
Jouni Malinen ac835ea092 tests: SAE status code handling
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
4 years ago
Jouni Malinen 0747432efd Fix spelling of "unexpected" in messages
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
4 years ago
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>
4 years ago
Jouni Malinen a964cb65a1 tests: Silence compiler warnings from test-base64
Use typecasting to match the base64_{encode,decode}() function prototype
for signed/unsigned char buffer.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
4 years ago
Jouni Malinen 05195189f1 tests: Build test-https and test-https_server as part of ALL
Even though these are not part of run-tests, it is simpler to just build
them like all other tests/test-* tools.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
4 years ago
Jouni Malinen b746f28c00 tests: Remove unnecessary libraries from tests/test-*.c build
These libraries are not needed anymore with the remaining tests/test-*.c
tools.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
4 years ago
Jouni Malinen 0167a2d165 tests: Remove obsolete ASN.1 parser/fuzzer
tests/fuzzing/asn1 replaced this more than a year ago, so get rid of the
now obsolete version.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
4 years ago
Jouni Malinen 0db20eacaa tests: Remove obsolete TLS fuzzer
tests/fuzzing/tls-{client,server} replaced this more than a year ago, so
get rid of the now obsolete version.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
4 years ago
Jouni Malinen 8a43fcd18c tests: Remove obsolete EAPOL-Key fuzzer
tests/fuzzing/eapol-key-{auth,supp} replaced this more than a year ago,
so get rid of the now obsolete version.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
4 years ago
Jouni Malinen 95cbbf44f0 tests: Remove obsolete json fuzzer
tests/fuzzing/json replaced this more than a year ago, so get rid
of the now obsolete version.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
4 years ago
Jouni Malinen b1e91a53e4 tests: Remove obsolete ap-mgmt-fuzzer
tests/fuzzing/ap-mgmt replaced this more than a year ago, so get rid
of the now obsolete version.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
4 years ago
Jouni Malinen e974fad9c5 tests: Remove obsolete eapol-fuzzer
tests/fuzzing/eapol-supp replaced this more than a year ago, so get rid
of the now obsolete version.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
4 years ago
Jouni Malinen 0be7967692 tests: Remove obsolete wnm-fuzzer
tests/fuzzing/wnm replaced this more than a year ago, so get rid of the
now obsolete version.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
4 years ago
Jouni Malinen ceab836a99 tests: Remove obsolete p2p-fuzzer
tests/fuzzing/p2p replaced this more than a year ago, so get rid of the
now obsolete version.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
4 years ago
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>
4 years ago
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>
4 years ago
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>
4 years ago
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>
4 years ago
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>
4 years ago
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>
4 years ago
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>
4 years ago
Johannes Berg 5c7a048e45 tests: build.sh: Avoid copying .config if identical
If the .config file is already identical, avoid copying it even if -f
was specified; this improves build time if nothing has changed.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
4 years ago
Johannes Berg e7c11ad249 tests: build.sh: Remove 'make clean' steps
Since the build artifacts are now landing in distinct directories, we
don't need to 'make clean' and save some rebuild time.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
4 years ago
Johannes Berg 87098d3324 build: Put archive files into build/ folder too
This is something I hadn't previously done, but there are
cases where it's needed, e.g., building 'wlantest' and then
one of the tests/fuzzing/*/ projects, they use a different
configuration (fuzzing vs. not fuzzing).

Perhaps more importantly, this gets rid of the last thing
that was dumped into the source directories, apart from
the binaries themselves.

Note that due to the use of thin archives, this required
building with absolute paths.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
4 years ago
Johannes Berg 00b5e99b65 build: Use the new build system for fuzz tests
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
4 years ago
Brian Norris 07aac648a1 tests: dbus: Add test for RemoveAllNetworks while connected
This likely passes today (at least without ASAN), but without the next
commit, it trips up a use-after-free bug, which ASAN can catch.

So consider this a regression test.

Signed-off-by: Brian Norris <briannorris@chromium.org>
4 years ago
Brian Norris 4b0bf0ec6e tests: run-tests: Do not use sudo if already root
Among other things, sudo can disrupt environment variables that a caller
provides.

Signed-off-by: Brian Norris <briannorris@chromium.org>
4 years ago
Brian Norris 4dbba548ae tests: Skip busctl tests when not available
Signed-off-by: Brian Norris <briannorris@chromium.org>
4 years ago
Jouni Malinen 48aebcc31b tests: D-Bus Roam
Signed-off-by: Jouni Malinen <j@w1.fi>
4 years ago
Jouni Malinen 5653301409 tests: Prepare ap_blacklist_all for implementation change
The blacklist design will be modified in the following commits and that
would result in this validation step based on the older implementation
starting to fail. Remove this check to avoid such testing failures.

Signed-off-by: Jouni Malinen <j@w1.fi>
4 years ago
Johannes Berg dcc5288e5b gitignore: Add various things
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
4 years ago
Johannes Berg b3313939b7 tests: Use new build system for the tests
I had previously kept that building in the sources, but
we can also change that.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
4 years ago
Johannes Berg e150641f78 tests: Rewrite .gitignore file
The file was already outdated again, so rewrite it to ignore
anything but c, h and sh files that start with "test-".

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
4 years ago
Johannes Berg 722138cd25 build: Put object files into build/ folder
Instead of building in the source tree, put most object
files into the build/ folder at the root, and put each
thing that's being built into a separate folder.

This then allows us to build hostapd and wpa_supplicant
(or other combinations) without "make clean" inbetween.

For the tests keep the objects in place for now (and to
do that, add the build rule) so that we don't have to
rewrite all of that with $(call BUILDOBJS,...) which is
just noise there.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
4 years ago
Johannes Berg 0430bc8267 build: Add a common-clean target
Clean up in a more common fashion as well, initially for ../src/.

Also add $(Q) to the clean target in src/

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
4 years ago
Johannes Berg a41a29192e build: Pull common fragments into a build.rules file
Some things are used by most of the binaries, pull them
into a common rule fragment that we can use properly.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
4 years ago
Jouni Malinen fb0c693d5f tests: bgscan parameter update
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
4 years ago
Jouni Malinen b2a1424659 tests: Empty network profile parameters will be valid
Remove this part of the dbus_network test case since it would be causing
failures after wpa_supplicant is modified to accept empty strings
through D-Bus.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
4 years ago
Janusz Dziedzic 48e4680dae tests: remote: Add run_monitor test case
This is useful to run monitor quickly:
./run-tests.py -t run_monitor -m mon:36,20,36,0:1,20,1,0

In such example we will get one PCAP for 36/20 and 1/20.
After execution, PCAP file is in the log directory, e.g.:
./logs/2019_11_11_13_36_24/run_monitor_mon_wlp3s0_wlp5s0.pcap

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@gmail.com>
4 years ago
Janusz Dziedzic c203897a88 tests: remote: Allow passing of parameters with monitor interface
This is mainly for standalone monitor in case we know and would like to
setup specific monitor configuration.

-m monitor:<chan>,<bw>, <cf1>, <cf2>:...

For example:
-m monitor:1,40,3,0
-m e4300:1,40,3,0:11,40,9,0

This also supports monitor with multiple interfaces (one pcap).

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@gmail.com>
4 years ago
Janusz Dziedzic 8456b9e7db tests: remote: Allow passing of parameters with devname
Allow parameters to be passed together with the device name. For
example, -m mon1:1,20,1,0

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@gmail.com>
4 years ago
Janusz Dziedzic 777afa9f07 tests: remote: Unblock rfkill on monitor
Unblock wifi rfkill before setup/run monitor.

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@gmail.com>
4 years ago
Janusz Dziedzic 925dea791a tests: remote: Stop wpa_supplicant/hostapd using pidfile
Instead of killall, use pidfile.

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@gmail.com>
4 years ago
Janusz Dziedzic adf6cfb0ab tests: remote: monitor use execute_stop()
Stop the single thread instead of killing all monitor apps.

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@gmail.com>
4 years ago
Janusz Dziedzic 14d28a655a tests: remotehost add execute_stop()
Before we have to kill an application we start in the thread - in most
cases using killall and sometimes kill other applicantions, e.g., tcpdump,
iper, iperf3, tshark.

With this patch we are able to stop/kill a single application/thread
instead, based on the pid file.

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@gmail.com>
4 years ago
Janusz Dziedzic fed855d5dd tests: remote host stderr workaround
In case we are using ssh MUX (which speed up a lot test execution) with
remotehost we could hit cases where ssh will hang up. This depends on
different ssh versions and remotehost implementation.

stderr as a tmpfile fixes this problem.

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@gmail.com>
4 years ago
Janusz Dziedzic ac6595f281 tests: remote: Sort tests correctly
Problem appeared after introducing python3 support.

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@gmail.com>
4 years ago
Jouni Malinen e7b27637a5 tests: P2P with 6 GHz disabled
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
4 years ago
Jouni Malinen fd9fe8bc12 tests: OCV and missing PMF or OCI
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
4 years ago
Jouni Malinen fe27c464fd tests: DPP-CHIRP-RX reception
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
4 years ago
Jouni Malinen d049aeb0c6 tests: DPP with hostapd as configurator requiring fragmentation
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
4 years ago
Jouni Malinen de250a1984 tests: WPA2-PSK AP with PMF association comeback (WPS)
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
4 years ago
Jouni Malinen ce637df76c tests: P2P autonomous GO and interface being removed
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
4 years ago
Jouni Malinen 440a5e235b tests: DPP PFS fallback with SAE enabled
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
4 years ago
Jouni Malinen db599dbe99 tests: SAE-PK with invalid password on AP
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
4 years ago
Jouni Malinen 0f84a56219 tests: More explicit TLS version enabling in version tests
This is needed to allow the test cases to work on systems using
secpolicy=2 default (e.g., Ubuntu 20.04).

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
4 years ago
Jouni Malinen 255e29fcae tests: DPP Controller in hostapd
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
4 years ago