Commit graph

2537 commits

Author SHA1 Message Date
Jouni Malinen
26820b4fc1 tests: IEEE 802.1X + WEP reauthentication
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-08-17 13:40:40 +03:00
Jouni Malinen
e5d3e13a5c tests: Fix ap_wps_er_http_proto max concurrent requests case
Commit 2d6a526ac3 ('tests: Make
ap_wps_er_http_proto more robust') tried to work around the timeouts
here, but that was not really the best approach since the one second
timeout that was used here for connect() ended up being very close to
the limit even before the kernel change. The longer connect() time is
caused by a sequence where the listen() backlog ignores the connection
instead of accept() followed by close() within the wpa_supplicant ER
HTTP connection handling. The time to retransmit the SYN changed a bit
in the kernel from 1.0 sec to about 1.03 sec. This was enough to push
that over the one second timeout.

Fix this by using a sufficiently long timeout (10 sec) to allow SYN
retransmission to occur to recover from the listen() backlog case.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-08-17 13:37:25 +03:00
Jouni Malinen
50348c5c32 tests: More coverage for IBSS RSN OOM
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-08-14 00:22:50 +03:00
Jouni Malinen
a412157262 tests: IBSS RSN group rekeying
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-08-13 16:29:07 +03:00
Jouni Malinen
2d6a526ac3 tests: Make ap_wps_er_http_proto more robust
It looks like connect() for a TCP socket can time out at least with a
recent kernel. Handle that case more gracefully by ignoring that socket
while allowing the test to continue.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-08-11 15:58:13 +03:00
Jouni Malinen
f27b9277d5 tests: Make FST config tests more robust and easier to debug
It looks like it is possible for the separate started wpa_supplicant
process to remain running after a test case like fst_sta_config_default.
This would result in failures to run any following test case that uses
the wlan5 interface. Try to kill the process more thoroughly by waiting
for the PID file to show up and write more details into the logs to make
it easier to debug issues in this area.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-08-10 17:55:20 +03:00
Jouni Malinen
96485214f7 tests: HT/VHT values in STATUS
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-08-02 17:43:38 +03:00
Jouni Malinen
1b8ef4061c tests: WEP with HT/VHT
Verify that HT/VHT gets disabled in WEP configuration.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-08-02 17:43:26 +03:00
Jouni Malinen
ce4af56322 tests: DRIVER_FLAGS command
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-23 20:51:55 +03:00
Jouni Malinen
d9ed0ce65e tests: WPA2-PSK AP with station using SA Query local failures
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-18 00:58:27 +03:00
Jouni Malinen
e0a9370b3f tests: Overlapping BSS scan request (HT40+)
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-18 00:14:34 +03:00
Jouni Malinen
dcbb5d808b tests: FT OOM in SME
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-18 00:14:14 +03:00
Jouni Malinen
674af173fe tests: AP with open mode and driver operations failing
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-17 23:49:44 +03:00
Jouni Malinen
28be769bc3 tests: SAE and invalid anti-clogging token request
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-17 17:53:25 +03:00
Jouni Malinen
dcd54211c4 tests: IEEE 802.1X connection using dynamic WEP104 when WPA enabled
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-17 17:34:16 +03:00
Jouni Malinen
d1150e5666 tests: IEEE 802.1X connection with LEAP included in configuration
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-17 17:34:16 +03:00
Jouni Malinen
2fd44db70e tests: More SAE OOM coverage
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-17 17:34:16 +03:00
Jouni Malinen
19f2a3f357 tests: Hotspot 2.0 OSU provider and OOM
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-17 11:08:02 +03:00
Jouni Malinen
f281f508b7 tests: Hotspot 2.0 OSU provider and invalid directory
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-17 11:08:02 +03:00
Jouni Malinen
502f0ce848 tests: More GET_HS20_ICON coverage
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-17 11:08:02 +03:00
Jouni Malinen
6fc562a406 tests: Unexpected Hotspot 2.0 AP configuration
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-15 13:30:57 +03:00
Jouni Malinen
78d2233f01 tests: Fix ap_wpa2_eap_too_many_roundtrips with OpenSSL 1.1.0
Use a smaller fragment_size to force the roundtrip limit to be reached
with OpenSSL 1.1.0 which seemed to result in a bit shorter TLS messages
being used and being able to complete the authentication successfully
with the previously used fragment_size value.

Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-15 13:30:57 +03:00
Jouni Malinen
ec9812e7e7 tests: Hotspot 2.0 OSU provider and protocol testing
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-15 13:30:57 +03:00
Jouni Malinen
2752537926 tests: Hotspot 2.0 OSU provider and no icon found
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-12 20:58:20 +03:00
Jouni Malinen
424e344fbf tests: Hotspot 2.0 connection and deauthentication request without PMF
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-12 20:49:02 +03:00
Jouni Malinen
21d410ca82 tests: GAS/ANQP and Hotspot 2.0 element protocol testing
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-12 00:14:42 +03:00
Jouni Malinen
5dec77ee00 tests: GAS/ANQP and icon binary protocol testing
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-12 00:05:35 +03:00
Jouni Malinen
3e5f781800 tests: Extend GAS error case coverage
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-11 21:56:56 +03:00
Jouni Malinen
1c39f984fd tests: Hotspot 2.0 icon fetch OOM with REQ_HS20_ICON
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-11 21:56:56 +03:00
Jouni Malinen
8e590f02bd tests: Hotspot 2.0 and connect attempt without matching cred
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-04 18:54:26 +03:00
Jouni Malinen
6b16e073d3 tests: ANQP no sharing
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-04 18:50:59 +03:00
Jouni Malinen
c342bb7a3d tests: Hotspot 2.0 and select with multiple matching home credentials
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-04 18:43:30 +03:00
Jouni Malinen
c63f2eb973 tests: Hotspot 2.0 connection with TTLS/default
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-04 18:24:23 +03:00
Jouni Malinen
26e43f01ae tests: Hotspot 2.0 and connect attempt without RSN
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-04 18:24:23 +03:00
Jouni Malinen
99cbec7ea7 tests: Hotspot 2.0 and connect attempt without credential
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-04 18:03:28 +03:00
Jouni Malinen
863a6bf6ae tests: Hotspot 2.0 connection and invalid roaming consortium element
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-04 18:00:23 +03:00
Jouni Malinen
63929c763a tests: Hotspot 2.0 connection and 3GPP credential constraints
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-04 17:49:57 +03:00
Jouni Malinen
604f559ae4 tests: Hotspot 2.0 and failures during profile configuration
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-04 17:49:57 +03:00
Jouni Malinen
af52992a37 tests: Hotspot 2.0 connection and no full match
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-04 17:49:57 +03:00
Jouni Malinen
a7fa20e047 tests: Hotspot 2.0 connection and roaming consortium constraints
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-04 17:49:57 +03:00
Jouni Malinen
416556d06b tests: Hotspot 2.0 network selection with req_conn_capab (not present)
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-04 17:49:56 +03:00
Jouni Malinen
73ece491c1 tests: D-Bus GetAll wpa_config_get_all() OOM
This is a regression test for a crash on wpa_config_get_all() error
path.

Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-04 17:49:56 +03:00
Jouni Malinen
c8fa30f213 tests: Hotspot 2.0 OSU provider and no AP with info
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-03 22:37:01 +03:00
Jouni Malinen
3429e2ff36 tests: GAS/ANQP query OOM
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-03 22:37:01 +03:00
Jouni Malinen
60547477e0 tests: ANQP_GET to unknown BSS
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-03 22:37:01 +03:00
Jouni Malinen
69e85c7fb3 tests: GAS_REQUEST OOM
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-03 22:37:01 +03:00
Jouni Malinen
1ea75c7ce0 tests: Hotspot 2.0 network selection and invalid GAS response
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-03 22:37:01 +03:00
Jouni Malinen
1169516b62 tests: Hotspot 2.0 and maximum BSS load (roaming)
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-03 22:37:01 +03:00
Jouni Malinen
a0061cf48f tests: Hotspot 2.0 network selection with min bandwidth - special cases
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-03 22:37:01 +03:00
Jouni Malinen
43e337f70c tests: Hotspot 2.0 required roaming consortium and no match
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-03 22:37:01 +03:00
Jouni Malinen
d717c10233 tests: Hotspot 2.0 connection and invalid roaming consortium ANQP-element
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-03 22:37:01 +03:00
Jouni Malinen
26597515d5 tests: Hotspot 2.0 with simulated SIM and EAP-SIM - OOM
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-03 22:37:01 +03:00
Jouni Malinen
c8ae9daf2b tests: Fix interworking_select() bssid argument in some test cases
The bssid argument was missing from couple of test cases. While this is
clearly incorrect, it looks like the error did not really cause any
significant issues to the test case. Anyway, better provide the correct
set of arguments to the call.

Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-03 22:37:01 +03:00
Jouni Malinen
0e67d81fb6 tests: Hotspot 2.0 with simulated SIM and EAP-SIM - invalid IMSI
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-03 22:37:01 +03:00
Jouni Malinen
bc6e32880f tests: Remove extra semicolons from python scripts
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-03 22:37:01 +03:00
Jouni Malinen
208ebb9d1a tests: Hotspot 2.0 network selection and OOM
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-03 22:37:01 +03:00
Jouni Malinen
28642616bf tests: Hotspot 2.0 network selection and no roaming consortium
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-03 22:37:01 +03:00
Jouni Malinen
e330daa9f1 tests: Hotspot 2.0 network selection and cred_with_nai_realm cred->realm
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-03 22:37:01 +03:00
Jouni Malinen
04f4a1f59e tests: Hotspot 2.0 multi-cred and same sp_priority
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-03 22:37:01 +03:00
Jouni Malinen
52be7b4116 tests: wpa_supplicant P2P_LO_START and P2P_LO_STOP commands
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-03 22:37:00 +03:00
Jouni Malinen
1c96988bc2 tests: IBSS and key_mgmt field in STATUS
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-03 19:13:42 +03:00
Jouni Malinen
50717e1e32 tests: IBSS operating frequency reporting
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-03 19:13:41 +03:00
Jouni Malinen
a8fd58aa42 tests: MBO and supported operating classes
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-03 19:13:41 +03:00
Jouni Malinen
b47a743942 tests: MBO BSS transition request MBO IE parsing
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-01 01:13:54 +03:00
Jouni Malinen
0073f453ff tests: MBO failure cases
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-06-30 12:53:05 +03:00
Jouni Malinen
3e3f1602b5 tests: MBO WNM token wrap around
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-06-30 12:53:05 +03:00
Jouni Malinen
bbd41e4d2b tests: Invalid MBO non_pref_chan values
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-06-30 01:13:16 +03:00
Jouni Malinen
b9dca2a954 tests: MBO mbo_cell_capa duplicate update
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-06-30 00:34:48 +03:00
Jouni Malinen
b136894fb0 tests: MPM protocol testing - CLS_ACPT event in OPN_SNT
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-06-29 01:56:26 +03:00
Jouni Malinen
434f8f7f82 tests: MPM protocol testing - CLS_ACPT event in CNF_RCVD
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-06-29 01:49:42 +03:00
Jouni Malinen
68f326d5fc tests: Mesh MPM FSM and HOLDING state event OPN_ACPT
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-06-29 01:43:50 +03:00
Jouni Malinen
09d554d1a6 tests: Secure mesh network connectivity failure
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-06-28 20:52:21 +03:00
Jouni Malinen
c3456015fd tests: Mesh peering management protocol testing for peer addition
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-06-28 20:52:04 +03:00
Jouni Malinen
d80d8c6ffc tests: Open mesh network connectivity, no_auto on both peers
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-06-28 20:44:58 +03:00
Jonathan Afek
9fd6804d61 tests: Mark 525 tests as remote compatible
After successfully passing the 525 tests on a remote setup mark the
tests as remote compatible.

Signed-off-by: Jonathan Afek <jonathanx.afek@intel.com>
2016-06-27 21:47:37 +03:00
Jonathan Afek
5aa751eaf3 tests: Add general filter for remote tests execution
Add a new function decorator for the test functions so that they can be
marked as remote compatible tests. Add a general filter to the remote
tests execution script to only execute tests that are remote compatible.

Signed-off-by: Jonathan Afek <jonathanx.afek@intel.com>
2016-06-27 21:47:37 +03:00
Jonathan Afek
bb04a9a9a3 tests: Use general cmd_execute() for bridge setup commands
The hwsim tests used to execute shell commands in the tests using the
subprocess python module. Use the cmd_execute() general function for
executing shell commands to setup bridge so that this would also work on
remote setups.

Signed-off-by: Jonathan Afek <jonathanx.afek@intel.com>
2016-06-27 21:47:37 +03:00
Jonathan Afek
12129dda8e tests: Use cmd_execute() for iw connect command
The hwsim tests used to execute shell commands in the tests using the
subprocess python module. Use the cmd_execute() general function for
executing "iw connect ..." commands so that this would also work on
remote setups.

Signed-off-by: Jonathan Afek <jonathanx.afek@intel.com>
2016-06-27 21:10:35 +03:00
Jonathan Afek
10e09d8316 tests: Use cmd_execute() for ip link set up/down commands
The hwsim tests used to execute shell commands in the tests using the
subprocess python module. Use the cmd_execute() general function for
executing "ip link set up/down" commands so that this would also work on
remote setups.

Signed-off-by: Jonathan Afek <jonathanx.afek@intel.com>
2016-06-27 21:10:35 +03:00
Jonathan Afek
137fd05099 tests: Use cmd_execute() for iw station get command
The hwsim tests used to execute shell commands in the tests using the
subprocess python module. Use the cmd_execute() general function for
executing "iw ... station get" commands so that this would also work on
remote setups.

Signed-off-by: Jonathan Afek <jonathanx.afek@intel.com>
2016-06-27 21:10:35 +03:00
Jonathan Afek
525f8293e5 tests: Use cmd_execute() in find_wpas_process()
The hwsim tests used to execute shell commands in the tests using the
subprocess python module. Use the cmd_execute() general function for
executing "ps ax" so that this would also work on remote setups.

Signed-off-by: Jonathan Afek <jonathanx.afek@intel.com>
2016-06-27 21:10:35 +03:00
Jonathan Afek
40c62e6e8d tests: Use cmd_execute() for ip addr add/del
The hwsim tests used to execute shell commands in the tests using the
subprocess python module. Use the cmd_execute() general function for
executing "ip addr add/del .." so that this would also work on remote
setups.

Signed-off-by: Jonathan Afek <jonathanx.afek@intel.com>
2016-06-27 21:10:35 +03:00
Jonathan Afek
2d588c6578 tests: Use cmd_execute() for iw scan
The hwsim tests used to execute shell commands in the tests using the
subprocess python module. Use the cmd_execute() general function for
executing "iw scan .." so that this would also work on remote setups.

Signed-off-by: Jonathan Afek <jonathanx.afek@intel.com>
2016-06-27 21:10:35 +03:00
Jonathan Afek
a548c37bad tests: Use cmd_execute() for iw reg set 00
The hwsim tests used to execute shell commands in the tests using the
subprocess python module. Use the cmd_execute() general function for
executing "iw reg set 00" so that this would also work on remote setups.

Signed-off-by: Jonathan Afek <jonathanx.afek@intel.com>
2016-06-27 21:10:35 +03:00
Jonathan Afek
fb120f1652 tests: Remove unused import subprocess
Number of files imported subprocess without using anything from subprocess.

Signed-off-by: Jonathan Afek <jonathanx.afek@intel.com>
2016-06-27 21:10:35 +03:00
Jonathan Afek
cbd4e92ba1 tests: Add the forgotten wlantest_setup() call to a TDLS test
One TDLS test case was using wlantest without doing the setup first.
This makes the test not work on real hardware. Fix the issue by adding
the wlantest setup to the test.

Signed-off-by: Jonathan Afek <jonathanx.afek@intel.com>
2016-06-27 21:10:35 +03:00
Jonathan Afek
f11005812a tests: Use cmd_execute() in set_powersave()
hwsim_utils.set_powersace() used to do file operations locally in
python. Start using the cmd_execute() general function for file
operations so that this would also work on remote setups.

Signed-off-by: Jonathan Afek <jonathanx.afek@intel.com>
2016-06-27 21:10:35 +03:00
Jouni Malinen
f9442f2967 tests: Wait for CTRL-EVENT-CHANNEL-SWITCH event in ap_csa tests
This verifies that the channel switch is reported by the station and
replaces the fixed sleep before a traffic test by wait for the actual
switch operation to complete.

Signed-off-by: Jouni Malinen <j@w1.fi>
2016-06-27 21:10:35 +03:00
Jouni Malinen
e9f2d54f44 tests: Use shell in local cmd_execute() only if needed
The generic cmd_execute() function was introduced in a manner that
converted the argument array to a string and used shell to run the
command unconditionally. This is not really desirable, so move back to
using the command array by default and use the single command string
with a shell only when really needed.

Signed-off-by: Jouni Malinen <j@w1.fi>
2016-06-27 21:10:35 +03:00
Jonathan Afek
31209e1434 tests: Use cmd_execute() in ap_ht clear_scan_cache()
The ap_ht tests used to execute shell commands in the tests using the
subprocess python module. Complete the move to using the cmd_execute()
general function for executing shell commands so that this would also
work on remote setups.

Signed-off-by: Jonathan Afek <jonathanx.afek@intel.com>
2016-06-27 21:10:35 +03:00
Jonathan Afek
3e3cbbd031 tests: Use cmd_execute() function in ap_ht40_scan_not_affected
The ap_ht tests used to execute shell commands in the tests using the
subprocess python module. Start using the cmd_execute() general function
for executing shell commands so that this would also work on remote
setups.

Signed-off-by: Jonathan Afek <jonathanx.afek@intel.com>
2016-06-27 21:10:35 +03:00
Jonathan Afek
113b8a1a3c tests: Use the cmd_execute() function in ap_ht for iw reg set
The ap_ht tests used to execute iw reg set command using the subprocess
python module. Start using the cmd_execute() general function for
executing shell commands so that this would also work on remote setups.

Signed-off-by: Jonathan Afek <jonathanx.afek@intel.com>
2016-06-27 21:10:35 +03:00
Jonathan Afek
6b4300d0c6 tests: Use apdev[0] more consistently in ap_ht
The test cases ap_ht40_5ghz_invalid_pair and ap_ht40_5ghz_disabled_sec
mixed use of apdev[0] and apdev[1] while only needing a single AP. This
works when both the devices are on the same host (e.g., with
mac80211_hwsim), but not when using separate remote hosts. Fix this by
using apdev[0] more consistently in these test cases.

Signed-off-by: Jonathan Afek <jonathanx.afek@intel.com>
2016-06-27 21:10:35 +03:00
Jonathan Afek
ebc6587d40 tests: Remove trailing whitespace
Signed-off-by: Jonathan Afek <jonathanx.afek@intel.com>
2016-06-27 21:10:35 +03:00
Jonathan Afek
cb3c0d96f4 tests: Pass full apdev to clear_scan_cache()
This is a step towards enabling the needed commands to be run on a
remote host.

Signed-off-by: Jonathan Afek <jonathanx.afek@intel.com>
2016-06-27 21:10:29 +03:00
Jonathan Afek
f8b9e61ef0 tests: Initialize hapd variable before try-finally uses
Some TDLS and WPS test cases reference the hapd variable in the finally
block even if the test failed before assigning the value to this
variable. This makes the code in the finally block to fail on
referencing this variable. Assign None to the hapd variable before
starting the tests to avoid this.

Signed-off-by: Jonathan Afek <jonathanx.afek@intel.com>
2016-06-27 19:04:15 +03:00
Jouni Malinen
643be15d41 tests: GAS failure cases
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-06-27 18:44:55 +03:00
Jouni Malinen
37a6765967 tests: GAS/ANQP query protected vs. not protected
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-06-27 18:33:13 +03:00
Jouni Malinen
1ad6f0d5e6 tests: GAS query deleted at deinit
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-06-27 16:30:08 +03:00
Jouni Malinen
e7d454bb76 tests: D-Bus DeviceFoundProperties signal
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-06-24 19:02:59 +03:00
Jouni Malinen
e18d170848 tests: wpa_state == COMPLETED in mesh
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-06-24 19:02:58 +03:00
Jouni Malinen
d1bc3ec85e tests: wpa_supplicant AP mode - WPS operations with fragmentation
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-06-24 19:02:58 +03:00
Jonathan Afek
f885b8e97c tests: ap_ciphers tests start using general cmd_execute() function
The ap_ciphers tests used to do file operations locally in python. Start
using the cmd_execute() general function for file operations so that
this would also work on remote setups.

Signed-off-by: Jonathan Afek <jonathanx.afek@intel.com>
2016-06-19 23:48:07 +03:00
Jonathan Afek
7fd9fbc27d tests: Add functions to execute shell commands on interface host
Add the feature to execute shell commands on each wpa_supplicant/hostapd
interface host. When executing remote tests the interfaces are not all
on a single host so when executing shell commands the test needs to
execute the command on the host which the interface relevant for the
command is on. This patch enables tests to execute the command on the
relevant host.

Signed-off-by: Jonathan Afek <jonathanx.afek@intel.com>
2016-06-19 23:48:07 +03:00
Jouni Malinen
51435515fb tests: mesh_scan_oom to support partial BSS result reporting
The next commit modifies the BSS command behavior to report partial
results for a BSS, so mesh_scan_oom needs to allow a BSS entry to be
returned as long as it does not include the mesh information.

Signed-off-by: Jouni Malinen <j@w1.fi>
2016-06-19 23:48:07 +03:00
Jouni Malinen
2833743d4c tests: WPA2-Enterprise connection using EAP-GPSK and wildcard SSID
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-06-19 22:41:23 +03:00
Jouni Malinen
1f7cd73ca6 tests: More wpa_supplicant AP mode coverage
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-06-19 22:00:20 +03:00
Jouni Malinen
94e8fe90c2 tests: Mesh with various pairwise and group ciphers
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-06-19 20:18:09 +03:00
Jouni Malinen
074f72849f tests: Secure mesh network connectivity with PMF enabled
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-06-18 12:20:50 +03:00
Jouni Malinen
20c7d26f80 tests: More wpa_supplicant/bss.c OOM coverage
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-06-17 20:41:09 +03:00
Jouni Malinen
4425b1ed71 tests: WPS and wpa_supplicant BSS entry limit
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-06-17 14:01:57 +03:00
Jouni Malinen
7309e804cf tests: Make mesh_missing_mic more robust
Check for MESH-PEER-CONNECTED from dev[1] before reporting MGMT-RX
timeout errors from dev[0]. This avoids false failures in case the short
0.01 s timeout at the end of the loop was not long enough to catch the
message.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-06-17 02:05:10 +03:00
Jouni Malinen
0b1b2044cc tests: Add sniffer check to wpas_mesh_max_peering
This verifies that the Accepting Additional Mesh Peerings field is being
cleared properly when the maximum peer links count is reached.

Signed-off-by: Jouni Malinen <j@w1.fi>
2016-06-13 00:04:47 +03:00
Jouni Malinen
a3bd53273e tests: Additional coverage in mesh_sae_groups_invalid
Additional coverage in mesh_rsn_sae_group() with non-zero
wpa_s->mesh_rsn->sae_group_index.

Signed-off-by: Jouni Malinen <j@w1.fi>
2016-06-12 17:56:02 +03:00
Jouni Malinen
61854f16ec tests: GAS/ANQP query and Address 3 value selection
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-06-10 22:30:29 +03:00
Jouni Malinen
739fd20cc3 tests: Mesh peering management protocol testing
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-06-05 11:43:37 +03:00
Jouni Malinen
81d6e230e3 tests: Secure mesh network and PMKID mismatch
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-06-05 11:17:00 +03:00
Jouni Malinen
66bb7d97dd tests: Secure mesh network and missing MIC
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-06-05 01:20:28 +03:00
Jouni Malinen
98628b7f07 tests: Mesh and failure to derive random nonce
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-06-05 00:24:47 +03:00
Jouni Malinen
044d739bdd tests: Secure mesh network and PMKSA caching failing due to OOM
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-06-05 00:20:06 +03:00
Jouni Malinen
e8739be842 tests: Mesh scan element parse error
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-06-05 00:13:40 +03:00
Jouni Malinen
699074d30c tests: Mesh network setup failing due to driver command failure
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-06-05 00:13:40 +03:00
Jouni Malinen
521a98a8f6 tests: Mesh and default beacon interval
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-06-04 21:47:22 +03:00
Jouni Malinen
ec87430ba1 tests: Extend coverage for mesh OOM testing
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-06-04 21:44:19 +03:00
Jouni Malinen
56d62fc3dd tests: Open mesh network on VHT 160 MHz channel
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-06-04 21:31:51 +03:00
Jouni Malinen
2cf6341e64 tests: Mesh and invalid frequency configuration
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-06-04 20:59:39 +03:00
Jouni Malinen
a64476403d tests: Mesh and local failures
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-06-04 00:40:38 +03:00
Jouni Malinen
b0ec3d772a tests: Mesh and local SAE failures
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-06-04 00:30:49 +03:00
Jouni Malinen
f0ee4535d2 tests: Mesh with invalid SAE group configuration
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-06-04 00:08:16 +03:00
Jouni Malinen
9ec916e9f4 tests: wpa_supplicant secure MESH and SAE group negotiation
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-05-30 21:15:30 +03:00
Jouni Malinen
582841689f tests: Secure mesh network setup local failure
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-05-30 21:10:58 +03:00
Jouni Malinen
4d4cdc3bb2 tests: wpa_supplicant mesh scan results and OOM
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-05-30 20:03:32 +03:00
Jonathan Afek
d28cfc2a25 tests: Support P2P group interfaces in hwsim remote tests
Start using the wpa_supplicant remote UDP interface for the control and
monitor sockets for P2P group interfaces so that P2P tests would work on
real hardware. Also have the group requests and events show in the test
log with the hostname and the interface name of the group interface.

Signed-off-by: Jonathan Afek <jonathanx.afek@intel.com>
2016-05-30 17:56:43 +03:00
Jouni Malinen
aa59370b34 tests: wpa_supplicant mesh with dynamic interface addition failing
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-05-30 01:50:09 +03:00
Jouni Malinen
b15acadcfd tests: Mesh network setup failing due to OOM
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-05-30 01:05:16 +03:00
Jouni Malinen
8f5abdb874 tests: More coverage in ap_reassociation_to_same_bss
The extra wait forces the special reattach-scan case to be reached in
wpa_supplicant_scan().

Signed-off-by: Jouni Malinen <j@w1.fi>
2016-05-28 23:28:15 +03:00
Jouni Malinen
3d53cd50ab tests: More coverage in wpas_ctrl_sched_scan_plans
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-05-28 23:00:42 +03:00
Jouni Malinen
4208329528 tests: Scan with SET freq_list and scan_cur_freq
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-05-28 22:47:31 +03:00
Jouni Malinen
fccc4bd518 tests: Duplicate SSID removal with scan_id list
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-05-28 22:47:31 +03:00
Jouni Malinen
0b0e4792d3 tests: Increase scan_fail coverage
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-05-28 22:47:31 +03:00
Jonathan Afek
8efc83d4e7 tests: Add support for wlantest for remote hwsim tests
Use a monitor interface given in the command line that is not also a
station or an AP as a monitor running wlantest on the channel used by
the test. This makes all the tests that use wlantest available for
execution on real hardware on remote hosts.

Signed-off-by: Jonathan Afek <jonathanx.afek@intel.com>
2016-05-28 16:34:09 +03:00
Jonathan Afek
04fd8ea1ba tests/remote: Use a function to add a log file to a remote host
Instead of accessing the logs list member of the remote host directly,
use a function to add logs to the remote host to be collected after the
test. This enables us to later have different implementation of remote
hosts or logs collection without requiring to have this list as the
implementation.

Signed-off-by: Jonathan Afek <jonathanx.afek@intel.com>
2016-05-28 16:33:48 +03:00
Jonathan Afek
e2f3f0232f tests: Use 10 retries for over-the-air broadcast connectivity
The regular hwsim tests use both unicast and broadcast frames to test
the connectivity between 2 interfaces. For real hardware (remote hwsim
tests) the broadcast frames will sometimes not be seen by all connected
stations since they can be in low power mode during DTIM or because
broadcast frames are not ACKed. Use 10 retries for broadcast
connectivity tests for real hardware so that the test will pass if we
successfully received at least one of them.

Signed-off-by: Jonathan Afek <jonathanx.afek@intel.com>
2016-05-28 16:33:41 +03:00
Jouni Malinen
90b4c73fdf tests: Fix ap_wpa2_eap_fast_prf_oom with the updated PRF implementation
This is needed to work with the tls_openssl.c changes that renamed the
function that is used for deriving the EAP-FAST keys.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-05-23 20:40:14 +03:00
Jouni Malinen
7f03ecc884 tests: Scan failures
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-05-23 18:43:58 +03:00
Jouni Malinen
a68a749322 tests: P2P group formation using P2PS method without specifying PIN
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-05-20 23:37:51 +03:00
Jouni Malinen
f260ce4be8 tests: wpa_supplicant AP mode - WPS disabled
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-05-14 19:43:30 +03:00
Jouni Malinen
50d06776c6 tests: Fix WEXT testing
Commit afb2e8b891 ('tests: Store P2P
Device ifname in class WpaSupplicant') did not take into account the
possibility of capa.flags not existing in get_driver_status() and broke
WEXT test cases. Fix this by checking that capa.flags is present before
looking at its value.

Signed-off-by: Jouni Malinen <j@w1.fi>
2016-05-14 18:59:47 +03:00
Janusz Dziedzic
a73fa13be2 tests/remote: Add utils file
Add rutils.py for remote tests.

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
2016-05-14 17:56:37 +03:00
Janusz Dziedzic
ede4719718 tests/remote: Add monitor.py
Add monitor support. This supports monitors added to the current
interfaces. This also support standalone monitor with multi interfaces
support. This allows to get logs from different channels at the same
time to one pcap file.

Example of t3-monitor added to config.py file.

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
2016-05-14 17:56:37 +03:00
Janusz Dziedzic
6a003eb2a6 tests: remotehost.py use join
Use join instead of for.

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
2016-05-14 17:19:59 +03:00
Jouni Malinen
df49b90e35 tests: Secure mesh and the first plink Open dropped
This is a regression test case to verify that MTK is calculated properly
also in this unexpected sequence.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-05-13 20:54:51 +03:00
Jouni Malinen
9524e7e5a4 tests: Open network connection with pmf=2
This verifies that pmf=2 is ignored for a non-RSN network while a
network profile specific ieee80211w=2 is enforced.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-05-06 00:35:08 +03:00
Jouni Malinen
2dc754e170 tests: wpa_supplicant config file parsing of arbitrary global values
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-05-02 11:08:25 +03:00
Jouni Malinen
596a3fef83 tests: Use \t instead of \n in discovery_ctrl_char_in_devname
This is needed to allow the SET command to be modified to reject newline
characters.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-05-02 11:08:25 +03:00
Jouni Malinen
8721af54e4 tests: wpa_supplicant config parsing of arbitrary cred values
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-05-02 11:08:25 +03:00
Jouni Malinen
5594df44c7 tests: wpa_supplicant config file writing with arbitrary PSK value
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-05-02 11:08:25 +03:00
Jouni Malinen
f529c0d908 tests: wpa_supplicant config file parsing/writing with WPS
This verifies that a WPA2PSK passphrase with control characters gets
rejected in a WPS Credential and that control characters in SSID get
written as a hexdump.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-05-02 11:08:25 +03:00
Jouni Malinen
0663ae22ff tests: Do not use tabs for indentation
Be more consistent with indentation (always uses spaces in Python
files).

Signed-off-by: Jouni Malinen <j@w1.fi>
2016-04-25 00:19:40 +03:00
Andrei Otcheretianski
a274b1bcbb tests: Test configuration propagation to group interface
When a dedicated P2P Device interface is used, its configuration should
be cloned to the group interface. Add a test that covers this both when
a separate group interface is used and not.

Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
2016-04-25 00:15:35 +03:00
Andrei Otcheretianski
597cbc0075 tests: Fix persistent_group_peer_dropped tests
Use the global control interface to remove P2P network blocks, to
support cases when a dedicated P2P Device interface is used.

Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
2016-04-25 00:06:20 +03:00
Andrei Otcheretianski
aa713e71e9 tests: Don't use proxy in urllib.urlopen()
Some environments define default system wide HTTP proxy. Using default
system configuration may result in a failure to open some HTTP URLs. Fix
this by ensuring that no proxies are used.

Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
2016-04-25 00:05:34 +03:00
Andrei Otcheretianski
fc30cc10ac tests: Use global control interface for P2P configurations
Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
2016-04-25 00:03:40 +03:00
Ilan Peer
9c01d6a965 tests: Use global control interface to set p2p_no_group_iface
Signed-off-by: Ilan Peer <ilan.peer@intel.com>
2016-04-24 23:47:29 +03:00
Ilan Peer
463b7f3511 tests: Parse group results in a couple of p2p_channel tests
In p2p_channel_vht80_autogo and p2p_channel_vht80p80_autogo, parse the
P2P-GROUP-STARTED event prior to calling the group_request() method, as
otherwise the group ifname is not set.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
2016-04-24 23:45:57 +03:00
Avraham Stern
af93c61450 tests: Modify use of GET command to support P2P Device interface
Support configurations that use a dedicated P2P Device interface by
using the global control interface and specifying the interface name for
the GET commands fetching the ip_addr_go parameter.

Signed-off-by: Avraham Stern <avraham.stern@intel.com>
2016-04-24 23:45:19 +03:00
Avraham Stern
5e65346ade tests: persistent_group_profile_add to support P2P Device interface
Modify the persistent_group_profile_add test to support configurations
that use a dedicated P2P Device interface by sending the ADD_NETWORK and
SET_NETWORK commands on the global control interface and specifying the
P2P Device interface name.

Signed-off-by: Avraham Stern <avraham.stern@intel.com>
2016-04-24 23:45:16 +03:00
Avraham Stern
afb2e8b891 tests: Store P2P Device ifname in class WpaSupplicant
Add an attribute to class WpaSupplicant with the name of the
P2P Device interface. If a separate interface is not used for
P2P Device, this attribute will hold the name of the only used
interface (with functions also as the P2P Device management
interface).

This attribute will be used to direct P2P related commands to the
P2P Device interface, which is needed for configurations that use
a separate interface for the P2P Device.

Signed-off-by: Avraham Stern <avraham.stern@intel.com>
2016-04-24 23:24:06 +03:00
Avraham Stern
d43fc7c6b0 tests: Modify p2p_msg_long_ssid to support P2P Device interface
Waiting for the P2P-DEVICE-FOUND event should be done on the global
control interface to support configurations that use a dedicated P2P
Device interface.

Signed-off-by: Avraham Stern <avraham.stern@intel.com>
2016-04-24 23:13:14 +03:00
Avraham Stern
a7efe6c386 tests: Modify autogo_scan to support P2P Device interface
Support configurations that use a dedicated P2P Device interface by
sending the P2P_CONNECT command on the global control interface.

In addition, when a dedicated P2P Device interface is used, there is no
need to manually respond to the Provision Discovery Request since the
request is processed by the P2P Device interface and this interface was
not set for external RX management frames handling.

Signed-off-by: Avraham Stern <avraham.stern@intel.com>
2016-04-24 23:11:13 +03:00
Ilan Peer
12de787527 tests: Fix error message in test_p2ps_connect_p2ps_method_4()
This fixes commit 2f0f69a9ec ('tests: Use
p2ps_provision() and p2ps_connect_pd() in p2ps_connect_p2ps_method()').

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
2016-04-24 23:00:44 +03:00
Ilan Peer
fed0a9f519 tests: Add couple of roam failure tests
1. Fail roaming to an AP which exceeded its number of allowed stations.
2. Fail roaming due to passphrase mismatch.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
2016-04-24 22:56:39 +03:00
Jouni Malinen
b3a27c8a30 tests: Remove unused eap_connect import
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-04-24 20:16:30 +03:00
Jouni Malinen
5a766accee tests: Convert Host() class to use list of arguments instead of string
It is better to use a list of command line arguments for the local
execution case and convert that to a space-separated string for the
remote case.

Signed-off-by: Jouni Malinen <j@w1.fi>
2016-04-24 20:16:30 +03:00
Janusz Dziedzic
2147b3a7f8 tests: Print traceback if test fails
This is useful in case we hit a problem in test code.

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
2016-04-24 20:16:30 +03:00
Janusz Dziedzic
5148b392ab tests: Use hapd from hostapd.add_bss()
Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
2016-04-24 20:16:30 +03:00
Janusz Dziedzic
6f334bf7a0 tests: Use hapd from hostapd.add_ap()
Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
2016-04-24 20:16:29 +03:00
Janusz Dziedzic
4063590525 tests: Use hapd from hostapd.add_ap() in start_ap_er()
Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
2016-04-24 20:16:29 +03:00
Janusz Dziedzic
63e6e62f23 tests: Use hapd from hostapd.add_ap() in TDLS
Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
2016-04-24 20:16:29 +03:00
Janusz Dziedzic
c8ef2f6ef4 tests: Pass apdev to HostapdGlobal() in ap_add_with_driver
This is needed for running the test with a remote host.

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
2016-04-24 20:16:29 +03:00
Janusz Dziedzic
3b3e26875a tests: Use hapd from hostapd.add_ap() in eap_connect()
Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
2016-04-24 20:06:17 +03:00
Janusz Dziedzic
50e49cd240 tests: Use hapd from hostapd.add_iface()
Since add_iface() now returns the correct hapd, just use it.

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
2016-04-24 19:26:25 +03:00
Janusz Dziedzic
dc6342de92 tests: Pass apdev to HostapdGlobal()
This can be used to work with remote hosts.

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
2016-04-24 19:26:11 +03:00
Janusz Dziedzic
1728a2e73c tests: Replace HostapdGlobal() + remove() with hostapd.remove_bss()
This can be used to work with remote hosts.

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
2016-04-24 19:25:12 +03:00
Janusz Dziedzic
b29c46beb9 tests: Use hostapd.add_ap() instead of HostapdGlobal() (DFS)
This makes the DFS test cases that use start_dfs_ap() more usable for
testing with remote hosts.

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
2016-04-24 19:25:06 +03:00
Janusz Dziedzic
01703a9f2f tests: Use hostapd.remove_bss() instead of HostapdGlobal() (WPS)
This makes ap_wps_twice more usable for testing with remote hosts.

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
2016-04-24 19:24:55 +03:00
Janusz Dziedzic
84f3f3a5e6 tests: Use hostapd.add_ap() instead of HostapdGlobal() (PSK)
This makes ap_cli_order more usable for testing with remote hosts.

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
2016-04-24 19:24:49 +03:00
Janusz Dziedzic
a3d3525442 tests: Remove HostapdGlobal() use from invalid_ap()
Pass apdev to instead of HostapdGlobal() to invalid_ap() to make the
dynamic AP test cases more useful for testing with remove hosts.

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
2016-04-24 19:24:44 +03:00
Janusz Dziedzic
4193b89750 tests: Remove direct HostapdGlobal() use
Use hostapd.add_ap() and hostapd.remove_bss() to avoid direct
HostapdGlobal() use in some of the dynamic AP test cases to make them
more usable for testing with remote hosts.

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
2016-04-24 19:23:22 +03:00
Janusz Dziedzic
fb1a7dccbf tests: Return hapd when add_bss() and add_iface() are used
Return hapd from add_bss() and add_iface() while we can next use it.

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
2016-04-24 16:18:50 +03:00
Janusz Dziedzic
625bf74436 tests: Pass apdev param to HostapdGlobal()
Pass apdev param to HostapdGlobal() to support operating with a remote
test host.

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
2016-04-24 16:18:49 +03:00
Janusz Dziedzic
9cd6f4c015 tests: Pass apdev to hostapd.add_bss()
Pass apdev param to hostapd.add_bss(). Kill hardcoded phy param and get
phy base on apdev. These are needed to support operation with a remote
test host.

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
2016-04-24 16:18:46 +03:00
Janusz Dziedzic
29444a0863 tests: Pass apdev to hostapd.add_iface()
Pass apdev param to hostapd.add_iface() to support operation with a
remote test host.

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
2016-04-24 11:58:55 +03:00
Janusz Dziedzic
369f712a40 tests: Pass apdev to hostapd.terminate()
Pass apdev dictionary to hostapd.terminate() to support operation with a
remote test host.

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
2016-04-24 11:51:06 +03:00
Janusz Dziedzic
c92ee957ca tests: Pass apdev to remove_bss()
We need this for remote host support. From apdev we can get
apdev['hostname'] and apdev['port'].

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
2016-04-24 11:47:03 +03:00
Jouni Malinen
49ae6ddbca tests: hostapd assocresp_elements
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-04-20 13:22:32 +03:00
Jouni Malinen
4a37c98fae tests: P2P_GROUP_MEMBER
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-04-19 00:43:01 +03:00
David Spinadel
51269b386a tests: Add RRM tests
1. Add tests for hostapd neighbor database and neighbor report and
   request. Remove the partial neighbor report request test from
   test_wpas_ctrl.py since they are now covered more completely in
   test_rrm.py.
2. Add LCI request test.
3. Add FTM range request signaling test. This covers only the control
   interface commands and measurement request/response exchange for now.
   Full end-to-end functionality requires support of station reporting
   RRM capability.

Signed-off-by: David Spinadel <david.spinadel@intel.com>
2016-04-17 18:32:18 +03:00
David Spinadel
bf767ac136 tests: Replace radio_measurements with rrm_neighbor_report
This moves neighbor report testing to use the new hostapd.conf
parameter.

Signed-off-by: David Spinadel <david.spinadel@intel.com>
2016-04-16 21:05:40 +03:00
David Spinadel
56de6fe4fe tests: Update NEIGHBOR_REP_REQUEST format
Use quotation marks to match the new SSID encoding format in the
NEIGHBOR_REP_REQUEST command. In this specific test case, the exact SSID
value did not make any difference for behavior. The previous version
ended up getting decoded as a hexstring after the NEIGHBOR_REP_REQUEST
format change. The new version goes back to the ASCII string version of
"abcdef".

Signed-off-by: David Spinadel <david.spinadel@intel.com>
2016-04-16 21:05:39 +03:00
Jouni Malinen
cb285151a9 tests: AP with open mode and STA poll
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-04-09 00:30:49 +03:00
Jouni Malinen
36533aff3c tests: hostapd disconnecting STA without transmitting Deauth/Disassoc
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-04-09 00:30:49 +03:00
Jouni Malinen
6545398aaa tests: AP with open mode and STA statistics
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-04-09 00:30:49 +03:00
Jouni Malinen
2d3525bed4 tests: VENDOR_ELEM 14 to add an IE into Probe Request frame
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-04-09 00:30:49 +03:00
Ilan Peer
235c56e708 tests: Modify test_hs20_filter
Modify the test cases to tests the Hotspot 2.0 filtering functionality
in wpa_supplicant, instead of testing only the kernel interface.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
2016-04-08 15:44:10 +03:00
Jouni Malinen
39881726d5 tests: RADIUS failure when adding MPPE keys
This is a regression test case for a radius_msg_add_mppe_keys() memory
leak on an error path.

Signed-off-by: Jouni Malinen <j@w1.fi>
2016-04-08 11:41:08 +03:00
Jouni Malinen
675c036fff tests: WPA2 with invalid PSK from RADIUS
This is a regression test case for a memory leak on a
decode_tunnel_passwords() error path.

Signed-off-by: Jouni Malinen <j@w1.fi>
2016-04-08 11:28:45 +03:00
Jouni Malinen
0307eebdb9 tests: Fix pyrad exception name in RADIUS test cases
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-04-08 11:28:19 +03:00
Jouni Malinen
601e55726c tests: Add P2P invitation coverage during p2p_find
The new persistent_group_peer_dropped3 test case is similar to
persistent_group_peer_dropped with the difference being in the
responding device (the one from which the persistent group information
is dropped) is not issued a separate P2P_LISTEN command and instead, a
single P2P_FIND is used through the exchange to verify that this
operation does not get stopped unexpectedly. This is a regression test
case to verify that P2P_PENDING_INVITATION_RESPONSE case ends up calling
p2p_check_after_scan_tx_continuation() in non-success case. It should be
noted that this is dependent on timing: Action frame TX request needs to
occur during the P2P_FIND Search phase (scan). As such, not every
execution of this test case will hit the previous issue sequence, but
that should be hit every now and then.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-04-07 21:10:10 +03:00
Janusz Dziedzic
41ba40e74d tests: Pass full apdev to add_ap() function (7)
Pass the full apdev to the add_ap() function instead of just ifname.
This allows us to handle also remote hosts while we can check
apdev['hostname'], apdev['port'].

This step (7) converts the cases where a local variable is used to store
apdev[#]['ifname'] before passing it as the argument to hostapd.add_ap().

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
2016-04-03 22:46:14 +03:00
Janusz Dziedzic
eb2af30ac2 tests: Pass full apdev to add_ap() function (6)
Pass the full apdev to the add_ap() function instead of just ifname.
This allows us to handle also remote hosts while we can check
apdev['hostname'], apdev['port'].

This step (6) converts the cases where apdevs[#]['ifname'] was used as
the argument to hostapd.add_ap().

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
2016-04-03 22:46:14 +03:00
Janusz Dziedzic
4a264a6fa1 tests: Pass full apdev to add_ap() function (5)
Pass the full apdev to the add_ap() function instead of just ifname.
This allows us to handle also remote hosts while we can check
apdev['hostname'], apdev['port'].

This step (5) converts the cases that use the start_ap_wpa2_psk() helper
function.

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
2016-04-03 22:46:14 +03:00
Janusz Dziedzic
afc26df29c tests: Pass full apdev to add_ap() function (4)
Pass the full apdev to the add_ap() function instead of just ifname.
This allows us to handle also remote hosts while we can check
apdev['hostname'], apdev['port'].

This step (4) converts the cases that call hostapd.add_ap() from a
helper function that got apdev[i] as an argument.

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
2016-04-03 22:46:12 +03:00
Janusz Dziedzic
5eee514de9 tests: Pass full apdev to add_ap() function (3)
Pass the full apdev to the add_ap() function instead of just ifname.
This allows us to handle also remote hosts while we can check
apdev['hostname'], apdev['port'].

This step (3) converts the cases that use the start_ap() helper
function.

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
2016-04-03 22:46:00 +03:00
Janusz Dziedzic
21aa8b7e3c tests: Pass full apdev to add_ap() function (2)
Pass the full apdev to the add_ap() function instead of just ifname.
This allows us to handle also remote hosts while we can check
apdev['hostname'], apdev['port'].

This step (2) converts the cases that use the add_ssdp_ap() helper
function.

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
2016-04-03 22:46:00 +03:00
Janusz Dziedzic
8b8a1864ff tests: Pass full apdev to add_ap() function (1)
Pass the full apdev to the add_ap() function instead of just ifname.
This allows us to handle also remote hosts while we can check
apdev['hostname'], apdev['port'].

This step (1) converts the cases where apdev[#]['ifname'] was used as
the argument to hostapd.add_ap().

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
2016-04-03 22:45:57 +03:00
Janusz Dziedzic
78b8319317 tests: Allow full apdev to be passed to add_ap() function
This allows the full apdev dict to be passed to the add_ap() function
instead of just ifname. This allows us to handle also remote hosts while
we can check apdev['hostname'], apdev['port']. The old style ifname
argument is still accepted to avoid having to convert all callers in a
single commit.

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
2016-04-03 22:32:26 +03:00
Jouni Malinen
07f0da3003 tests: EAP-SIM fast reauth with no-change SET_NETWORK
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-03-31 17:19:12 +03:00
Jouni Malinen
51761ba297 tests: SAE and bignum failures
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-03-28 01:59:23 +03:00
Jouni Malinen
4f6985de09 tests: SAE and pwe failure
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-03-27 21:45:11 +03:00
Jouni Malinen
03aac597a0 tests: RADIUS accounting with various security cases
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-03-27 21:26:19 +03:00
Jouni Malinen
fe6e56a21a tests: Suite B error cases for PMKID and MIC derivation
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-03-27 21:08:56 +03:00
Jouni Malinen
2ca502dc73 tests: WNM BSS transition management with various PHY types
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-03-27 20:57:32 +03:00
Jouni Malinen
803d01901b tests: DFS CAC functionality on channel 104 HT40-
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-03-27 20:30:40 +03:00
Jouni Malinen
dd73d9a843 tests: AP Channel Switch - invalid channel
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-03-26 22:53:58 +02:00
Jouni Malinen
0215543103 tests: Information element parsing OOM
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-03-26 22:53:58 +02:00
Jouni Malinen
4d2c287466 tests: Information element parsing - extra coverage
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-03-26 22:53:58 +02:00
Jouni Malinen
542c68a688 tests: QCA vendor element parsing
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-03-26 22:53:58 +02:00
Jouni Malinen
6849b3de8f tests: Invalid VHT 80 and 80+80 MHz configuration (seg0/seg1)
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-03-26 22:53:58 +02:00
Jouni Malinen
8742c81cc5 tests: HT40 co-ex scan and broken legacy/HT AP
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-03-26 22:53:58 +02:00
Jouni Malinen
ebd80f2d2e tests: HT40 on 5 GHz with disabled secondary channel
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-03-26 22:53:58 +02:00
Jouni Malinen
07a1e90487 tests: Fix FST cleanup if alloc_fail is not supported
The test cases fst_ap_start_session_oom and fst_setup_mbie_diff did not
clean up FST sessions properly in case alloc_fail failed due to missing
support for it in the build. This could result in abandoning attached
hostapd global control interface monitors and test case failures due to
the global control interface socket running out of output buffer.

Fix this by going through the cleanup steps even if alloc_fail raises
HwsimSkip exception.

Signed-off-by: Jouni Malinen <j@w1.fi>
2016-03-26 22:53:58 +02:00
Jouni Malinen
fb915d50fd tests: WNM BSS Transition Management and cfg80211 connect command
For now, this is not enforcing cfg80211 reassociation since the needed
changes do not yet exist in the upstream kernel. Once those changes are
accepted, the TODO note in the test case can be addressed.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-03-25 12:11:59 +02:00
Jouni Malinen
b495500fb1 tests: WNM BSS Transition Management and security mismatch
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-03-24 22:35:10 +02:00
Jouni Malinen
71666dc33a tests: Allow RC4-SHA failure in ap_wpa2_eap_fast_cipher_suites
This needs to be allowed with OpenSSL 1.1.0 since the RC4-based cipher
has been disabled by default.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-03-21 13:12:10 +02:00
Janusz Dziedzic
d4944fad72 tests: Improve debug logs in hostapd/wpasupplicant with remote commands
Show more info when we are using remote wpaspy and UDP-based control
interface.

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
2016-03-20 21:49:35 +02:00
Janusz Dziedzic
8ce4855b23 tests: hostapd.py/wpasupplicant.py use Host when executing commands
Execute commands using the Host class. This enables use of remote hosts
as well.

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
2016-03-20 21:49:26 +02:00
Janusz Dziedzic
2fa2671573 tests: Add remotehost.py and Host class
This class allows execution of commands on a remote hosts/machine. This
is based on ssh with authorized keys, so you should be able to execute
such commands without any password:

ssh <user>@<hostname> id

By default user is root.

Support for sync and async calls is included.

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
2016-03-20 21:49:24 +02:00
Jouni Malinen
557b52bf4a tests: Add CONFIG_VLAN_NETLINK=y to hostapd build configuration
This is needed for ap_vlan_tagged_wpa2_radius_id_change to pass. The
ioctl-based vlan_add() function does not use the vlan_if_name parameter
at all.

Signed-off-by: Jouni Malinen <j@w1.fi>
2016-03-20 19:54:57 +02:00
Jouni Malinen
5a34d359cd tests: Secure mesh network and PMKSA caching
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-03-20 18:24:29 +02:00
Jouni Malinen
865fa1e9ea tests: PMKSA cache control interface operations
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-03-20 18:06:03 +02:00
Jouni Malinen
2b5488a4e1 tests: Return result from WpaSupplicant::global_request() in all cases
The no self.global_iface case was not returning the result from the
self.request() case. While this is not really a path that is supposed to
be used, make it return the response since it is at least theoretically
possible to get here.

Signed-off-by: Jouni Malinen <j@w1.fi>
2016-03-20 11:08:12 +02:00
Jouni Malinen
8c9aa2bc8d tests: wpa_supplicant AP mode - open network and HT disabled
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-03-18 16:18:32 +02:00
Jouni Malinen
6c7fed4683 tests: EAP-SIM and check fast reauth with bssid change
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-03-16 19:46:27 +02:00
Jouni Malinen
8b29661192 tests: Accept "user@example.com" as user identity similarly to "user"
This is needed to allow updated Interworking behavior that adds the
realm to the EAP-Response/Identity value.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-03-11 21:06:15 +02:00
Jouni Malinen
71fd685fb8 tests: Set ocsp_stapling_response_multi in as2.conf
This keeps the as.conf and as2.conf more consistent.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-03-09 19:49:24 +02:00
Jouni Malinen
40ae4a2ff2 tests: Fix root_ocsp() for multi-OCSP test cases
Incorrect path and file name was used in the openssl command to generate
one of the OCSP responses. Also fix
ap_wpa2_eap_tls_intermediate_ca_ocsp_multi to expect success rather than
failure due to OCSP response. Based on the test description, this was
supposed to succeed, but apparently that root_ocsp() bug prevented this
from happening.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-03-09 19:48:35 +02:00
Johannes Berg
890fd60f7d tests: Add tests for HS 2.0 frame filtering
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2016-03-07 11:07:58 +02:00
Bob Copeland
fa7f9570f2 tests: Add a test for mesh gate forwarding
This test checks that mesh nodes forward frames for unknown
destinations to the mesh gates.

Signed-off-by: Bob Copeland <me@bobcopeland.com>
2016-03-07 11:05:22 +02:00
Jouni Malinen
dbd183c717 tests: D-Bus AssocStatusCode
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-03-06 20:54:16 +02:00
Janusz Dziedzic
c0ca24fc30 tests: Add hostapd.py helpers for various radio parameters
Add support for generating hostapd parameters for
b_only/g_only/a_only/HT20/HT40/VHT80.

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
2016-03-05 17:44:51 +02:00
Janusz Dziedzic
e3b36d420e tests: Add terminate support for hostapd/wpa_supplicant
Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
2016-03-05 17:44:51 +02:00
Janusz Dziedzic
4d48d44ca2 tests: Add HostapdGlobal.get_ctrl_iface_port()
This adds a method to get the UDP port for an interface.

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
2016-03-05 17:44:51 +02:00
Janusz Dziedzic
cb73f7e84d tests: Add UDP ctrl_iface support to hostapd.py
Allow use of a remote host using wpaspy.Ctrl with UDP ctrl_iface
support.

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
2016-03-05 17:44:51 +02:00
Janusz Dziedzic
0fd4792b48 tests: Add UDP ctrl_iface support to wpasupplicant.py
Allow use of a remote host using wpaspy.Ctrl with UDP ctrl_iface
support.

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
2016-03-05 17:44:51 +02:00
Ilan Peer
d4b521a38b tests: Handle different delays in discovery_and_interface_disabled
Test different delay intervals between the INTERFACE_DISABLED event
and the INTERFACE_ENABLED event for discovery_and_interface_disabled.

Previously, only a delay of 1 second was used, in which case the
scan results for the P2P_FIND operation were received after the
interface was enabled again, and the case the scan results were
received while the interface was disabled was not covered.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
2016-03-03 17:10:26 +02:00
Jouni Malinen
f1e26f8965 tests: BTM Request Preferred Candidate List followed by vendor element
This goes through parsing code for a case that was interpreted
incorrectly in the past.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-03-03 17:10:25 +02:00
Jouni Malinen
29b508e7dc tests: WPA2-Enterprise with EAP-GPSK and PTK rekey enforced by AP
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-03-02 17:11:38 +02:00
Jouni Malinen
cd18ec3b0a tests: GAS query with another AP while associated
This is without PMF to cover the case of Public Action frame to another
AP while associated.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-02-29 19:49:52 +02:00
Jouni Malinen
9961c70a85 tests: RADIUS Accounting interim update retry
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-02-29 17:43:13 +02:00
Michael Braun
186ca4736d tests: FT RRB internal delivery to non-WPA BSS
A malicious station could try to do FT-over-DS with a non WPA-enabled
BSS. When this BSS is located in the same hostapd instance, internal RRB
delivery will be used and thus the FT Action Frame will be processed by
a non-WPA enabled BSS. This processing used to crash hostapd as
hapd->wpa_auth is NULL.

This test implements such a malicious request for regression testing.

Signed-off-by: Michael Braun <michael-dev@fami-braun.de>
2016-02-28 17:45:45 +02:00
Michael Braun
a12b30f2d4 tests: RSN pre-auth and PMKSA caching with per_sta_vif
This adds new tests to verify pmksa_cache_preauth when
used with per_sta_vif and possibly vlans.

While at it it refactors the code such that the tests
  pmksa_cache_preauth
  pmksa_cache_preauth_vlan_enabled
  pmksa_cache_preauth_vlan_used
  pmksa_cache_preauth_per_sta_vif
  pmksa_cache_preauth_vlan_enabled_per_sta_vif
  pmksa_cache_preauth_vlan_used_per_sta_vif
share code where possible.

Signed-off-by: Michael Braun <michael-dev@fami-braun.de>
2016-02-28 15:43:24 +02:00
Michael Braun
78bb62b28c tests: Document tshark and python-netifaces as dependencies
tshark and python-netifaces are used by some tests.

Signed-off-by: Michael Braun <michael-dev@fami-braun.de>
2016-02-28 15:25:37 +02:00
Michael Braun
6556ddaf49 tests: Verify correct VLAN operation after reconnect
This adds a test case ap_vlan_reconnect. It connects, disconnects, and
reconnects a station in a VLAN. This tests for a regression with
wpa_group entering the FATAL_FAILURE state as the AP_VLAN interface is
removed before the group was stopped.

Signed-off-by: Michael Braun <michael-dev@fami-braun.de>
2016-02-28 15:25:33 +02:00
Michael Braun
3fdb5005f5 tests: Tagged-VLAN only change on reauthentication
Check VLAN ID change during reauthentication when using tagged-only
configuration.

Signed-off-by: Michael Braun <michael-dev@fami-braun.de>
2016-02-27 21:49:27 +02:00
Jouni Malinen
a6d48805f5 tests: P2PS connection with cfg80211 P2P Device
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-02-27 19:44:11 +02:00
Jouni Malinen
7c7fa52fe1 tests: p2p_device_nfc_invite with no separate group interface
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-02-27 19:37:19 +02:00
Jouni Malinen
cd9a0bd02f tests: P2P persistent group with cfg80211 P2P Device
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-02-27 19:37:19 +02:00
Jouni Malinen
ebbf660ca1 tests: P2P join-group using cfg80211 P2P Device
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-02-27 19:37:19 +02:00
Jouni Malinen
b17f8f1722 tests: P2P autogo using cfg80211 P2P Device
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-02-27 19:37:19 +02:00
Jouni Malinen
2335511463 tests: P2P group formation with driver using cfg80211 P2P Device
This extends the P2P Device testing coverage to include the newly
enabled option of using the primary interface (e.g., wlan0) for P2P
group operation instead of always forcing a separate group interface to
be created dynamically.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-02-27 19:37:19 +02:00
Jouni Malinen
1bef9e8729 tests: GAS query with another AP while associated and using PMF
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-02-27 19:37:19 +02:00
Jouni Malinen
1018bc99b7 tests: Multi-icon fetch with REQ_HS20_ICON
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-02-27 19:37:19 +02:00
Jouni Malinen
13a17a77a4 tests: WNM BSS Transition Management and scan behavior
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-02-26 17:19:21 +02:00
Jouni Malinen
452874a9df tests: MBO STA supported operating classes
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-02-24 12:31:09 +02:00
Jouni Malinen
46185f5bfd tests: MBO non-preferred channel list
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-02-22 21:17:38 +02:00
Jouni Malinen
cd54a3edac tests: WNM Sleep Mode - AP side OOM
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-02-22 19:53:05 +02:00
Jouni Malinen
85c7ea9b48 tests: MBO cellular data capability update with PMF required
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-02-22 19:53:05 +02:00
Jouni Malinen
c321652934 tests: MBO cellular data capability update
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-02-22 19:53:05 +02:00
Jouni Malinen
c24c144fc7 tests: WNM BSS Transition Management query
This tests BSS Transition Management Query frame generation with
candidate list and transmission of the following request and response
frames.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-02-22 19:53:04 +02:00
Avraham Stern
6605562af6 tests: MBO association disallowed indication
Add a test that verifies that no Association Request frame is sent to
APs that include the MBO IE with association disallowed attribute in
Beacon and Probe Response frames.

Signed-off-by: Avraham Stern <avraham.stern@intel.com>
2016-02-22 19:53:04 +02:00
Avraham Stern
85cc109ea6 tests: WNM BSS Transition Management with MBO IE
Add tests to verify that MBO IE in BSS Transition Management Request
frame is parsed correctly:

1. The MBO transition reason code is received by the MBO station.
2. The MBO cellular data connection preference is received by the
   MBO station.
3. The MBO station does not try to connect to the AP until the retry
   delay is over.

Signed-off-by: Avraham Stern <avraham.stern@intel.com>
2016-02-22 19:53:04 +02:00
Ilan Peer
edf46d7f41 tests: Enable CONFIG_MBO in hwsim configs
Signed-off-by: Ilan Peer <ilan.peer@intel.com>
2016-02-22 19:53:04 +02:00
Jouni Malinen
bccd22f356 tests: EAP-FAST protocol testing
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-02-20 18:25:13 +02:00
Jouni Malinen
d7ef6e6371 tests: Verify fast_max_pac_list_len=0 special case
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-02-20 10:06:02 +02:00
Jouni Malinen
20c48fd99b tests: Allow PIN generation failure during OOM in ap_wps_random_ap_pin
This is needed to avoid reporting failures after a change to remove the
fallback path in PIN generation.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-02-19 18:44:39 +02:00
Jouni Malinen
78dd5c11ac tests: Renew expired certificates
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-02-19 18:44:39 +02:00
Michael Braun
953aab8665 tests: Verify correct VLAN after RSN pre-authentication
This enhances the test pmksa_cache_preauth_vlan_used to check
connectivity in the correct VLAN bridge.

Signed-off-by: Michael Braun <michael-dev@fami-braun.de>
2016-02-17 11:46:13 +02:00
Michael Braun
732bbcc709 tests: Verify connectivity with untagged/tagged VLAN mixed configuration
Signed-off-by: Michael Braun <michael-dev@fami-braun.de>
2016-02-17 11:46:13 +02:00
Michael Braun
57af507ea7 tests: Untagged VLAN ID with EGRESS_VLANID RADIUS attribute
Signed-off-by: Michael Braun <michael-dev@fami-braun.de>
2016-02-17 11:46:13 +02:00
Michael Braun
571e690775 tests: STA assigned to vif under per_sta_vif
Signed-off-by: Michael Braun <michael-dev@fami-braun.de>
2016-02-17 11:46:13 +02:00
Michael Braun
a8c235ee62 tests: Verify ap_vlan_iface_cleanup_multibss with per_sta_vif
This adds a new test case to run ap_vlan_iface_cleanup_multibss with
per_sta_vif enabled.

Signed-off-by: Michael Braun <michael-dev@fami-braun.de>
2016-02-17 11:46:13 +02:00
Michael Braun
629d369674 tests: Verify tagged-only connectivity
Signed-off-by: Michael Braun <michael-dev@fami-braun.de>
2016-02-17 11:46:13 +02:00
Jouni Malinen
b333f53f6e tests: Fix eap_proto_sake_errors with OpenSSL 1.1.0
The use of the newer OpenSSL API in openssl_hmac_vector() removes one of
the memory allocations, so the TEST_ALLOC_FAIL here could not trigger.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-02-16 15:28:16 +02:00
Jouni Malinen
0918fe4dda tests: EAP state machine status information
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-02-07 21:26:15 +02:00
Jouni Malinen
2f60d1985f tests: Additional EAP-Finish local error coverage
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-02-07 21:05:02 +02:00
Jouni Malinen
7dbd2c6c69 tests: EAP Notification errors
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-02-07 21:01:06 +02:00
Jouni Malinen
b81e50cddb tests: EAP-Nak special cases
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-02-07 20:43:48 +02:00
Jouni Malinen
bd3948c0eb tests: Memory allocation failing for expanded EAP-Nak
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-02-07 20:35:35 +02:00
Jouni Malinen
3d85fd5a12 tests: EAP-Success/Failure prior to any EAP method
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-02-07 20:27:13 +02:00
Jouni Malinen
307993f770 tests: ERP init error case on allocation failure
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-02-07 20:16:04 +02:00
Jouni Malinen
fe28ed3f29 tests: Secure mesh network plink counting during reconnection
This verifies that num_plinks is decremented properly if a peer mesh STA
reconnects without closing the link explicitly.

Signed-off-by: Jouni Malinen <j@w1.fi>
2016-02-06 21:25:52 +02:00
Jouni Malinen
592790bf15 tests: Additional EAP-FAST PAC coverage
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-02-06 13:23:42 +02:00
Jouni Malinen
31dd315382 tests: PKCS#12 with extra certs on the server
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-02-06 01:14:43 +02:00
Jouni Malinen
93aa1e1621 tests: EAP-FAST and binary PAC errors
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-02-06 00:28:16 +02:00
Jouni Malinen
c599ddd124 tests: Allow fallback to 20 MHz in ap_ht40_5ghz_invalid_pair
This test case for enforcing that AP setup fails in case there is need
to fall back to 20 MHz channel due to invalid 40 MHz configuration.
Modify this to allow successful AP startup as long as 40 MHz channel
does not get enabled.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-02-05 17:51:24 +02:00
Jouni Malinen
561536205a tests: WNM BSS Transition Management with invalid operating class
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-02-05 17:07:48 +02:00
Jouni Malinen
d4c2860b6b tests: P2P persistent group re-invocation with peer having dropped info
This verifies that the persistent group information gets dropped based
on peer response (unknown group) and that a new group formation can be
completed after such invitation failure.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-02-02 13:27:32 +02:00
Jouni Malinen
a89faedc22 tests: EAP-TLS error cases
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-02-02 00:39:39 +02:00
Jouni Malinen
d4af4d275a tests: EAP-TLS protocol tests
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-02-02 00:24:36 +02:00
Jouni Malinen
504108dbdf tests: Generate new certificates for Suite B test cases
The previous version expired in January. The new ones are from running
ec-generate.sh and ec2-generate.sh again.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-02-02 00:09:20 +02:00
Jouni Malinen
c31302c038 tests: Verify that ip_addr_* gets written to config file
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-01-15 20:25:38 +02:00
Jouni Malinen
5a38a7fe43 tests: Roam between two WPA2-PSK APs and try to hit a disconnection race
This is a regression test case for hostapd bug where the
disconnection/deauthentication TX status callback timeout could be
forgotten after new association if no ACK frame was received and the STA
managed to reconnect within two seconds.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-01-15 19:34:58 +02:00
Jouni Malinen
fb3db14a6f tests: Fix EAP-SAKE error test case coverage
This was missing the second eap_sake_compute_mic() call in
eap_sake_process_confirm().

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-01-15 18:18:25 +02:00
Jouni Malinen
5b0ec907c1 tests: More EAP-MSCHAPv2 error coverage
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-01-15 17:42:13 +02:00
Jouni Malinen
eaef5861d7 tests: Fix wpas_ctrl_oom
The OpenSSL memory allocation changes broke this test case. Fix this by
removing the cases that do not get triggered anymore and add a separate
wpas_ctrl_error test case to cover the fail_test() versions of errors.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-01-15 16:27:13 +02:00
Jouni Malinen
1a6f86593b tests: Clean up eap_proto_ikev2
Use helper variable to indicate end of the test case instead of having
to use a fixed length of the loop.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-01-15 10:37:04 +02:00
Jouni Malinen
35372f6cd6 tests: EAP-IKEv2 with default fragment_size
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-01-15 10:36:41 +02:00
Jouni Malinen
7843ae4456 tests: More EAP-SIM and EAP-AKA local error coverage
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-01-15 01:15:11 +02:00
Jouni Malinen
7cbc8e6719 tests: fail_test instead of alloc_fail for aes_{encrypt,decrypt}_init
This is needed to fix ap_wpa2_eap_psk_oom, ap_wpa2_eap_sim_oom,
eap_proto_psk_errors, and ap_ft_oom with the new OpenSSL dynamic memory
allocation design.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-01-14 20:10:16 +02:00
Jouni Malinen
72a4c5ceb6 tests: Additional EAP-pwd error case coverage
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-01-14 12:12:14 +02:00
Jouni Malinen
d8e5a55f1e tests: WPS and EAP-WSC in network profile
This goes through some error paths that do not really show up in real
WPS use cases.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-01-13 22:08:04 +02:00
Jouni Malinen
992007c515 tests: Fix ERP anonymous_identity test cases
These need to be run without realm in the identity value to allow the
realm from the anonymous_identity to be used.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-01-13 22:03:23 +02:00
Jouni Malinen
6a95f5e2e4 tests: EAP-WSC protocol tests
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-01-13 22:03:23 +02:00
Jouni Malinen
4e34f56f3c tests: Renew the expired OCSP responder certificate
This certificate expired and that makes couple of test cases fail.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-01-13 00:38:29 +02:00
Jouni Malinen
dc441c0fc8 tests: EAP protocol tests for canned EAP-Success after identity
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-01-13 00:17:27 +02:00
Jouni Malinen
e70e16b5de tests: ERP and local error cases
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-01-13 00:17:27 +02:00
Jouni Malinen
1e22dc7428 tests: ERP and anonymous identity
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-01-13 00:17:27 +02:00
Jouni Malinen
c397edf2bb tests: EAP-SIM/AKA with external GSM/UMTS auth failing
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-01-08 18:04:29 +02:00
Jouni Malinen
40c654cc1d tests: EAP-SIM with external GSM auth and replacing SIM
These test cases verify that EAP-SIM with external GSM auth supports the
use case of replacing the SIM. The first test case does this incorrectly
by not clearing the pseudonym identity (anonymous_identity in the
network profile) while the second one clears that and shows successful
connection.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-01-08 18:03:11 +02:00
Jouni Malinen
447fb0b0da tests: Make eap_check_auth() error on missing selectedMethod clearer
It was possible to hit an error case in ap_wpa2_eap_in_bridge where the
selectedMethod STATUS field was not available. This resulted in not very
helpful "'selectedMethod'" message in the test log file. Make this
clearer by dumping all received STATUS fields and a clearer exception
message indicating that selectedMethod was missing.

Signed-off-by: Jouni Malinen <j@w1.fi>
2016-01-07 00:27:50 +02:00
Jouni Malinen
2626666ad7 tests: EAP-PAX local error cases
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-01-06 21:12:59 +02:00
Jouni Malinen
1e35aa15a4 tests: WPS and EAP-WSC error cases
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-01-06 20:57:31 +02:00
Jouni Malinen
2386bb9776 tests: EAP-OTP local error cases
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-01-06 20:21:29 +02:00
Jouni Malinen
ac713c0929 tests: WPA2-Enterprise connection using EAP-TTLS/EAP-GTC (OOM)
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-01-06 20:11:15 +02:00
Jouni Malinen
491e2d260d tests: EAP-EKE peer OOM in building ID message
The previous attempt at testing this path ended up selecting a different
wpabuf_alloc() call.

Signed-off-by: Jouni Malinen <j@w1.fi>
2016-01-06 20:05:11 +02:00
Jouni Malinen
79a3973c95 tests: WPA2-Enterprise connection using EAP vendor test (OOM)
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-01-06 20:01:59 +02:00
Jouni Malinen
8251be17be tests: Speed up discovery_group_client and nfc_p2p_client
There is no need for these to go through a full scan when the GO
operating channel is known.

Signed-off-by: Jouni Malinen <j@w1.fi>
2016-01-06 18:56:31 +02:00
Jouni Malinen
de8a45b6ce tests: Make P2P discovery on non-social channel cases more robust
The test cases discovery_ctrl_char_in_devname and discovery_group_client
tried to allow three P2P_FIND instances to be used before reporting an
error. However, this did not really work properly since the second and
third attempts would likely fail to start the initial special P2P_FIND
scan due to an already ongoing p2p_scan operation. Fix this by stopping
the previous P2P_FIND and waiting for the scan to complete if a retry is
needed.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-01-04 23:25:26 +02:00
Jouni Malinen
e114e999e0 tests: EAP-LEAP protocol tests (error paths)
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-01-04 18:11:28 +02:00
Jouni Malinen
656f11c732 tests: wpa_supplicant AP mode - unexpected P2P IE in Association Request
This verifies that there is no NULL pointer dereference when the AP code
processes Probe Request and (Re)Association Request frames with a P2P IE
in case P2P support is explicitly disabled on the AP mode interface.
This is a regression test case for the fixes in the previous commit.

Signed-off-by: Jouni Malinen <j@w1.fi>
2016-01-01 17:22:21 +02:00
Jouni Malinen
ff518fbd05 tests: WPS PIN provisioning with configured AP (WPA+WPA2)
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-01-01 13:42:04 +02:00
Jouni Malinen
d75fcb9760 tests: Use full prefix of the P2P-GO-NEG-FAILURE
Couple of waits for this event used the "GO-NEG-FAILURE" string instead
of the full event prefix. While this worked in the tests due to a
substring matching, it is better to use the full event prefix here.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-12-31 22:41:21 +02:00
Jouni Malinen
e4ab0d9034 tests: Do not dump pending events in p2p_go_neg_init timeout=0 case
It was possible for the dump_monitor() call to drop a P2P-GO-NEG-FAILURE
event that was indicated quickly after the P2P_CONNECT command was
issued. This could result in grpform_reject test case failing to see the
expected event and fail the test due to "Rejection not reported".

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-12-31 22:41:21 +02:00
Jouni Malinen
ecd07de40c tests: EAP-FAST and different TLS cipher suites
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-12-31 20:53:43 +02:00
Jouni Malinen
9353f07f3b tests: Clear BSS table at the end of rsn_ie_proto_eap_sta
rsn_ie_proto_eap_sta followed by eap_ttls_mschapv2_session_resumption
showed a failure case where the special RSNE from rsn_ie_proto_eap_sta
ended up remaining in a wpa_supplicant BSS entry and the SELECT_NETWORK
command used the previous scan results without checking for changed AP
configuration. This resulted in test failure due to RSN IE being claimed
to be different in EAPOL-Key msg 3/4. This is not really a real world
issue, but try to avoid false failure reports by explicitly clearing the
BSS table at the end of rsn_ie_proto_eap_sta.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-12-31 00:53:20 +02:00
Jouni Malinen
700c5d0b16 tests: P2P_LISTEN immediately followed by P2P_FIND
This verifies that the previous commit works correctly by forcing a
P2P_LISTEN command execution to be interupted by a P2P_FIND command
timed in a manner that forces it to show up before the kernel ROC has
started for the Listen.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-12-31 00:37:45 +02:00
Jouni Malinen
ce43836965 tests: GO Negotiation stopped after TX start
This verifies that P2P_STOP_FIND stops a pending offchannel TX wait in
the kernel by checking that a listen operation can be started in less
than a second after stopping a pending Action frame TX. This verifies
that the optimization introduced in the previous commit works properly.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-12-31 00:06:06 +02:00
Jouni Malinen
56dfb604a4 Revert "tests: vm: Output everything on console"
This reverts commit be9fe3d8af. While I
did manage to complete multiple test runs without failures, it looks
like this change increases full test run duration by about 30 seconds
when using seven VMs. The most visible reason for that seems to be in
"breaking" active scanning quite frequently with the Probe Response
frame coming out about 40 ms (or more) after the Probe Request frame
which is long enough for the station to already have left the channel.

Since this logging change is not critical, it is simplest to revert it
for now rather than make changes to huge number of test cases to allow
more scan attempts to be performed before timing out.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-12-30 21:51:52 +02:00
Jouni Malinen
412c60309a tests: Increase connection timeout for number of EAP test cases
The previously used 10 second timeout allowed only two scan attempts
(five seconds between scans) and it was possible to hit a failure every
now and then when running under heavy load and the Probe Response frame
got delayed by 40 ms or so twice in a row. Add more time for one more
scan attempt to reduce the likelihood of this happening.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-12-30 20:00:01 +02:00
Jouni Malinen
96425ea502 tests: Make scan test cases more robust by allowing retries
These test caases depended on a single active scan round finding the AP.
It is possible for the Probe Response frame to get delayed sufficiently
to miss the response especially when testing under heavy load with
multiple parallel VMs. Allow couple of scan retries to avoid reporting
failures from these test cases.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-12-30 19:52:42 +02:00
Jouni Malinen
dd4feaad2a tests: Make P2PS join-a-group cases more robust
Use the group SSID (if known) when requesting a join operation. This
makes some of the P2PS test cases more robust in cases where previously
executed tests have added older groups into the cached scan results with
the same MAC addresses and an incorrect BSS could have been picked
previously.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-12-30 19:14:40 +02:00
Jouni Malinen
8fb84690ae tests: Dump control interface sockets during FST operations
This makes it less likely to hit issues with running out of control
interface TX queue when running multiple FST test in a row. Number of
the FST operation sequences seemed to leave quite a few event messages
pending in one of the attached control interface sockets for wlan5 which
could result in test failure if the buffer space ran out and some of the
wpa_supplicant events were not delivered.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-12-30 13:54:18 +02:00
Jouni Malinen
4bc2ffaaf8 tests: Use logger.info() instead of print in FST test cases
It is better to get these messages into the actual debug log instead of
hoping they will be noticed from stdout.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-12-30 13:40:58 +02:00
Jouni Malinen
dafe0b6429 tests: Clean up at the end of connect_cmd_disconnect_event
This test case used to leave the dynamically added wlan5 interface in a
state where it was still trying to reconnect to a network. This could
result in the following test cases being unable to clear the cfg80211
scan cache. Avoid this type of issues by explicitly stopping the
connection attempt and making sure that there are no scan results in the
cache at the end of connect_cmd_disconnect_event.

The following test case sequence triggered a failure due to the
remaining BSS table entry:
connect_cmd_disconnect_event connect_cmd_wep ap_hs20_random_mac_addr

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-12-30 13:29:32 +02:00
Jouni Malinen
b90b3eab1f tests: Clear ignore_old_scan_res explicitly in test cases where it is used
This parameter is used only in couple of test cases and there is no need
to maintain the code to reset it in WpaSupplicant::reset().

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-12-28 17:48:01 +02:00
Jouni Malinen
49d51a0dcb tests: Clear p2p_pref_chan explicitly in test cases where it is used
This parameter is used only in couple of test cases and there is no need
to maintain the code to reset it in WpaSupplicant::reset().

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-12-28 17:43:46 +02:00
Jouni Malinen
db3070d289 tests: Clear p2p_go_intent explicitly in test cases where it is used
This parameter is used only in couple of test cases and there is no need
to maintain the code to reset it in WpaSupplicant::reset().

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-12-28 17:40:25 +02:00
Jouni Malinen
cf3a9d8f06 tests: Clear p2p_add_cli_chan explicitly in test cases where it is used
This parameter is used only in couple of test cases and there is no need
to maintain the code to reset it in WpaSupplicant::reset().

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-12-28 17:33:17 +02:00
Jouni Malinen
721ec02da5 tests: Clear p2p_no_go_freq explicitly in test cases where it is used
This parameter is used only in couple of test cases and there is no need
to maintain the code to reset it in WpaSupplicant::reset().

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-12-28 17:33:09 +02:00
Jouni Malinen
161c8515cc tests: Make ap_wps_probe_req_ie_oom more robust
It was possible to hit a race condition between WPS_CANCEL and
immediately following WPS_PIN command. Wait for a disconnection event to
avoid that. This was seen with the following test case sequence:
ap_wpa2_psk_supp_proto_wrong_group_key_len ap_wps_probe_req_ie_oom

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-12-28 17:21:08 +02:00
Jouni Malinen
33dfdcbae7 tests: wpa_supplicant AP mode with ACS
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-12-24 22:24:05 +02:00
Johannes Berg
be9fe3d8af tests: vm: Output everything on console
When running tests, make printk put all messages, including debug
messages, onto the serial console to go into the console file.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2015-12-24 21:27:24 +02:00
Jouni Malinen
0c8eacd1ab tests: EAP-TNC protocol tests
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-12-24 19:16:15 +02:00
Jouni Malinen
e85bb01998 tests: Move P2P-REMOVE-AND-REFORM-GROUP cases more robust
Wait for the AP-DISABLED and AP-ENABLED group events before reading the
current group operation frequency after P2P-REMOVE-AND-REFORM-GROUP.
This reduces a possibility of a race condition making a test case fail
with the returned frequency being 0 when reading this before the
reformed group is fully up. This may help avoid false error reports for
the following test cases: p2p_go_move_reg_change p2p_go_move_scm
p2p_go_move_scm_peer_supports p2p_go_move_scm_multi.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-12-24 13:40:54 +02:00
Jouni Malinen
44f4394296 tests: RADIUS Accounting and non-ASCII SSID
This shows an example of Called-Station-Id in Access-Request and
Accounting-Request with non-ASCII characters.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-12-24 12:19:41 +02:00
Jouni Malinen
52811b8c90 tests: EAP-TLS with intermediate CAs and OCSP multi
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-12-24 00:54:30 +02:00
Jouni Malinen
98d125cafa tests: Minimal testing of OCSP stapling with ocsp_multi
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-12-23 00:32:52 +02:00
Jouni Malinen
8adce07a73 tests: Add dh_file parameter for integrated EAP server
This is needed for number of EAP test cases at least when using the
internal TLS server implementation.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-12-22 17:51:54 +02:00
Jouni Malinen
3b6f3b37b8 tests: WPA2-Enterprise connection using EAP-EKE (many connections)
This tries to make it more likely to hit the special case of pub_len <
prime_len for additional code coverage.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-12-21 23:57:16 +02:00
Jouni Malinen
2fd377dea1 tests: EAP protocol tests with expanded header
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-12-21 23:31:15 +02:00
Jouni Malinen
47eac38a63 tests: Add AP Location Public Identifier into gas_anqp_extra_elements
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-12-21 11:56:56 +02:00
Jouni Malinen
f2dfb1dafa tests: GAS fragmentation and comeback delay
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-12-20 21:07:33 +02:00
Jouni Malinen
70f2a3f4ab tests: GAS fragmentation with mac80211_hwsim MCC enabled
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-12-20 21:07:33 +02:00
Jouni Malinen
35c146bc1b tests: Update gas_anqp_oom_hapd to match new implementation
Since wpa_supplicant is now retrying GAS comeback failures once, the
gas_anqp_oom_hapd test case started failing. Fix this by updating the
test case to expect success (on the retry).

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-12-20 21:07:33 +02:00
Jouni Malinen
f9a9304479 tests: Modify gas_malformed_comeback_resp to allow GAS retries
This is in preparation of a wpa_supplicant change to allow GAS retries
which can result in the previous test case design showing failures due
to "unexpected" management frames (GAS Initial Request from the retry).

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-12-20 21:07:33 +02:00
Jouni Malinen
d5f5d260b8 tests: EAP-PEAP phase1 TLS flags
This adds some more test coverage for phase1 parameters that had not
previously been included in any of the test cases.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-12-20 17:36:51 +02:00
Jouni Malinen
5382712518 tests: EAP-TTLS with unsupported Phase 2 EAP method in configuration
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-12-20 17:33:03 +02:00
Jouni Malinen
7cb27f89f2 tests: EAP-TLS and TLS Message Length in unfragmented packets
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-12-20 17:25:41 +02:00
Jouni Malinen
cef42a44e2 tests: EAP-TLS and config blob missing
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-12-20 17:25:41 +02:00
Jouni Malinen
02b4fb4057 tests: Speed up TNC test cases with the use of a single channel scan
There is no need for these test cases to run a full scan.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-12-20 17:25:41 +02:00
Jouni Malinen
7789070b95 tests: TNC PEAP-SoH local error cases
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-12-20 17:25:41 +02:00
Jouni Malinen
212d6a1732 tests: TNC TTLS local error cases
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-12-20 17:25:41 +02:00
Jouni Malinen
7c7234a583 tests: Fix scan result clearing in ssid_hidden*
These test cases were supposed to clear the cfg80211 and wpa_supplicant
scan caches in the end to avoid causing issues to the following test
cases. This did not work properly after introduction of the support for
aborting a pending scan. Fix this by using the flush_scan_cache()
function and waiting within the test case until the final scan operation
completes.

This issue was triggered by ssid_hidden/ssid_hidden2 followed by
ext_password_interworking (though, not every time).

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-12-20 17:25:41 +02:00
Jouni Malinen
bfdb90d40f tests: EAP-TTLS/MSCHAP with password hash
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-12-20 17:25:41 +02:00
Jouni Malinen
c44e499463 tests: EAP-TTLS local error cases
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-12-20 17:25:41 +02:00
Jouni Malinen
a551da6aae tests: EAP-PEAP local error cases
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-12-19 21:31:17 +02:00
Jouni Malinen
09a4404a33 tests: EAP-PEAP version forcing
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-12-19 20:59:14 +02:00
Jouni Malinen
81e1ab85bc tests: EAP-PEAP session resumption with crypto binding
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-12-19 20:23:51 +02:00
Jouni Malinen
09ad98c58a tests: EAP-PEAP with peap_outer_success=0
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-12-19 20:05:50 +02:00
Jouni Malinen
446dd7486c tests: REQ_HS20_ICON and DEL_HS20_ICON
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-12-19 18:34:01 +02:00
Ilan Peer
2e99239bd9 tests: Add rfkill tests for P2P Device operations
Add a couple of tests for rfkill with P2P Device operations
(with and without P2P Device interface).

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
2015-12-18 22:26:18 +02:00
Jouni Malinen
9f052d805d tests: Prepare ap_open_out_of_memory for modified rfkill init path
The rfkill initialization will be moved out from
wpa_driver_nl80211_drv_init() which would break one step in this OOM
test case due to the memory allocation not existing anymore. Fix this by
skipping that OOM step to avoid causing false failures with the
following commits.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-12-18 22:26:18 +02:00
Jouni Malinen
27f6b03115 tests: wpa_supplicant SIGNAL_MONITOR command
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-12-18 21:02:37 +02:00
Jouni Malinen
6e9554e307 tests: Detect invitation GO issues more quickly
This speeds up and clarifies error reporting for cases where the GO
fails to start in invitation.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-12-18 16:14:55 +02:00
Johannes Berg
05736da8c6 tests: vm: Honor EPATH in uevent.sh
This is useful for testing CRDA since it means you can use EPATH to
redirect the test scripts to a different crda binary.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2015-12-18 00:24:51 +02:00
Jouni Malinen
c4e06b9b7b tests: EAP-TTLS with invalid phase2 parameter values
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-12-18 00:24:51 +02:00
Jouni Malinen
d386a9ace8 tests: TDLS with VHT 80, 80+80, and 160
This adds more coverage for TDLS testing for a case where the direct
link should use various VHT channel bandwidths.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-12-17 21:20:02 +02:00
Jouni Malinen
7e40a8812b tests: Verify SIGNAL_POLL values in ap_vht80
This confirms that the station recognized and negotiated 80 MHz
channel use with VHT.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-12-17 21:20:02 +02:00
Jouni Malinen
138903f91f tests: Run OCSP test cases with internal TLS library
There is no sufficient OCSP support to go through these test cases.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-12-17 21:19:59 +02:00