Commit graph

1466 commits

Author SHA1 Message Date
Jouni Malinen
e51c8b2e97 tests: Make ap_wps_ap_scan_2 more robust
The test sequence "scan_and_bss_entry_removed ap_wps_ap_scan_2" resulted
in failure due to an old BSS entry remaining from the first test case to
the second and the WPS_PBC operation on a forced BSSID ending up picking
the incorrect BSS entry. Make this more robust by clearing the scan
results from cfg80211.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-06-18 22:33:48 +03:00
Jouni Malinen
492c3a9180 tests: Make ap_wps_pbc_overlap_2* less likely to cause issues
Both of these test cases were leaving out BSS entries with active PBC
mode at the end of the test. This could result in the next text case
failing, e.g., in "ap_wps_pbc_overlap_2ap grpform_ext_listen" and
"ap_wps_pbc_overlap_2sta grpform_ext_listen" sequences. Fix this by
flushing the scan results more carefully at the end of the PBC overlap
test cases.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-06-18 22:29:14 +03:00
Jouni Malinen
9f622398e4 tests: Print a command line to re-run failed test sequence
This makes it easier to test whether a specific test sequence results in
a reproducible test failure.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-06-18 21:39:24 +03:00
Jouni Malinen
7242b3df37 tests: P2PS with large number of services in Probe Request/Response
This verifies capability to split the response into multiple P2P
elements.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-06-18 18:14:04 +03:00
Jouni Malinen
3d7d9f18db tests: Extend P2PS service seek test to cover multiple services
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-06-18 18:14:04 +03:00
Max Stepanov
5a2c379736 tests: P2PS wildcard SD probe
Verify that advertiser returns 'org.wi-fi.wfds' wildcard in a Probe
Response frame if at least one P2PS advertisement is present.

Signed-off-by: Max Stepanov <Max.Stepanov@intel.com>
Reviewed-by: Ilan Peer <ilan.peer@intel.com>
2015-06-18 18:14:04 +03:00
Jouni Malinen
866eb800e5 tests: VENDOR_ELEM_ADD for various frames
This increases testing coverage for VENDOR_ELEM mechanism by explicitly
verifying that the requested element gets added to each of the supported
frame types.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-06-15 14:16:30 +03:00
Andrei Otcheretianski
a4c4c1d0e4 tests: Add p2ps_cli_probe and p2ps_go_probe tests
Test P2PS GO and CLI discoverability on group operating channel.
In order to implement these tests, refactor p2ps_connect_p2ps_method
and test_p2ps_connect_adv_go_pin_method to reuse the code for
connection establishment. Also change p2ps_exact_seek so it will
allow getting Probe Response frames from several peers.

Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
Reviewed-by: Ilan Peer <ilan.peer@intel.com>
2015-06-14 23:16:55 +03:00
Andrei Otcheretianski
d134a2868e tests: Fix inconsistent indentation
Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
Reviewed-by: Ilan Peer <ilan.peer@intel.com>
2015-06-14 23:16:55 +03:00
Andrei Otcheretianski
ce394d33e7 tests: Fix p2ps_connect_adv_go_pin_method case
test_p2ps_connect_adv_go_pin_method() expects that
p2ps_provision_keypad_method() returns P2PS-PROV-DONE with details
needed for a connection. However, this event was overridden which
resulted in an incorrect test flow skipping the connection
establishement. The test would pass, however, without really trying to
connect. Fix this by returning the correct event.

Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
Reviewed-by: Ilan Peer <ilan.peer@intel.com>
2015-06-14 23:16:55 +03:00
Jouni Malinen
dd025790e5 tests: IBSS on 5 GHz band
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-06-14 19:35:19 +03:00
Jouni Malinen
8cc9bc0775 tests: WNM BSS Transition Management in different countries
This increases testing coverage for ieee802_chan_to_freq*() functions.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-06-14 18:11:14 +03:00
Jouni Malinen
6d01255e57 tests: GAS/ANQP query and OOM
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-06-14 16:17:33 +03:00
Michael Braun
54cf411f4c tests: Verify correct VLAN operation in multi-BSS multi-VLAN case
This adds hwsim test ap_vlan_iface_cleanup_multibss. It connects two
stations in different BSS but the same hostapd process. First both
stations are in VLAN 1, then they get reauthenticated into VLAN 2. Due
to the ordering of the stations moving around, this test checks that
bridge and tagged interface referencing counting is done globally, such
that the tagged interface is not removed too early and no bridge is
left over.

