Commit graph

2295 commits

Author SHA1 Message Date
Jouni Malinen
4ef3325fb6 tests: Dynamic Interworking element update
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-09-08 19:48:44 +03:00
Jouni Malinen
30ee6cc436 tests: FTM capability indication
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-09-05 21:43:36 +03:00
Jouni Malinen
ff22993594 tests: VHT with 80 MHz channel width and use_sta_nsts=1
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-09-05 21:16:40 +03:00
Jouni Malinen
cb320a6d2d tests: Allow regdb missing some op classes in mbo_supp_oper_classes
Not all installed regdb files include channels for global operating
classes 121-123, and 129.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-08-22 19:22:01 +03:00
Jouni Malinen
d952f02136 tests: Make FST kill_pid() more robust
It looks like the attempt to read the process id from a PID file can
return empty data. This resulted in kill_pid() failing to kill the
process and all the following FST test cases using the extra interface
failing. While the PID file is really supposed to have a valid PID value
when we get this far, it is better to try multiple times to avoid
failing large number of test cases.

The current os_daemonize() implementation ends up calling daemon() first
and then writing the PID file from the remaining process that is running
in the background. This leaves a short race condition where an external
process that started hostapd/wpa_supplicant could end up trying to read
the PID file before it has been written.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-08-22 17:44:05 +03:00
Jouni Malinen
7509b550f6 tests: hostapd and ctrl_iface commands when BSS not yet fully enabled
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-08-22 17:44:05 +03:00
Jouni Malinen
548d280162 tests: IAPP and multiple BSSes
This verifies IAPP socket registration from multiple hostapd interfaces.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-08-18 20:07:17 +03:00
Jouni Malinen
6b6286eb78 tests: hostapd and MIB ctrl_iface command with open network
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-08-18 10:42:56 +03:00
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