Commit graph

3323 commits

Author SHA1 Message Date
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 1c48c9bcf9 tests: Decode Popen() output for python3
Need to do this to avoid issues with following operations that assume
the output to be a str object.

Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
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 d5e6ffd661 tests: Decode subprocess.check_output() return value 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 1cfaecf70e tests: rfkill with python3 compatible version
Update rfkill helpers to not depend on python2 implicit conversions.

Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
2019-02-04 12:26:33 +02:00
Masashi Honma a3e00682ab tests: nl80211 attr with python3 compatible version
Update nl80211 attribute building helpers to not depend on
python2 implicit conversions.

Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
2019-02-04 12:26:33 +02:00
Masashi Honma e285418bed tests: HWSimController class with python3 compatible version
Update class HWSimController and netlink helpers to not depend on
python2 implicit conversions.

Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
2019-02-04 12:26:33 +02:00
Masashi Honma f94df3c0b0 tests: Explicitly encode str to bytes when needed for python3
Avoid implicit conversion errors when constructing bytes objects or
passing a str object to a function that needs a bytes object.

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 a444a6d262 tests: Fix failure for WPA-EAP-SUITE-B-192 key_mgmt
The wpas_config_file_key_mgmt fails with this error if wpa_supplicant is
built without CONFIG_SUITEB192=y:

Exception: SET_NETWORK failed
Exception: SET_NETWORK failed

Skip the WPA-EAP-SUITE-B-192 case if it is not supported in
wpa_supplicant so that the rest of the key_mgmt test coverage is
included.

Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
2019-02-04 12:26:33 +02:00
Masashi Honma cc02ce96cf tests: Explicit str/bytes conversion for socket operations 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
Jouni Malinen 6395b9eb3e tests: Read binary file in add_log_file() for python3
python3 requires sqlite3.Binary() input to be bytes instead of str, so
open the files for binary mode reading.

Signed-off-by: Jouni Malinen <j@w1.fi>
2019-02-04 12:26:33 +02:00
Jouni Malinen 2a79a8ce14 tests: Convert tshark output to string object for python3
Signed-off-by: Jouni Malinen <j@w1.fi>
2019-02-04 12:26:33 +02:00
Masashi Honma 7ab74770e7 tests: Convert binascii.hexlify() output to a string object for python3
This is needed in cases the hexlify() output is used to concatenate with
a string or used in string comparisons.

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
Jouni Malinen 45b0b88f80 tests: Decode command execution output to a str for python3
Need to convert from bytes to str to allow the following string
operations to work with python3.

Signed-off-by: Jouni Malinen <j@w1.fi>
2019-02-02 12:51:13 +02:00
Jouni Malinen 58be42b264 tests: Remove trailing semicolons from python code
Signed-off-by: Jouni Malinen <j@w1.fi>
2019-02-02 12:10:53 +02:00
Masashi Honma 9c06eda01c tests: Use python3 compatible libraries
This patch is made by using 2to3 command with some modifications.

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

Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
2019-02-02 12:03:04 +02:00
Jouni Malinen 2974633d0c tests: Remove unused import statements
These were not used at all and caused unnecessary operations and in some
cases, compatibility issues with python3.

Signed-off-by: Jouni Malinen <j@w1.fi>
2019-02-02 11:35:13 +02:00
Masashi Honma bc664dfc09 tests: python3 requires a raw string due to the backslash
Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
2019-02-02 11:35:05 +02:00
Jouni Malinen b198d281b0 tests: Enable ERP testing with PEAP
Signed-off-by: Jouni Malinen <j@w1.fi>
2019-02-02 00:06:04 +02:00
Johannes Berg a2674fd902 tests: wpasupplicant: Refactor code duplication in wait_global_event()
This code is identical to the wait_event() code, except for the
mon/global_mon instance. Create a _wait_event() function that
encapsulates this, and use it for both.

While at it, fix the bug in wait_global_event() where in the case
of not having a global_mon it always returns None.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2019-02-01 23:02:43 +02:00
Johannes Berg 8bdefe511c tests: vm-run: Create a symlink to the latest logs
This is useful when running a test multiple times, looking at
log output etc. to not have to pick out the right directory
each and every time.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2019-02-01 23:00:42 +02:00
Jouni Malinen 0c1e29fd30 tests: WNM-Sleep Mode Request bounds checking for empty contents
The wnm_sleep_mode_proto test case was already covering number of
invalid WNM-Sleep Mode Request frame cases, but it was missing the
shortest possible case with a missing Dialog Token field. Add that as a
regression test case for bounds checking in
ieee802_11_rx_wnmsleep_req().

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2019-01-28 15:05:09 +02:00
Jouni Malinen a18d58f47c tests: EAP-TLS and server reloading CRL from ca_cert
Signed-off-by: Jouni Malinen <j@w1.fi>
2019-01-27 18:48:16 +02:00
Jouni Malinen 0eb34f8f28 tests: WPA2-PSK AP with PSK from a file (keyid and reload)
Signed-off-by: Jouni Malinen <j@w1.fi>
2019-01-26 17:52:04 +02:00
Masashi Honma 1699309378 tests: Modify pmksa_cache test sets for python3
Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
2019-01-26 13:15:40 +02:00
Masashi Honma 26b91346b9 tests: Modify ocv test sets for python3
Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
2019-01-26 13:15:32 +02:00
Masashi Honma 255f3846a9 tests: ap_eap test requires more memory in VM
Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
2019-01-26 13:05:44 +02:00
Masashi Honma 26b0c29042 tests: Python3 does not allow mixed indentation
Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
2019-01-26 13:04:38 +02:00
Masashi Honma e6b283f758 tests: Use int instead of long for python3 compatibility
This patch is made by using 2to3 command.

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

Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
2019-01-26 13:02:50 +02:00
Masashi Honma e1bb41bfde tests: Use python3 compatible raise statement
This patch is made by using 2to3 command.

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

Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
2019-01-26 13:01:33 +02:00
Masashi Honma 8c851c2e36 tests: Use python3 compatible function attribute
This patch is made by using 2to3 command.

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

Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
2019-01-26 13:00:03 +02:00
Masashi Honma 330f2dd6bb tests: Use python3 compatible range operation
This patch is made by using 2to3 command.

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

Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
2019-01-26 12:56:02 +02:00
Masashi Honma 35d8c2545e tests: Use python3 compatible dict operation
This patch is made by using 2to3 command.

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

Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
2019-01-26 12:53:05 +02:00
Masashi Honma 89896c0008 tests: Use python3 compatible print statement
This patch is made by using 2to3 command.

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

Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
2019-01-26 12:37:25 +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 6de2a80940 tests: SAE and password identifier (exclusively)
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2019-01-24 00:20:49 +02:00
Jouni Malinen ad171ccd82 tests: Update README to refer to parallel-vm.py
parallel-vm.sh was removed earlier.

Signed-off-by: Jouni Malinen <j@w1.fi>
2019-01-22 13:27:31 +02:00
Jouni Malinen 3cd0adea26 tests: wpa_supplicant config parsing and storing for new variables
Signed-off-by: Jouni Malinen <j@w1.fi>
2019-01-12 19:21:45 +02:00
Jouni Malinen 9b8e1f9044 tests: P2P group formation with random interface addresses
Signed-off-by: Jouni Malinen <j@w1.fi>
2019-01-12 19:18:02 +02:00
Arnout Vandecappelle (Essensium/Mind) 222ff97bc3 tests: start.sh: fix logs/current symlink creation
Since 3bdc651a62, start.sh creates the logs/current symlink even if
LOGDIR was set in the environment, as is the case when using run-all.sh.
However, run-all.sh and start.sh use a separate 'date' invocation so the
resulting string may be different. Usually it is the same because the
two invocations immediately follow each other, *except* if run-all.sh
also does a build. In addition, if the user sets LOGDIR to something
else, the symlink is completely bogus.