Signed-off-by: Michael Braun <michael-dev@fami-braun.de>
2015-06-14 13:40:50 +03:00
Jouni Malinen
13b3497245 tests: D-Bus Reconnect command
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-06-14 11:38:14 +03:00
Jouni Malinen
c1e38fec75 tests: Make flush_scan_cache() more robust
There seem to be cases where flush_scan_cache() was unable to clear all
BSS entries due to a hidden SSID BSS (SSID length 0) showing up again
from cfg80211 BSS table. Check for this and run the flush operation
again if any entries remain.

This fixes an issue where the following hwsim test case sequence
resulted in the last test case failing due to the old BSS entry from the
first test case being in place and showing unexpected flags information:
ap_hs20_min_bandwidth_home_hidden_ssid_in_scan_res
ap_hs20_remediation_required
ap_mixed_security

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-06-12 21:28:14 +03:00
Jouni Malinen
ee19ba74cd tests: P2P GO and 5 GHz channels 165 (allowed) and 169 (disallowed) in US
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-06-12 20:54:01 +03:00
Jouni Malinen
c518fecc82 tests: Pending GAS query interrupted with deinit
These are regression test cases for a segmentation fault issue (use of
freed memory) where interface removal happened while a gas-query item
was pending.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-06-11 02:57:34 +03:00
Jouni Malinen
1a5041791e tests: Create a P2P persistent group with ADD_NETWORK
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-06-11 00:02:05 +03:00
Jouni Malinen
3a59cda1d0 tests: D-Bus WPS/PBC operation and signal for PBC overlap
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-06-10 20:51:30 +03:00
Jouni Malinen
ee120ff381 Remove [MU-BEAMFORMEE] option from hostapd vht_capab parameter
The standard hardcodes the MU Beamformee Capable subfield is hardcoded
to 0 when transmitting by an AP, so there is no need to provide a
configuration parameter for setting this to one.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-06-10 13:41:54 +03:00
Jouni Malinen
f5d5161db1 tests: Allow D-Bus GONegotiationRequest signal to include extra argument
This is needed to allow the GO Intent argument to be added without
breaking these test cases.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-06-06 18:16:19 +03:00
Jouni Malinen
d4518fe8ed tests: More WPA2-EAP + PMF test coverage
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-06-06 17:13:21 +03:00
Jouni Malinen
98c71cf6b5 tests: Control interface behavior on scan SSID parameter
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-06-05 15:55:26 +03:00
Jouni Malinen
d6f6a86a04 tests: wps_priority in configuration and WPS behavior
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-06-04 14:04:16 +03:00
Jouni Malinen
f572ae809a tests: D-Bus P2P Cancel
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-05-29 21:13:31 +03:00
Jouni Malinen
2a8e3f35ef tests: D-Bus WPS Cancel operation
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-05-29 21:00:02 +03:00
Jouni Malinen
be43588a3c tests: P2P group re-invocation with invitation response getting lost
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-05-29 13:34:22 +03:00
Jouni Malinen
571a1af270 tests: D-Bus FindStopped signal
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-05-25 18:31:09 +03:00
Jouni Malinen
efe353d1aa tests: UPDATE_BEACON to change vendor_elements at runtime
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-05-24 13:43:30 +03:00
Jouni Malinen
5e0bedc63c tests: EAP-EKE with server OOM
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-05-24 13:36:16 +03:00
Jouni Malinen
f7e3c17b68 tests: WPA2-Enterprise connection using EAP-EKE with serverid NAI
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-05-24 12:48:52 +03:00
Jouni Malinen
b4b2f300db tests: ERP with EAP-EKE
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-05-24 12:01:25 +03:00
Jouni Malinen
5748d1e5f8 tests: EAP-TTLS with server certificate valid beyond UNIX time 2^31
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-05-24 11:24:35 +03:00
Jouni Malinen
768ea0bc32 tests: DH params with 2048-bit key
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-05-24 11:03:42 +03:00
Jouni Malinen
75e41ab78a tests: Automatic channel selection with chanlist set
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-05-24 10:43:44 +03:00
Jouni Malinen
38ad1ea317 tests: Fix persistent_group_per_sta_psk for P2P Device case
The dev[1] <--> dev[2] data connectivity test was using incorrect
function. dev[2] is also using a P2P group and as such, can have a
different group interface.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-05-08 18:33:20 +03:00
Jouni Malinen
36e6633415 tests: Fix go_neg_with_bss_connected with P2P Device
Group interface name was fetched from the results of an incorrect group
formation and because of this, group removal failed in case P2P Device
is used and dev[1] ends up getting different group ifname for the
groups.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-05-08 18:33:16 +03:00
Jouni Malinen
f033200e94 tests: Add P2P Device support for persistent_group
The network operations need to use the global control interface to be
performed on the interface that stores the network profiles for
persistent groups.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-05-08 18:33:11 +03:00
Ben Rosenfeld
622ef15b77 tests: Update group_ifname after group start
After P2P-GROUP-STARTED event, use group_form_result in order to update
the group_ifname for the device. This is needed when using P2P Device
for managing P2P operations which results in a separate group interface
being used.

