Commit graph

57 commits

Author SHA1 Message Date
Jouni Malinen
05032725e1 tests: P2P client joining a group before having found GO Device Address
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-11-26 15:17:36 +02:00
Jouni Malinen
9464e0996e tests: P2P autonomous GO and no P2P IE in Probe Response scan results
autogo_scan verifies the special case where a Probe Response frame
without P2P IE has been received from a GO (e.g., due to a non-P2P
interface requesting a scan) and P2P information from a Beacon frame
needs to be used instead to determine that the group is persistent.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-10-25 19:37:17 +02:00
Jouni Malinen
9cb3413090 tests: Move P2P helper functions to a separate file
This makes it easier to import these into the P2P test scripts.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-10-25 19:37:17 +02:00
Jouni Malinen
4b9d79b66e tests: Make it less likely to overflow wlan5 control iface socket
Number of test cases did not read all control interface socket events
from the dynamically added wlan5 interface. This could result in hitting
maximum socket TX queue length and failures in the following test cases.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-10-04 01:42:42 +03:00
Ilan Peer
5590d2ecd1 tests: Fix autogo_pbc() waiting for WPS-PBC
Wait on the global control interface to support
configurations that use a dedicated P2P Device interface.

Note that the group interface cannot be used, as the group
interface name is not saved since no group was created.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
2015-06-19 10:59:01 +03:00
Ilan Peer
c0b57b241a tests: Use global and group control interface in test_p2p_autogo
This is required when a dedicated P2P Device is used.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
2015-06-19 10:46:17 +03:00
Jouni Malinen
cfbdb9958f tests: Increase wait timeout in autogo_m2d
The time before trying to associate with an AP that does not advertise
Selected Registrar TRUE is going to be incremented, so increase the
autogo_m2d timeout to avoid reporting incorrect errors due to missing
M2D events.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-04-24 17:55:32 +03:00
Jouni Malinen
eb9c155498 tests: P2P autonomous GO and many clients (P2P IE fragmentation)
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-03-14 10:58:17 +02:00
Jouni Malinen
bfc048b48f tests: P2P autonomous GO with large number of GO instances
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-03-01 22:36:53 +02:00
Jouni Malinen
6d0b447464 tests: P2P_FIND with freq parameter to scan a single channel
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-02-28 22:06:24 +02:00
Jouni Malinen
380f3a8ba1 tests: Make autogo_join_auto_go_neg more robust
This test cases used to fail if dev1 had seen dev0 as a GO in an earlier
test case, e.g., when running it after autogo_fail. Fix this by clearing
scan results on dev1 at the beginning of the test case.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-02-10 12:09:07 +02:00
Jouni Malinen
9177b0a8c9 tests: Successful P2P_CONNECT-auto cases
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-02-08 13:59:57 +02:00
Jouni Malinen
d2b84e430c tests: P2P_CONNECT-auto not finding GO
This is a regression test for an earlier bug that resulted in using
freed memory after a P2P group interface was removed as part of
fallback-to-GO-Negotiation in P2P_CONNECT-auto.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-02-08 13:35:49 +02:00
David Spinadel
bbcbbd3701 tests: Modify autogo_bridge test to use group interface
1. Add get_group_ifname() to wpasupplicant.py
2. Use the function to get the interface name for the bridge.

Signed-off-by: David Spinadel <david.spinadel@intel.com>
2015-02-07 15:37:13 +02:00
Ilan Peer
d4f2ba749e tests: Use group control interface in autogo
P2P-PRESENCE-RESPONSE is a group event, and thus need
to use the group control interface.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
2015-02-07 15:37:13 +02:00
Jouni Malinen
c4668009d0 tests: Remove unnecessary use of sudo from test cases
run-tests.py is running as root, so sudo does not need to be used
anymore from within each test case.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-02-07 15:37:13 +02:00
Ilan Peer
36f2818784 tests: Use get_bss() with ifname in autogo
Signed-off-by: Ilan Peer <ilan.peer@intel.com>
2015-02-05 13:48:40 +02:00
Ilan Peer
acd620258d tests: Modify autogo_legacy to use the group interface
Signed-off-by: Ilan Peer <ilan.peer@intel.com>
2015-02-05 13:38:10 +02:00
Jouni Malinen
81e787b750 tests: Convert test skipping to use exception
Instead of returning "skip" from the test function, raise the new
HwsimSkip exception to indicate a test case was skipped.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-01-08 22:43:47 +02:00
Jouni Malinen
5f35a5e27f tests: Add wait_connected() and wait_disconnected() helpers
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-20 13:10:09 +02:00
Jouni Malinen
777bbe7a3c tests: P2P_PRESENCE_REQ on group interface
This ends up using the special offchannel.c code path where a different
interface is selected for TX. In addition, the P2P-PRESENCE-RESPONSE
event is verified to be delivered on the group interface.

Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-14 15:47:04 +02:00
Jouni Malinen
c93b6706d2 tests: Additional P2P_REMOVE_CLIENT coverage
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-11 15:18:11 +02:00
Jouni Malinen
bf1b59731a tests: Additional P2P_PRESENCE_REQ coverage
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-11 15:18:11 +02:00
Jouni Malinen
dd15d44884 tests: P2P_GET_PASSPHRASE in P2P Client mode
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-08 21:15:26 +02:00
Jouni Malinen
ca9b78add8 tests: Additional coverage for P2P_PROV_DISC
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-08 21:13:17 +02:00
Jouni Malinen
934d5b0403 tests: P2P_GET_PASSPHRASE
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-08 11:42:07 +02:00
Jouni Malinen
d463c5566f tests: Additional coverage for SCAN_RESULTS and BSS entry flags
This increases wpa_supplicant_ie_txt(), print_bss_info(), and
wpa_supplicant_ctrl_iface_scan_result() testing coverage to include the
previously missing key management options.

Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-08 11:42:06 +02:00
Jouni Malinen
ee3f9f3837 tests: Optimize autogo test cases by removing unnecessary scans
Keep full channel scans in autogo for test coverage, but use single
channel scan in all other autogo* test cases to remove unnecessary
waiting that does not add any test coverage. This removes more than one
minute from the total test execution time.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2014-11-28 23:02:29 +02:00
Jouni Malinen
377babb205 tests: Fix autogo_bridge to clear autoscan setting
Previously, periodic autoscan could have been left running and that
could result in the following test cases failing in some cases.