Fix this by not relying on the 'date' invocation for creating the
symlink. Instead, use the basename of LOGDIR. To keep things consistent
with current behavior, only create the symlink if LOGDIR points to a
subdirectory of DIR/logs.

The following use cases now work reliably:
* run-all.sh with or without the -B option;
* manually calling start.sh followed by run-tests.py without setting
  LOGDIR.
* manually calling start.sh with LOGDIR set to a subdirectory of logs
  and calling run-tests.py without --logdir option (which makes it
  default to logs/current).
* run-all.sh with LOGDIR set to a subdirectory of logs.

Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
2019-01-12 17:39:59 +02:00
Jouni Malinen cbf25808b9 tests: Build with various LibreSSL and OpenSSL versions
Signed-off-by: Jouni Malinen <j@w1.fi>
2019-01-12 17:32:15 +02:00
Jouni Malinen 78a9ba72d0 tests: DFS CAC interrupted and restarted
Signed-off-by: Jouni Malinen <j@w1.fi>
2019-01-08 01:12:02 +02:00
Jouni Malinen 72d909e749 tests: Supported operating classes with constraints
Signed-off-by: Jouni Malinen <j@w1.fi>
2019-01-08 00:20:10 +02:00
Jouni Malinen 08e6721e87 tests: Remove MIB counter check from radius_auth_unreachable2
This is in preparation for an implementation change that results in this
unreachable server case not incrementing radiusAuthClientAccessRequests.

Signed-off-by: Jouni Malinen <j@w1.fi>
2019-01-07 23:38:18 +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
Jouni Malinen 06809f618d tests: WPA2-PSK+FT AP and workaround for incorrect STA behavior
Signed-off-by: Jouni Malinen <j@w1.fi>
2019-01-06 21:20:34 +02:00
Jouni Malinen 2e71d0415b tests: disable_sgi with VHT
Signed-off-by: Jouni Malinen <j@w1.fi>
2019-01-06 20:59:36 +02:00
Jouni Malinen 9aac73121b tests: More workarounds for cfg80211 regulatory state clearing (ap_open)
Add even more workarounds for cfg80211 regulatory state clearing since
these DFS test cases seem to be the most likely ones to fail due to
country=98 issues.

Signed-off-by: Jouni Malinen <j@w1.fi>
2019-01-06 13:21:19 +02:00
Jouni Malinen df71e16021 tests: More workarounds for cfg80211 regulatory state clearing (DFS)
Add even more workarounds for cfg80211 regulatory state clearing since
these DFS test cases seem to be the most likely ones to fail due to
country=98 issues.

Signed-off-by: Jouni Malinen <j@w1.fi>
2019-01-06 13:16:17 +02:00
Jouni Malinen 1185294944 tests: ACS for 160 MHz channel
Signed-off-by: Jouni Malinen <j@w1.fi>
2019-01-06 01:45:26 +02:00
Jouni Malinen 24451276a1 tests: More workarounds for cfg80211 regulatory state clearing (WNM)
Add even more workarounds for cfg80211 regulatory state clearing since
these WNM test cases seem to be the most likely ones to fail due to
country=98 issues.

Signed-off-by: Jouni Malinen <j@w1.fi>
2019-01-05 22:06:03 +02:00
Jouni Malinen 67e34a284a tests: OpenSSL systemwide policy and overrides
Signed-off-by: Jouni Malinen <j@w1.fi>
2019-01-05 17:14:26 +02:00
Jouni Malinen cc0a04ac86 tests: Split mbo_supp_oper_classes into multiple test cases
In addition, add even more workarounds for cfg80211 regulatory state
clearing since this test case seems to be the most likely one to fail
due to country=98 issues.

Signed-off-by: Jouni Malinen <j@w1.fi>
2019-01-05 00:21:41 +02:00
Jouni Malinen 02a4ac0feb tests: WPA2-PSK-FT AP over DS and separate hostapd process
This is a regression test case for FT-over-DS that got broken on
mac80211-based drivers when the extra key reinstallation checks were
added.

Signed-off-by: Jouni Malinen <j@w1.fi>
2019-01-04 23:22:46 +02:00
Jouni Malinen 63a7683b2d tests: Split ap_ft_oom into separate test cases
ap_ft_oom seemed to depend on undesired wpa_supplicant behavior of
trying to do FT protocol even without being ready for reassociation.
This is going to be fixed in wpa_supplicant which would make this test
case fail, so split it into separate test cases for each failure item to
be able to avoid incorrect test failures.

Signed-off-by: Jouni Malinen <j@w1.fi>
2019-01-04 23:22:04 +02:00
Jouni Malinen 04e17e5024 tests: Verify that roaming attempts do not get rejected
The previous roam() and roam_over_ds() checks would have ignored failing
association rejection if a consecutive attempt to connect succeeds
within the initial time limit. This can miss incorrect behavior, so
check explicitly for association rejection.

Signed-off-by: Jouni Malinen <j@w1.fi>
2019-01-04 20:27:40 +02:00
Jouni Malinen de027ef595 tests: P2PS stale group removal
Signed-off-by: Jouni Malinen <j@w1.fi>
2019-01-04 13:19:20 +02:00
Jouni Malinen ebf25480bb tests: Fix P2P-GROUP-STARTED event parsing for persistent groups
Do not set the 'ip_addr' value from the "[PERSISTENT]" flag.

Signed-off-by: Jouni Malinen <j@w1.fi>
2019-01-04 11:44:48 +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
Jouni Malinen fef133e99c tests: AP VLAN with WPA2-Enterprise and local file setting VLAN IDs
Signed-off-by: Jouni Malinen <j@w1.fi>
2019-01-02 23:50:35 +02:00
Jouni Malinen 2e2f0f45de tests: [UTF-8] flag in scan results
Signed-off-by: Jouni Malinen <j@w1.fi>
2019-01-02 17:58:42 +02:00
Avraham Stern 8d09cf52a5 tests: Beacon report last frame indication
Verify that the beacon report contains the last beacon report
indication subelement when requested in the beacon request.

Signed-off-by: Avraham Stern <avraham.stern@intel.com>
2019-01-02 16:26:11 +02:00
Avraham Stern ec5b899040 tests: Beacon report frame body fragmentation
Verify that when the frame body subelement causes the
measurement report element to exceed the maximum element size,
the beacon report is fragmented and the frame body fragment ID
subelement is added with the correct fragment number.

Signed-off-by: Avraham Stern <avraham.stern@intel.com>
2019-01-02 16:26:11 +02:00
Jouni Malinen aa7386e92a tests: Update rrm_beacon_req_table_rsne to expect full RSNE
Now that wpa_supplicant is sending out full RSNE instead of the
fragmented one, update this test case to match.