Signed-off-by: Ben Rosenfeld <ben.rosenfeld@intel.com>
2015-05-08 18:32:34 +03:00
Ben Rosenfeld
6f27f79084 tests: Use list_networks with p2p=true in test_p2p_channel
In case that there is a need to list the persistent P2P networks,
the global control interface needs to be used.

Signed-off-by: Ben Rosenfeld <ben.rosenfeld@intel.com>
2015-05-08 18:31:05 +03:00
Ben Rosenfeld
9766d403a6 tests: Change persistent_go_client_list to use global interface
Signed-off-by: Ben Rosenfeld <ben.rosenfeld@intel.com>
2015-05-08 18:30:45 +03:00
Ben Rosenfeld
85ef1f4345 tests: Use global interface in persistent_group_invite_removed_client
When removing a persistent P2P group, global interface needs to be used.

Signed-off-by: Ben Rosenfeld <ben.rosenfeld@intel.com>
2015-05-08 18:29:29 +03:00
Ben Rosenfeld
8e751cfa05 tests: Change list_networks() to use global interface with P2P
list_networks() always used the wlanX control interface to query for the
current list of networks. However, when a dedicated P2P Device is used,
the global control interface should be used when checking persistent
group network profiles.

Fix this by adding an optional parameter indicating that the P2P
networks are requested, and in such a case use the global control
interface.

In addition update test_p2p_persistent to use the argument when needed.

Signed-off-by: Ben Rosenfeld <ben.rosenfeld@intel.com>
2015-05-08 18:29:03 +03:00
Ben Rosenfeld
d7e2d79b1a tests: Change persistent_group_per_sta_psk to use global interface
This is required for cases that a dedicated P2P Device interface
is used and then the event will happen on the global interface.

Signed-off-by: Ben Rosenfeld <ben.rosenfeld@intel.com>
2015-05-08 18:27:25 +03:00
Ben Rosenfeld
cbeab59c9f tests: Change test_p2p_persistent to use the global control interface
Send request to set persistent_reconnect on the global control
interface so it would also work when using a dedicated P2P Device
interface.

Signed-off-by: Ben Rosenfeld <ben.rosenfeld@intel.com>
2015-05-08 18:27:04 +03:00
Ben Rosenfeld
cf5d768b33 tests: Change p2p_device_nfc_invite to use global interface
When testing P2P invitation flow, setting the NFC selector
should be done using the global control interface.

Signed-off-by: Ben Rosenfeld <ben.rosenfeld@intel.com>
2015-05-07 21:35:29 +03:00
Ben Rosenfeld
cc259e2650 tests: Change p2p_device_misuses() to use group interface
Calling "DISASSOCIATE" should be done on the group interface.

Signed-off-by: Ben Rosenfeld <ben.rosenfeld@intel.com>
2015-05-07 21:30:40 +03:00
Ilan Peer
6420643d45 tests: Skip some tests in P2PS when a dedicated P2P Device is used
Some tests in test_p2ps.py test a scenario where a separate P2P
group interface is not used. However, this is not a valid case
when a dedicated P2P Device interface is used, as in such a case
a separate group interface must be used.

Handle this by skipping such tests in case a dedicated P2P Device is
used.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
2015-05-07 21:19:38 +03:00
Ilan Peer
5cef80647e tests: Fix test_p2ps.py to save group results
Call group_form_result() whenever a new group is started, so that
group_ifname gets updated and later, the group can be removed when
needed.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
2015-05-07 21:17:31 +03:00