Signed-off-by: Jouni Malinen <j@w1.fi>
2014-09-27 16:12:41 +03:00
Jouni Malinen
d885a0ba7c tests: P2P GO netdev in a bridge
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2014-09-01 16:27:27 +03:00
Jouni Malinen
4b15c3f256 tests: P2P GO channel preference and regulatory rule mismatch
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2014-08-26 17:57:26 +03:00
Jouni Malinen
31424fa732 tests: P2P passphrase length configuration
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-06-22 00:17:18 +03:00
Jouni Malinen
4221679233 tests: Verify P2P GO start when scan_req = MANUAL_SCAN_REQ
There was a bug in this code path that resulted in the
skip-scan-to-start-GO case to not actually skip the scan. It looks like
this could be hit at least when autoscan was enabled, but it is possible
that some other sequences could hit this as well.

Signed-off-by: Jouni Malinen <j@w1.fi>
2014-05-15 16:56:49 +03:00
Jouni Malinen
75ee44f2e6 tests: P2P group interface ifdown
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-04-15 01:16:32 +03:00
Jouni Malinen
8c7559ee8f tests: P2P GO issuing multiple credentials
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-04-13 11:46:26 +03:00
Jouni Malinen
f44c45ac7f tests: Verify STATUS-WPS passphrase on GO
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-04-07 00:56:04 +03:00
Jouni Malinen
ab18b03bb7 tests: GO selecting specific peer to join using PBC
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-04-07 00:56:04 +03:00
Jouni Malinen
0afb797e9b tests: WPS-M2D or WPS-FAIL while trying to join a group
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-04-06 12:58:35 +03:00
Jouni Malinen
5be9dcbb86 tests: Remove unnecessary interpreter line from most python files
Only run-tests.py is actually executed, so there is no need to specify
the interpreter in all the helper files and test script files.

Signed-off-by: Jouni Malinen <j@w1.fi>
2014-02-21 20:21:53 +02:00
Jouni Malinen
ad36d27d6a tests: Remove ignore_old_scan_res workaround
Now that wpa_supplicant requests the driver (cfg80211) to clear its scan
cache automatically after each BSS_FLUSH/FLUSH command, the previously
used ignore_old_scan_res workaround should not be needed for the hwsim
test cases anymore.

Signed-hostap: Jouni Malinen <j@w1.fi>
2014-01-03 08:59:59 +02:00
Jouni Malinen
984c5b96e3 tests: P2P Presence Request
Signed-hostap: Jouni Malinen <j@w1.fi>
2014-01-01 18:46:28 +02:00
Jouni Malinen
3a64d523fa tests: Increase test coverage on BSS command
Signed-hostap: Jouni Malinen <j@w1.fi>
2013-12-26 16:55:44 +02:00
Jouni Malinen
19ae1d0788 tests: Verify P2P operations with a separate group interface
This extends P2P test coverage to include the case of separate group
interface use with autonomous GO and group formation through GO
negotiation.

Signed-hostap: Jouni Malinen <j@w1.fi>
2013-11-24 15:32:52 +02:00
Jouni Malinen
393e90191e tests: Verify GO channel switch behavior
Signed-hostap: Jouni Malinen <j@w1.fi>
2013-11-17 17:46:23 +02:00
Jouni Malinen
c9aa430896 tests: Split run-tests.py logger info into per test case files
The run-tests.py -l argument does not take an argument value anymore.
Instead, debug output is directed to a separate file <test>.log for each
test case.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
2013-10-31 12:51:08 +02:00
Jouni Malinen
7ebf841fc5 tests: Test GO functionality with legacy STAs
Signed-hostap: Jouni Malinen <j@w1.fi>
2013-09-29 12:42:05 +03:00
Jouni Malinen
2c914e2464 tests: Use a helper function for waiting session termination
Signed-hostap: Jouni Malinen <j@w1.fi>
2013-09-01 21:35:10 +03:00
Jouni Malinen
672f3a72e4 tests: Extend test_autogo_2cli to test client removal
Signed-hostap: Jouni Malinen <j@w1.fi>
2013-09-01 21:35:10 +03:00
Jouni Malinen
dd850f4a11 tests: Make test_autogo validate group removal event on client
Use test_autogo to verify that P2P client is able to notice explicit
group session termination message from the GO. This would have caught
the regression in processing P2P deauthentication notifications.

Signed-hostap: Jouni Malinen <j@w1.fi>
2013-08-31 17:59:16 +03:00
Jouni Malinen
c7860beb52 tests: Use Wlantest class in test_autogo_tdls
Signed-hostap: Jouni Malinen <j@w1.fi>
2013-04-01 10:37:44 +03:00