Signed-off-by: Jouni Malinen <j@w1.fi>
2019-01-02 16:26:11 +02:00
Jouni Malinen 6a94fdf21a tests: D-Bus P2P peer information - VSIE
Signed-off-by: Jouni Malinen <j@w1.fi>
2019-01-02 13:00:57 +02:00
Jouni Malinen e3523cece4 tests: Fix p2p_ext_discovery_go to write to logger, not stdout
The error case debug print should go to logger.

Signed-off-by: Jouni Malinen <j@w1.fi>
2019-01-02 13:00:57 +02:00
Jouni Malinen 720a2e7906 tests: Data connectivity after REAUTHENTICATE
Verify that not updating GTK (i.e., only update PTK) in the driver does
not break connectivity. This case is different after the check for
"already in-use GTK" and rejection of GTK reinstallation.

Signed-off-by: Jouni Malinen <j@w1.fi>
2019-01-02 12:28:16 +02:00
Jouni Malinen b9c33e3fba tests: Use different country in p2p_go_move_reg_change
Use of country=00 (world roaming) seemed to not work anymore with the
current cfg80211 regulatory implementation since the existing channel is
left enabled when moving to country=00. Use a specific country code that
does enforce the selected channel from being used anymore to make this
test case pass again.

The change in cfg80211 behavior is from the kernel commit 113f3aaa81bd
("cfg80211: Prevent regulatory restore during STA disconnect in
concurrent interfaces").

Signed-off-by: Jouni Malinen <j@w1.fi>
2019-01-01 23:33:17 +02:00
Jouni Malinen fb643190dc tests: dot1xAuthSessionUserName
Signed-off-by: Jouni Malinen <j@w1.fi>
2019-01-01 21:29:25 +02:00
Beni Lev 7021d33c9e tests: Add RSSI based association rejection tests
Signed-off-by: Beni Lev <beni.lev@intel.com>
2019-01-01 18:18:53 +02:00
Beni Lev 080035d1db tests: Add a command for setting TX power/RSSI
With this command, RSSI signal can be controlled. Due to restrictions in
kernel, only values in the range of [-30, -50] can be used. The command
is implemented by changing the TX power.

Signed-off-by: Beni Lev <beni.lev@intel.com>
2019-01-01 18:18:53 +02:00
Jouni Malinen 2994ecfb5f tests: P2P cancel join-group using p2pdev and no separate group interface
Signed-off-by: Jouni Malinen <j@w1.fi>
2019-01-01 16:58:11 +02:00
Jouni Malinen 7f90a850ff tests: Clear regdom state in go_neg_forced_freq_diff_than_bss_freq
Be more careful with cleaning up the regdom state in cfg80211.

Signed-off-by: Jouni Malinen <j@w1.fi>
2019-01-01 16:35:42 +02:00
Jouni Malinen 5a5529c9f4 tests: Make dpp_pkex_no_responder handle enabled 5 GHz channels
It was possible for the 5 GHz PKEX channels to be enabled, e.g., when
running "ap_ht40_csa2 dpp_pkex_no_responder" test sequence, and that
resulted in a failure in dpp_pkex_no_responder due to the unexpectedly
long wait needed for the DPP-FAIL event. Increase the wait time to allow
for 5 GHz PKEX channels to be probed.

Signed-off-by: Jouni Malinen <j@w1.fi>
2019-01-01 16:17:13 +02:00
Jouni Malinen c55799e54c tests: Check per-wiphy specific country code between test cases
This allows more accurate logging of failures related to the cfg80211
country=98 (intersection) case. This version is trying to give some more
time to allow the country code to clear, but that does not seem to be
sufficient with the current cfg80211 implementation for country=98 (but
might be for other cases).

The additional check for country=98 at the beginning of each test case
is an attempt to force cfg80211 to restore world roaming state with a
new association and disconnection at the station side detected after the
AP side has already stopped. This is needed after the Linux kernel
commit 113f3aaa81bd ("cfg80211: Prevent regulatory restore during STA
disconnect in concurrent interfaces").

Signed-off-by: Jouni Malinen <j@w1.fi>
2019-01-01 11:46:50 +02:00
Jouni Malinen ba3146e154 tests: Wait a bit after 'iw reg set 00' at the end of test cases
This is needed to avoid leaving unexpected cfg80211 regulatory country
code in place at the point when a test case terminates.

Signed-off-by: Jouni Malinen <j@w1.fi>
2019-01-01 11:46:50 +02:00
Jouni Malinen 003716ec7b tests: Clear regdom changes more robustly in FST test cases
Signed-off-by: Jouni Malinen <j@w1.fi>
2019-01-01 11:35:43 +02:00
Jouni Malinen 2fa2b90aaf tests: Clear regulatory setting in ap_ht_op_class_* more robustly
Avoid exiting the test case with regulatory domain set to something else
than 00 (world roaming).

Signed-off-by: Jouni Malinen <j@w1.fi>
2019-01-01 10:57:50 +02:00
Jouni Malinen 4fb6963b39 tests: Build tests for wpa_supplicant and hostapd
Allow multiple build configurations to be tested automatically.

Signed-off-by: Jouni Malinen <j@w1.fi>
2018-12-31 12:03:53 +02:00
Jouni Malinen 544b5a0d39 tests: hostapd configuration reload from file when disabled
Signed-off-by: Jouni Malinen <j@w1.fi>
2018-12-30 17:35:54 +02:00
Jouni Malinen 0456b7d312 tests: Add UDP checksum into DHCP frames in ProxyARP/DGAF disabled case
Previously, the special value 0 was used to indicate no UDP checksum.
Replace that with the calculated checksum for more like use case.

Signed-off-by: Jouni Malinen <j@w1.fi>
2018-12-30 01:04:58 +02:00
Jouni Malinen cd803b6ccd tests: Clear regulatory Beacon hints more robustly in TDLS test cases
The ap_open_tdls_vht* test cases could leave some pending regulatory
Beacon hints waiting to be cleared during the following test case. This
would result in a failure if the following test case expected specific
regdom event behavior. For example, this caused "ap_open_tdls_vht160
dbus_country" sequence to result in failure in dbus_country. Fix this by
using more robust sequence in clearing regdom state at the end of the
TDLS test cases that have the AP advertising a country code.

Signed-off-by: Jouni Malinen <j@w1.fi>
2018-12-29 17:02:54 +02:00
Jouni Malinen 90eb910ef5 tests: MKA MIB information
Signed-off-by: Jouni Malinen <j@w1.fi>
2018-12-29 16:52:56 +02:00
Jouni Malinen a2acadf605 tests: MACsec PSK with bridge interface
Signed-off-by: Jouni Malinen <j@w1.fi>
2018-12-29 12:26:52 +02:00
Jouni Malinen 0d09bd0832 tests: Use more robust way to determine MKA is done for MACsec testing
Signed-off-by: Jouni Malinen <j@w1.fi>
2018-12-29 12:18:41 +02:00
Jouni Malinen 344929a9ca tests: MACsec PSK local failures in CP state machine
Signed-off-by: Jouni Malinen <j@w1.fi>
2018-12-27 16:03:46 +02:00
Jouni Malinen ead573d8a2 tests: MACsec
Add some coverage for MACsec with the macsec_linux driver interface in
wpa_supplicant.

Signed-off-by: Jouni Malinen <j@w1.fi>
2018-12-27 00:42:04 +02:00
Jouni Malinen 93701b4afe tests: Allow TX/RX data test to use different frame length
This is needed for MACsec test cases with a bit shorter MTU.

Signed-off-by: Jouni Malinen <j@w1.fi>
2018-12-24 23:56:25 +02:00
Jouni Malinen e7b141906b tests: Do not override connectivity test address if no driver info
Not all driver interfaces provide driver status information with the
local address, so skip the override step if the field is not available.
This is needed, e.g., with macsec_linux.

Signed-off-by: Jouni Malinen <j@w1.fi>
2018-12-24 20:31:47 +02:00
Jouni Malinen 345d8b5e91 tests: AP mode and D-Bus StationAdded/StationRemoved signals
Signed-off-by: Jouni Malinen <j@w1.fi>
2018-12-23 17:25:11 +02:00
Johannes Berg 7afbbcd2ed tests: Validate that AP doesn't reflect station frames
Add a new test to check that the AP won't send frames to the client if
it tries to talk to itself.

Note that this fails until the relevant mac80211 patch is merged.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2018-12-23 17:25:11 +02:00
Jouni Malinen 95cd50a1ed tests: Fix AP wait in ap_require_ht and ap_require_ht_limited_rates
These test cases seemed to have copy-paste errors where
wait_enabled=False was forgotten even though there was no additional
steps checking the AP mode startup results. This did not break the
tests, but could have resulted in slowing them down if the STAs did not
find the AP in the first scan.

Signed-off-by: Jouni Malinen <j@w1.fi>
2018-12-23 17:25:11 +02:00
Jouni Malinen 15b7cc5199 tests: HT STBC overrides
Signed-off-by: Jouni Malinen <j@w1.fi>
2018-12-23 17:25:11 +02:00
Sergey Matyukevich 721d8558bc tests: Allow overriding HT STBC capabilities
Signed-off-by: Sergey Matyukevich <sergey.matyukevich.os@quantenna.com>
2018-12-23 17:25:11 +02:00
Jouni Malinen 43d174b8e2 tests: Automatic channel selection, HT scan, and DFS
Signed-off-by: Jouni Malinen <j@w1.fi>
2018-12-23 17:25:11 +02:00
Jouni Malinen b586054f95 tests: Work around cfg80211 reg.c intersection (country 98) issues
The Linux kernel commit 113f3aaa81bd ("cfg80211: Prevent regulatory
restore during STA disconnect in concurrent interfaces") broke the
regulatory clearing attempt in many test cases since
cfg80211_is_all_idle() is now returning false due to the AP interface
being up and that results in the Country IE -based regulatory
information not getting cleared back to defaults.

Work around this by stopping the AP interface first so that when the
station interface receives the disconnection, there are no other active
interfaces in the system. In addition, wait for REGDOM event for the
Country IE hint after association to avoid disconnection before the
regulatory events have been fully processed.

Signed-off-by: Jouni Malinen <j@w1.fi>
2018-12-23 17:25:11 +02:00
Jouni Malinen 99bc57d0d1 tests: Fix mbo_supp_oper_classes after cfg80211 change
The Linux kernel commit 113f3aaa81bd ("cfg80211: Prevent regulatory
restore during STA disconnect in concurrent interfaces") broke the
regulatory clearing attempt in this test case since
cfg80211_is_all_idle() is now returning false due to the AP interface
being up and that results in the Country IE -based regulatory
information not getting cleared back to defaults.

Work around this by stopping the AP interface first so that when the
station interface receives the disconnection, there are no other active
interfaces in the system. In addition, wait for REGDOM event for the
Country IE hint after association to avoid disconnection before the
regulatory events have been fully processed.

Signed-off-by: Jouni Malinen <j@w1.fi>
2018-12-22 16:13:14 +02:00
Jouni Malinen 2cef6f6e89 tests: Enable dynamic debug from cfg80211/mac80211
These debug logs were lost due to CONFIG_DYNAMIC_DEBUG=y.

Signed-off-by: Jouni Malinen <j@w1.fi>
2018-12-22 00:18:33 +02:00
Jouni Malinen afd38c9fdc tests: hostapd.vlan with bridge ifname
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2018-12-21 12:02:57 +02:00
Jouni Malinen 9552a7364f tests: DPP_CONFIGURATOR_SIGN without double space
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2018-12-21 12:02:57 +02:00
Jouni Malinen 3a259f073a tests: Be more careful in clearing REGDOM state
cfg80211 regulatory code gets into pretty inconvenient state if it needs
to intersect regulatory domain information from multiple regulations
(country=98). The existing mechanisms in the hwsim test cases are not
able to clear that up for the following test case and this can result in
large number of failures.

It looks like country=98 case is hit frequently in WNM test cases where
a station associates with an AP that advertises a specific country code
and that station is then asked to disconnect before the REGDOM events
have been received. Avoid this by waiting for the REGDOM events for the
init=COUNTRY_IE case before disconnecting.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2018-12-21 00:55:31 +02:00
Jouni Malinen 432c0972ad tests: Connect attempt with transmitting/nontransmitting BSS
This adds some minimal testing for Multi-BSS connection attempts. The
part for nontransmitted BSS is limited since hostapd/mac80211 does not
yet have sufficient support for Multi-BSS in AP mode.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2018-12-20 21:44:33 +02:00
Peng Xu 8d176ae689 tests: Additional Multiple BSSID IE parsing tests
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2018-12-20 21:41:40 +02:00
Jouni Malinen 586826d4f5 tests: Multiple BSSID element in scan results
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2018-12-20 21:41:34 +02:00
Jouni Malinen 7488e0ade6 tests: Multi-AP association
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2018-12-20 12:43:43 +02:00
Mathy Vanhoef 3006241e43 tests: OCI validation in WNM-Sleep Exit frames (OCV)
Signed-off-by: Mathy Vanhoef <Mathy.Vanhoef@cs.kuleuven.be>
2018-12-17 15:50:12 +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
Mathy Vanhoef a187bf0161 tests: OCI validation in the FILS handshake (OCV)
Signed-off-by: Mathy Vanhoef <Mathy.Vanhoef@cs.kuleuven.be>
2018-12-17 15:50:12 +02:00
Mathy Vanhoef 870906d5cc tests: OCI validation in SA Query frames (OCV)
Signed-off-by: Mathy Vanhoef <Mathy.Vanhoef@cs.kuleuven.be>
2018-12-17 15:50:12 +02:00
Mathy Vanhoef e63d8837dd tests: OCI validation in the FT handshake (OCV)
Signed-off-by: Mathy Vanhoef <Mathy.Vanhoef@cs.kuleuven.be>
2018-12-17 15:42:23 +02:00
Mathy Vanhoef 6734ba0c00 tests: OCI validation in the 4-way and group key handshakes (OCV)
Perform detailed tests with OCV enabled, for both the 4-way and group
key handshakes. These tests include establishing a working connection
with OCV enabled, assuring that a STA without OCV enabled can still
connect to a STA with OCV enabled (and vice versa), verifying that
invalid OCI elements get silently ignored, verifying that missing OCI
elements are reported, and so on.

Signed-off-by: Mathy Vanhoef <Mathy.Vanhoef@cs.kuleuven.be>
2018-12-17 15:42:23 +02:00
Mathy Vanhoef 3797b55cfc tests: Enable OCV in the testing builds
Signed-off-by: Mathy Vanhoef <Mathy.Vanhoef@cs.kuleuven.be>
2018-12-17 15:42:23 +02:00
Jouni Malinen 4992582187 tests: Hotspot 2.0 AAA server behavior for SIM provisioning
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2018-12-15 18:01:38 +02:00
Jouni Malinen 30810f5d97 tests: wpa_supplicant config file writing and key_mgmt values
Signed-off-by: Jouni Malinen <j@w1.fi>
2018-12-08 16:27:26 +02:00
Jouni Malinen 3a80672e22 tests: Remove parallel-vm.sh
parallel-vm.py has obsoleted this a long time ago and there is no need
to maintain two scripts for doing more or less the same thing.

Signed-off-by: Jouni Malinen <j@w1.fi>
2018-12-08 15:35:47 +02:00
Jouni Malinen e4ce86f98b tests: Add dfs_etsi to the long_tests list
Signed-off-by: Jouni Malinen <j@w1.fi>
2018-12-08 15:33:31 +02:00
Jouni Malinen 842c29c173 tests: Hotspot 2.0 connection attempt without PMF
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2018-12-08 14:06:58 +02:00
Jouni Malinen c8f7a83c65 tests: Fix ap_hs20_deauth_req_without_pmf
Now that hostapd starts mandating PMF for Hotspot 2.0 Release 2
association, this test case needs some more tweaks to work. Hardcode
Hotspot 2.0 Release 1 to be used and disable PMF explicitly.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2018-12-08 14:06:58 +02:00
Jouni Malinen 647c0ed679 tests: Fix ap_hs20_ft with PMF enabled
The Beacon loss event was not reported anymore, so remove that as an
unnecessary step in the test case. In addition, check the key_mgmt
values explicitly.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2018-12-08 14:06:58 +02:00
Jouni Malinen f40f8860d2 tests: Enable PMF in ap_hs20_unexpected configuration
This is needed to meet the Hotspot 2.0 Release 2 requirement for the
third station that is actually using RSN.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2018-12-08 14:06:58 +02:00
Jouni Malinen ea57b0bcfe tests: Enable PMF in ap_hs20_external_selection network profile
This is required for Hotspot 2.0 Release 2.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2018-12-08 14:06:58 +02:00
Jouni Malinen dfd1b69de2 tests: Hotspot 2.0 release number indication
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2018-12-08 14:06:58 +02:00
Jouni Malinen 7436cd366e tests: Update Hotspot 2.0 release number expectation to 3
Match the implementation change to fix the test cases that verified a
specific Hotspot 2.0 release number indication.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2018-12-08 14:06:58 +02:00
Jouni Malinen 4b1ae27974 tests: Connect to WPS AP with NFC connection handover (local failure)
This is a regression test case for a potential NULL pointer
dereferencing fixed in the previous commit.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2018-12-04 20:55:20 +02:00
Jouni Malinen e49a7199d5 tests: Opportunistic Wireless Encryption association rejection handling
Signed-off-by: Jouni Malinen <j@w1.fi>
2018-12-02 20:42:09 +02:00
Jouni Malinen d0cd2d1ab2 tests: DPP network addition failure
Signed-off-by: Jouni Malinen <j@w1.fi>
2018-12-02 18:40:06 +02:00
Jouni Malinen fe7c91f822 tests: DPP and continue listen state
Signed-off-by: Jouni Malinen <j@w1.fi>
2018-12-02 18:40:06 +02:00
Jouni Malinen 88c08a29a2 tests: DPP_BOOTSTRAP_GEN/REMOVE/GET_URI/INFO error cases
Signed-off-by: Jouni Malinen <j@w1.fi>
2018-12-02 18:40:06 +02:00
Jouni Malinen d0e88871a7 tests: DPP and unknown configurator id
Signed-off-by: Jouni Malinen <j@w1.fi>
2018-12-02 18:40:06 +02:00
Jouni Malinen 24c4200d2e tests: DPP and PKEX with local failure in processing Commit Reveal Req
Signed-off-by: Jouni Malinen <j@w1.fi>
2018-12-02 18:40:06 +02:00
Jouni Malinen a7758916c6 tests: DPP and PKEX with local failure in processing Exchange Resp
Signed-off-by: Jouni Malinen <j@w1.fi>
2018-12-02 12:44:13 +02:00
Jouni Malinen 6026ed0df1 tests: DPP and PKEX with mismatching curve (local failure)
Signed-off-by: Jouni Malinen <j@w1.fi>
2018-12-02 12:39:05 +02:00
Jouni Malinen eb390abb21 tests: DPP PKEX identifier combinations
Check behavior with valid and invalid identifier combinations.

Signed-off-by: Jouni Malinen <j@w1.fi>
2018-12-02 12:32:17 +02:00
Jouni Malinen be5e7a0771 tests: SAE and password identifier with FFC
Signed-off-by: Jouni Malinen <j@w1.fi>
2018-12-02 11:56:04 +02:00
Jouni Malinen 7e26f1bc89 tests: DPP peer introduction local failures
Signed-off-by: Jouni Malinen <j@w1.fi>
2018-12-02 01:22:59 +02:00
Jouni Malinen 5c6c42aa2c tests: DPP peer introduction failures
Signed-off-by: Jouni Malinen <j@w1.fi>
2018-12-02 00:44:42 +02:00
Jouni Malinen b856b94395 tests: DPP own config signing failure
Signed-off-by: Jouni Malinen <j@w1.fi>
2018-12-02 00:10:08 +02:00
Jouni Malinen 1ddf1b34fe tests: DPP invalid configurator key
Signed-off-by: Jouni Malinen <j@w1.fi>
2018-12-01 23:50:24 +02:00
Jouni Malinen 88d4e0baf2 tests: DPP legacy parameters local failure
Signed-off-by: Jouni Malinen <j@w1.fi>
2018-12-01 22:02:55 +02:00
Jouni Malinen 392aba4e87 tests: Radio measurement capability with roaming
This verifies that radio measurement capabilities are negotiated
correctly for the reassociation cases with and without FT.

Signed-off-by: Jouni Malinen <j@w1.fi>
2018-12-01 22:02:55 +02:00
Jouni Malinen 4ff7e05951 tests: Do not generate /tmp/hwsim-tests-*.tar.gz in VM case
There is no point in building this tarball in /tmp that is on the
ramdisk of the VM since it will go away when the VM exits.

Signed-off-by: Jouni Malinen <j@w1.fi>
2018-12-01 20:30:09 +02:00
Jouni Malinen 77e4f012f1 tests: DPP invalid legacy parameters
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2018-11-30 17:17:03 +02:00
Jouni Malinen 4d38285b3b tests: DPP protocol testing - Auth Conf RX processing failure
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2018-11-30 14:21:35 +02:00
Jouni Malinen 4ea1915bad tests: DPP Auth Resp AES-SIV issue
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2018-11-30 14:10:12 +02:00
Jouni Malinen 3710b58d24 tests: More DPP incompatible roles coverage
Cover the Configurator/Configurator case in addition Enrollee/Enrollee.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2018-11-30 14:05:21 +02:00
Jouni Malinen 14ea96dbd0 tests: DPP and Auth Resp(status) build failure
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2018-11-30 13:39:19 +02:00
Jouni Malinen f1042596d1 tests: DPP bootstrap key autogen issues
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2018-11-30 13:35:39 +02:00
Jouni Malinen 4e72b1de1d tests: DPP protocol testing cases for Auth Resp status-not-OK cases
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2018-11-27 17:21:22 +02:00
Jouni Malinen 9c976e2c45 tests: Additional DPP AES-SIV local failure coverage
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2018-11-27 17:02:31 +02:00
Jouni Malinen 545bf954c4 tests: DPP QR Code and keygen failure
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2018-11-27 16:50:36 +02:00
Jouni Malinen 9eadebe3d4 tests: DPP local failure on hashing public key for PKEX bootstrap info
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2018-11-27 16:44:48 +02:00
Jouni Malinen e9bca5b8c3 tests: DPP QR Code and unsupported curve
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2018-11-27 16:44:48 +02:00
Jouni Malinen d16be03bd1 tests: Additional DPP bootstrapping URI parsing coverage
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2018-11-26 21:35:23 +02:00
Jouni Malinen 01e39ba992 tests: DPP invalid attribute checks
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2018-11-26 20:43:30 +02:00
Avraham Stern a302384148 tests: Call remove_group() after other cleanup is done
The call to remove_group() may fail, in which case all following
cleanup is skipped. This may result in failing many tests since
cleanup did not complete successfully.

Fix this by calling remove_group() after other cleanup is done so
even it fails it will not affect the following tests.

Signed-off-by: Avraham Stern <avraham.stern@intel.com>
2018-11-26 01:00:00 +02:00
Jouni Malinen 381523ecae tests: hostapd configuration reload on SIGHUP with bss remove/add
Signed-off-by: Jouni Malinen <j@w1.fi>
2018-11-26 00:53:53 +02:00
Jouni Malinen fd1534a258 tests: DPP Connector testing with ECDSA signature in Python
Implement ECDSA signing functionality in the Python test script for
generating a valid signedConnector. This allows coverage of DPP config
object testing to be increased more easily.

Signed-off-by: Jouni Malinen <j@w1.fi>
2018-11-25 22:01:35 +02:00
Jouni Malinen 30dda44dcc tests: More DPP Config Object protocol testing coverage
Signed-off-by: Jouni Malinen <j@w1.fi>
2018-11-25 20:24:50 +02:00
Jouni Malinen a46b60c440 tests: Additional coverage for DPP GAS error cases
These test cases found number of error handling issues in the DPP/GAS
implementation.

Signed-off-by: Jouni Malinen <j@w1.fi>
2018-11-25 13:53:05 +02:00
Jouni Malinen e18b479299 tests: More coverage for ATTACH command parameter setting
Signed-off-by: Jouni Malinen <j@w1.fi>
2018-11-25 12:02:07 +02:00
Jouni Malinen a21eadcf58 tests: D-Bus introspection with busctl
Signed-off-by: Jouni Malinen <j@w1.fi>
2018-11-24 18:30:41 +02:00
Lubomir Rintel 8b67f6496e tests: D-Bus Get/Set Pmf
Based on Jouni Malinen's [76055b4c6 "tests: D-Bus Get/Set Pmf"], modified
to use the correct "s" signature for the "Pmf" property.

Removed the negative test cases, because the synthesized property doens't
seem to do error checking upon being set.

Signed-off-by: Jouni Malinen <j@w1.fi>
Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
2018-11-24 18:04:20 +02:00
Lubomir Rintel b8d8928f6c Revert "tests: D-Bus Get/Set Pmf"
This is wrong. The Pmf property has a "s" signature.

This reverts commit 76055b4c61.

Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
2018-11-24 18:03:55 +02:00
Andrei Otcheretianski 79bbafd78c tests: Store the correct PID in hostapd-test.pid file
The hwsim's start.sh script spawns hostapd process using "sudo".
Since sudo forks a child process, $! holds the pid of sudo itself.
Fix that by storing the PID of the child process instead.
Since in VM "sudo" is replaced with a dummy script, pass an additional
argument to run-all.sh and start.sh scripts to indicate that they are
running inside a VM.

This is needed to fix ap_config_reload and ap_config_reload_file test
cases on some platforms where sudo is apparently not relaying the
signals properly.

Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
2018-11-22 15:53:30 +02:00
Ayala Beker fcc65290d4 tests: Fix ap_acl_deny test
In ap_acl_deny test, the AP doesn't send probe responses during scan due
to ACL reject. As the result, dev[0] might miss the AP's Beacon frame
because the dwell time is too short. Make the test more robust and
trigger passive scan, and by that increase the probability of hearing
the AP.

Signed-off-by: Ayala Beker <ayala.beker@intel.com>
2018-11-22 15:53:30 +02:00
Jouni Malinen 524b963c6c tests: Mark OSU BSS explicitly in sigma_dut_ap_hs20
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2018-11-09 18:10:28 +02:00
Jouni Malinen db368b2e13 tests: ap_hs20_osen to test group cipher selection in SME case
Go through the group cipher selection in both the wpa_supplicant and
driver SME cases.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2018-11-09 18:09:34 +02:00
Jouni Malinen b583907b53 tests: Use more correct OSU_METHOD value in sigma_dut_ap_hs20
The OSU Providers List includes two providers, so there should be two
OSU_METHOD values listed just like there was two OSU_SERVER_URI URLs.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2018-11-06 02:04:09 +02:00
Jouni Malinen 4902eb04b1 tests: Use bridge in sigma_dut_ap_eap_osen
This is needed to allow sigma_dut to enable ap_isolate=1. In addition,
verify that the two associated STAs with RSN(EAP) and OSEN cannot
exchange frames between them.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2018-11-06 00:46:23 +02:00
Jouni Malinen e7869a664a tests: sigma_dut AP configuration for Hotspot 2.0
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2018-11-01 17:10:40 +02:00
Jouni Malinen 21895884ea tests: WNM Collocated Interference Reporting
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2018-10-30 14:07:51 +02:00
Andrei Otcheretianski 1d914d01d8 tests: Make autogo_interworking test more robust
P2P related configuration should be done on a global control interface.
This way this test can be reused also when a dedicated P2P device
interface is used.

Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
2018-10-20 11:33:07 +03:00
Jouni Malinen c3da381526 tests: AP Channel Switch and DISABLE command before completion
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2018-10-19 21:26:03 +03: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 e384b156dc tests: Update tshark wlan_mgmt compatibility code for new version
It looks like at least tshark 2.6.3 uses a different error message for
unknown display filter fields:
tshark: Neither "wlan_mgt.fixed.category_code" nor "4" are field or protocol names.
and a different status exit code (2 instead of 1).

Add a new handler for this combination to allow automatic wlan_mgt to
wlan conversion to happen.

Signed-off-by: Jouni Malinen <j@w1.fi>
2018-10-16 18:21:07 +03:00
Andrei Otcheretianski 16b5413f2b tests: Make ap_reconnect_auth_timeout test more robust
This test starts two identical APs and assumes a connection to the first
one, though it is not necessary true. Fix that by starting the second AP
only after the connection is established.

Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
2018-10-16 12:49:11 +03:00
Jouni Malinen ad369d77ba tests: ap_vht_csa_vht40 to check for unexpected disconnection
This test case had an error that hit an unexpected disconnection. Add an
explicit check to verify that this does not happen anymore.

Signed-off-by: Jouni Malinen <j@w1.fi>
2018-10-16 12:44:48 +03:00
Andrei Otcheretianski 7b1adf2cba tests: Fix ap_vht_csa_vht40 test
The channel configuration in CHAN_SWITCH command was incorrect. This
resulted in switching to HT40+ channel, while announcing HT40- in the
secondary channel IE. This caused a disconnection after the channel
switch. Fix that.

Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
2018-10-16 12:44:32 +03:00
Jouni Malinen 02342a2a2a tests: WMM advertisement parameter change
Signed-off-by: Jouni Malinen <j@w1.fi>
2018-10-16 12:30:57 +03:00
Jouni Malinen 182a0b4dae tests: EAP-pwd local error case in eap_pwd_perform_confirm_exchange()
This is a regression test case for a memory leak on these error paths.

Signed-off-by: Jouni Malinen <j@w1.fi>
2018-10-16 12:22:58 +03:00
Jouni Malinen 30a67736dc tests: VHT with 80 MHz channel width reconfigured to 2.4 GHz HT
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2018-10-16 00:51:21 +03:00
Jouni Malinen 349c49bac4 tests: OWE group negotiation with PMF
Verify that PMF does not end up reporting unexpected status code 30
(temporary rejection; SA Query).

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2018-10-16 00:33:20 +03:00
Jouni Malinen 97e27300f4 tests: Maximum number of cred roaming_consortiums
Signed-off-by: Jouni Malinen <j@w1.fi>
2018-10-14 20:48:32 +03:00
Jouni Malinen c481e1cbb7 tests: SAE and MFP enabled without sae_require_mfp
Signed-off-by: Jouni Malinen <j@w1.fi>
2018-10-14 20:14:30 +03:00
Jouni Malinen 4816bd3b22 tests: OWE transition mode and need for multiple scans
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2018-10-12 19:59:26 +03:00
Jouni Malinen 44fa13b17f tests: SSID with 32 octets with nul at the end
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2018-10-11 12:12:30 +03:00
Jouni Malinen 6bf62f7fc4 tests: OSU Providers NAI List ANQP-element
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2018-10-05 20:54:40 +03:00
Jouni Malinen 1dd66fc103 tests: Update server and user certificates (2018)
The previous versions expired, so need to re-sign these to fix number of
the EAP test cases.

Signed-off-by: Jouni Malinen <j@w1.fi>
2018-10-04 01:16:55 +03:00
Jouni Malinen 953f689391 tests: Test connectivity within each step of FILS+FT
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2018-10-04 00:31:48 +03:00
Jouni Malinen 0fa415a835 tests: Suite B and PMKSA caching multiple times
This verifies that wpa_supplicant and hostapd behave consistently with
PMKSA caching when Suite B AKMs end up deriving a new PMKID from each
4-way handshake.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2018-09-27 11:43:58 +03:00
Jouni Malinen f1e2d38166 tests: DPP_CONFIGURATOR_ADD error path
This is a regression test case for a memory leak on DPP_CONFIGURATOR_ADD
error path in dpp_keygen_configurator() when an unsupported curve is
specified.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2018-09-21 21:39:34 +03:00
Jouni Malinen d7e35c4e29 tests: Enable Suite B test cases with OpenSSL 1.1.1
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2018-09-17 17:52:38 +03:00
Jouni Malinen 31157568f2 tests: sigma_dut controlled Hotspot 2.0 connection
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2018-09-15 05:17:54 +03:00
Jouni Malinen dc60d5643a tests: sigma_dut controlled Venue URL fetch
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2018-09-15 05:17:54 +03:00
Jouni Malinen bb2c25d0dc tests: Venue URL ANQP-element with PMF
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2018-09-15 05:17:54 +03:00
Jouni Malinen 40d514ec64 tests: Hotspot 2.0 OSU provider and single SSID
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2018-09-12 03:49:16 +03:00
Jouni Malinen 0beb6c2f50 tests: sigma_dut controlled AP with OSEN
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2018-09-12 02:26:11 +03:00
Jouni Malinen 2697e85ea9 tests: DPP group_id parameter
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2018-08-30 23:34:37 +03:00
Jouni Malinen add3c2a1bf tests: FILS SK ERP and ERP flush on server, but not on peer
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2018-08-24 16:27:34 +03:00
Jouni Malinen 1d9babdaa0 tests: HT40 disabling
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2018-08-21 19:07:53 +03:00
Jouni Malinen 307324bf79 tests: AP with WEP and external ifconfig down
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2018-08-21 18:50:55 +03:00
Jouni Malinen c773c7d5dd tests: WPA2-PSK/TKIP and MIC=0 in msg 3/4
Verify that unauthenticated EAPOL-Key message does not get decrypted.

Signed-off-by: Jouni Malinen <j@w1.fi>
2018-08-08 16:51:35 +03:00
Jouni Malinen 2133a7cd7d tests: Check both FT and non-FT connections in ap_hs20_ft
Verify that the automatically generated network profile is able to
connect to a non-FT network automatically after having used FT for the
first connection.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2018-08-03 00:40:51 +03:00
Jouni Malinen 0a3742950e tests: Extend eap_proto_aka_prime to cover additional AT_KDF cases
Verify that EAP-AKA' client rejects Challenge with an appended AT_KDF
and a modified AT_KDF value during KDF negotiation.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2018-08-02 15:36:24 +03:00
Jouni Malinen 63add34eb0 tests: sigma_dut with various AP KeyMgnt values
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2018-08-01 18:45:53 +03:00
Jouni Malinen f5dd150aac tests: OSEN with two group ciphers allowed on client side
This verifies the new default behavior for OSEN in Single SSID capable
devices.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2018-07-31 00:33:08 +03:00
Jouni Malinen 686ca5c45b tests: Verify T&C Server URL generation result
Check that the @1@ macro gets replaced correctly both when in the middle
and when in the end of the URL template.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2018-07-31 00:21:59 +03:00
Jouni Malinen 6ccab679c2 tests: ap_hs20_terms_and_conditions_sql to test DAC_REQUEST
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2018-06-22 19:37:18 +03:00
Jouni Malinen d7b60f7a9e tests: Check current_sessions in ap_hs20_terms_and_conditions_sql
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2018-06-22 19:37:10 +03:00
Jouni Malinen ed83029c29 tests: Move hs20_t_c_server_url parameter from AP to AS
This is needed with the modified hostapd implementation to fix the
ap_hs20_terms_and_conditions* test cases.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2018-06-21 20:52:54 +03:00
Jouni Malinen e6f8042d17 tests: hs20-osu-client testing for PPS MO parsing
This adds a mechanism to allow hs20-osu-client set_pps command to be
tested with PPS MO files.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2018-06-21 19:18:54 +03:00
Jouni Malinen db856f47ef tests: Fix mbo_supp_oper_classes with new regdb
Change country code KZ to SY for the 2.4 GHz only case since 5 GHz rules
were added for KZ.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2018-06-20 15:23:50 +03:00
Jouni Malinen e96fa19753 tests: Add more details on sae_bignum_failure logs
It is easier to understand the hostapd debug log here if each step is
noted there before starting the wpa_supplicant operation. In addition,
it looks safer to process all pending event messages between each step
to avoid running out of any buffer limits.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2018-06-20 13:07:38 +03:00
Jouni Malinen b1e1187744 tests: sigma_dut controlled AP with EAP+OSEN
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2018-06-19 00:39:42 +03:00
Jouni Malinen 2403edb8fd tests: P2P and avoid frequencies driver event on 5 GHz
This test case verifies that wpa_supplicant is able to perform CSA to a
VHT80 channel when having to move the GO due to an avoid-frequencies
driver event.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2018-06-18 20:11:52 +03:00
Jouni Malinen 25bd4e7beb tests: Associated STA indicating 40 MHz intolerant and hostapd deinit
This is a regression test for a forgotten ap_ht2040_timeout() eloop
timer callback on AP interface removal.

Signed-off-by: Jouni Malinen <j@w1.fi>
2018-06-12 21:47:43 +03:00
Jouni Malinen fe102801f6 tests: SAE reauthentication
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2018-06-06 23:59:46 +03:00
Jouni Malinen ffcaca68d3 tests: FT with different BIP algorithms
Signed-off-by: Jouni Malinen <j@w1.fi>
2018-06-05 21:50:36 +03:00
Jouni Malinen 2842987879 tests: FILS+FT with SHA384
Signed-off-by: Jouni Malinen <j@w1.fi>
2018-06-05 21:50:36 +03:00
Jouni Malinen c52626489a tests: Split ap_ft_ap_oom7 into separate test cases
The implementation changes in hostapd FT error path handling in the
follow commit would result in ap_ft_ap_oom7 test case failing. This is
triggered partially by PMF protections and SA Query attempts, so it
looks like it is easier to split each failure case into a separate test
case.

Signed-off-by: Jouni Malinen <j@w1.fi>
2018-06-05 21:50:01 +03:00
Jouni Malinen 55b3cda775 tests: FT-EAP-SHA384
Signed-off-by: Jouni Malinen <j@w1.fi>
2018-06-05 20:16:37 +03:00
Jouni Malinen 925584689b tests: ERP enabled on RADIUS server and peer using EAP-TLS v1.3
Signed-off-by: Jouni Malinen <j@w1.fi>
2018-06-01 17:53:10 +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 5fb016a219 tests: WNM Time Advertisement without time zone configuration
This is a regression test for a segfault in hostapd.

Signed-off-by: Jouni Malinen <j@w1.fi>
2018-05-31 12:55:49 +03:00
Jouni Malinen 64224d5871 tests: Hotspot 2.0 OSEN-single-SSID connection
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2018-05-29 23:34:22 +03:00
Jouni Malinen 5e597ed9f0 tests: EAP-pwd with salted passwords
Signed-off-by: Jouni Malinen <j@w1.fi>
2018-05-28 22:15:20 +03:00
Jouni Malinen b30639b77e tests: Adjust eap_proto_pwd_errors to match implementation changes
Signed-off-by: Jouni Malinen <j@w1.fi>
2018-05-28 22:09:20 +03:00
Jouni Malinen 62566bc23d tests: WPA2-EAP-FT AP changing from 802.1X-only to FT-only
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2018-05-21 22:24:36 +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 6bf7a54754 tests: Brainpool curves in ap_wpa2_eap_pwd_groups with OpenSSL 1.1.x
The OpenSSL version check should not have been limited to 1.0.2 only.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2018-05-17 22:03:25 +03:00
Jouni Malinen 27fa11615b tests: Additional VHT channel switch testing
Enable/disable VHT with CHAN_SWITCH.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2018-05-16 01:16:54 +03:00
Jouni Malinen 79467d74fd tests: Fix dbus_tdls_channel_switch with missing kernel support
Check driver capabilities in the D-Bus TDLS case similarly to the
non-D-Bus cases.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2018-05-15 00:38:13 +03:00
Jouni Malinen 23c024b9c1 tests: Do not fail if driver supports power saving
Couple of "invalid value" tests started to fail now that mac80211_hwsim
actually accepts power save configuration. Fix these by running the same
command for more code coverage, but in a way that ignores the result of
the operation (succeeds with older kernel versions and fails with
newer).

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2018-05-04 23:56:32 +03:00
Jouni Malinen f98fdc4e4b tests: wpa_supplicant STATUS output and ieee80211ac=1
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2018-05-04 20:19:17 +03:00
Jouni Malinen 585e728a5c tests: Skip OCSP tests with wolfSSL
Signed-off-by: Jouni Malinen <j@w1.fi>
2018-05-02 13:32:51 +03:00
Sean Parkinson f08362e9ce tests: Use same certificates as used for GnuTLS with wolfSSL
Signed-off-by: Sean Parkinson <sean@wolfssl.com>
2018-05-02 00:37:57 +03:00
Sean Parkinson 7d5df79f2d tests: Use a valid key exchange value in eap_proto_ikev2
Signed-off-by: Sean Parkinson <sean@wolfssl.com>
2018-05-02 00:37:38 +03:00
Jouni Malinen 832b736fb2 tests: Add TLS v1.3 into ap_wpa2_eap_tls_versions
When running with OpenSSL 1.1.1, verify that EAP-TLS can be used with
TLS v1.3.

Signed-off-by: Jouni Malinen <j@w1.fi>
2018-05-01 22:13:38 +03:00
Jouni Malinen 1150d0756a tests: Enable TLS v1.3 explicitly in the authentication server
For testing purposes, enable TLS v1.3 in the authentication server so
that the protocol version can be controlled from wpa_supplicant side
more easily.

Signed-off-by: Jouni Malinen <j@w1.fi>
2018-05-01 22:13:38 +03:00
Jouni Malinen 0d34c13a72 tests: Ignore openssl_cipher_suite_config_hapd failure (OpenSSL 1.1.1)
It looks like OpenSSL 1.1.1 accepted the openssl_ciphers=FOO test
configuration or well, at least does not reject it like previous
versions did. For now, ignore this failure.

Signed-off-by: Jouni Malinen <j@w1.fi>
2018-05-01 22:13:38 +03:00
Jouni Malinen a61ee84d0c tests: Fix ap_wpa2_eap_fast_cipher_suites with OpenSSL 1.1.1
RC4-SHA cipher case ended up allowing the handshake to be started just
to fail with "no ciphers available" when trying to generate ClientHello.
Fix this by handling an EAP failure case for the RC4-SHA test step with
OpenSSL 1.1.*.

Signed-off-by: Jouni Malinen <j@w1.fi>
2018-05-01 13:23:25 +03:00
Jouni Malinen edc4374ef5 tests: pending_tc table check for HS 2.0 Terms and Conditions
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2018-04-30 20:19:32 +03:00
Jouni Malinen 6444b08cea tests: Hotspot 2.0 Terms and Conditions using SQLite for user DB
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2018-04-26 17:56:22 +03:00
Jouni Malinen 045c7c6817 tests: Hotspot 2.0 Terms and Conditions signaling - CoA
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2018-04-25 12:57:46 +03:00
Jouni Malinen 0f7fc6b98d tests: Hotspot 2.0 Terms and Conditions signaling
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2018-04-24 00:35:47 +03:00
Jouni Malinen c3d45e130a tests: WDS STA interface events and STA command output
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2018-04-24 00:35:47 +03:00
Jouni Malinen 24b5b786e6 tests: WPA2-PSK/GCMP/CCMP ciphers
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2018-04-24 00:35:47 +03:00
Andrei Otcheretianski 440e9f0bbe tests: Async. AP setup failure with wpa_supplicant
Verify that the AP initialization failure is reported back to
wpa_supplicant also when the initialization is complete in a callback.

Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
2018-04-20 00:50:25 +03:00