Commit graph

68 commits

Author SHA1 Message Date
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
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
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
faee294f1e tests: P2P GO Negotiation special cases
These test cases verify behavior with parallel scan operations while
going through GO Negotiation and duplicated GO Negotiation Request frame
RX with not-yet-ready sequence in GO Negotiation.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-10-15 21:31:40 +03:00
Jouni Malinen
24b7f2822e tests: More WPS/HTTP test coverage
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-08-31 17:25:20 +03:00
Jouni Malinen
6e9220160c tests: P2P group formation response during p2p_find
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-08-15 00:15:57 +03:00
Jouni Malinen
a0e117c684 tests: P2P extended listen timing operations
This verifies P2P extended listen timing operations by confirming that a
peer is not discoverable during the provisioning step and that the peer
becomes discoverable after having removed the group during such
provisioning step. The latter case was broken until the 'P2P: Cancel
group formation when deleting a group during group formation' commit.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-08-02 21:37:10 +03:00
Avraham Stern
99b83d0abd tests: Fix grpform_wait_peer group removal in P2P Device case
Get the P2P group interface name so it will be used for group removal to
support configurations that use a dedicated P2P Device interface.

Signed-off-by: Avraham Stern <avraham.stern@intel.com>
2015-06-19 11:28:20 +03:00
Jouni Malinen
ec1c483de0 tests: Not ready for GO Negotiation (listen/search)
These test cases verify that P2P_FIND and P2P_LISTEN operation continues
after having replied to GO Negotiation Request frame for which we are
not yet ready (i.e., GO Negotiation Response with status=1).

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-03-01 22:36:52 +02:00
Jouni Malinen
dcd378ed2e tests: Make grpform_no_wsc_done more robust
It was possible for this test case to start a new group formation on
dev[1] while the first round was still going through the process of
processing group termination indication. That could result in the second
round failing unexpectedly.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-02-28 16:57:03 +02:00
Jouni Malinen
c62bd5e44d tests: Remove forgotten debug print from grpform_pbc_overlap
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-02-07 15:38:29 +02:00
Ilan Peer
5270b2fbb7 tests: Use the global control interface in test_p2p_grpform
Signed-off-by: Ilan Peer <ilan.peer@intel.com>
2015-02-05 13:48:35 +02:00
Ilan Peer
c282b9b40e tests: Use global_request for SET commands in test_p2p_grpform
When the 'SET' command is used to configure parameters related to P2P
operation use the global control interface and not the per interface one
as otherwise the setting will only have effect on the interface and will
work if a dedicated P2P_DEVICE is used.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
2015-02-05 13:38:10 +02:00
Jouni Malinen
12a793a606 tests: Increase grpform_ext_listen coverage
Include actual extended listen period in the test and confirm that the
device was available on a social channel during such period by using
non-social operating channel.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-02-03 16:43:02 +02:00
Jouni Malinen
1f53fe0310 tests: P2P group formation using PBC multiple times in a row
This verifies that PBC session overlap detection does not get indicated
when forming the group with the same peer multiple times.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-01-22 20:53:03 +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
a69d0cdc72 tests: Merge grpform_cred_ready_timeout test cases into a single one
These test cases had a long 120 seconds wait for the GO Negotiation
initiator to time out. This can be done using two devices in parallel to
save two minutes from total test execution time.

Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-22 15:54:30 +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
1eaeb7fbaa tests: P2P_UNAUTHORIZE to unauthorize a peer
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-14 02:28:03 +02:00
Jouni Malinen
7387532549 tests: Additional coverage for P2P_EXT_LISTEN
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-11 15:18:11 +02:00
Jouni Malinen
edd1dfb2bd tests: Invalid P2P_REJECT command
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-08 21:15:26 +02:00
Jouni Malinen
450e584f04 tests: Additional P2P_CONNECT coverage
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-08 18:21:48 +02:00
Jouni Malinen
061c55a232 tests: Check STATUS mode field during P2P group formation
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-08 11:07:56 +02:00
Jouni Malinen
243dcc4ae4 tests: Add a helper function for clearing scan cache
This makes it more convenient and consistent to clear the cached scan
results from cfg80211 and wpa_supplicant.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2014-12-01 12:20:53 +02:00
Jouni Malinen
3e473674f7 tests: P2P_FIND continuing after GO Negotiation failure
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2014-11-19 16:59:11 +02:00
Jouni Malinen
0ee41e866c tests: GO Negotiation and timeout while waiting for peer
grpform_cred_ready_timeout2 is similar to the grpform_cred_ready_timeout
test case with the difference being in initiating a P2P_FIND operation
during the wait.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2014-10-29 12:52:51 +02:00
Jouni Malinen
42a4ba2865 tests: Group formation wait for peer with driver increasing ROC duration
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-10-25 21:46:39 +03:00
Jouni Malinen
fbb79f94eb tests: Allow time for go_neg_pbc() GO Neg Resp to go out
It was possible for the not-pre-authorized GO Negotiation case to end up
starting new GO Negotiation before the GO Negotiation Response frame
with status=1 was transmitted. While this works for group formation, it
could reduce test coverage for the common case where that response is
received. At a small sleep to make it less likely for this unexpected
sequence to happen during testing.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2014-10-23 16:33:25 +03:00
Jouni Malinen
b43ac5d5ab tests: P2P group formation with WSC_Done missing
This verifies that GO is able to complete group formation even if the
P2P Client does not send WSC_Done message (or that message is dropped
for any reason) in case the P2P Client completes 4-way handshake
successfully.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2014-10-10 18:40:57 +03:00
Jouni Malinen
3051c9866b tests: Verify P2P GO Negotiation wait-for-ready timeout
This verifies that the wait for peer to be ready for GO Negotiation is
timed out properly at no less than 120 seconds. Since this is a long
test case, it is disabled by default without the --long option.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2014-05-15 23:58:10 +03:00
Jouni Malinen
16dffef1e6 tests: Work around grpform_pbc_overlap robustness issues
Since P2P Client scan case is now optimzied to use a specific SSID, the
WPS AP will not reply to that and the scan after GO Negotiation can
quite likely miss the AP due to dwell time being short enoguh to miss
the Beaco frame. This has made the test case somewhat pointless, but
keep it here for now with an additional scan to confirm that PBC
detection works if there is a BSS entry for a overlapping AP.

Signed-off-by: Jouni Malinen <j@w1.fi>
2014-05-15 16:56:49 +03:00
Jouni Malinen
80abf06244 tests: P2P group interface removed due to GO Negotiation failure
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-04-13 10:26:53 +03:00
Jouni Malinen
28cd90091e tests: P2P group idle timeout on GO
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-04-13 10:26:53 +03:00
Jouni Malinen
d7d7843430 tests: Prevent grpform_pbc_overlap_group_iface failures
Do not report missing PBC overlap detection as an issue in this test
case since the sequence can miss the overlap due to per-SSID scan used
during group formation. In addition, increase AP beaconing frequency to
make it more likely for a Beacon frame to be seen during the optimized
scan.

Signed-off-by: Jouni Malinen <j@w1.fi>
2014-03-30 20:57:40 +03:00
Jouni Malinen
b2036fed9d tests: Make grpform_pbc_overlap* more likely to clear state
The PBC overlap state could remain for the next test case and result in
unexpected failure reports.

Signed-off-by: Jouni Malinen <j@w1.fi>
2014-03-30 18:21:58 +03:00
Jouni Malinen
095ded5dd5 tests: Verify PBC overlap detection during P2P group formation
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-03-28 23:02:45 +02:00
Jouni Malinen
e59aa78240 tests: Go to listen state in go_neg_pin_authorized
Previusly, the responding device was left in p2p_find state as a
consequence of using discover_peer() if the peer was not already known.
This was not the sequence that was supposed to be used here. Go to
listen-only state when waiting for the peer to initiate a previously
authorized GO Negotiation.

Signed-off-by: Jouni Malinen <j@w1.fi>
2014-03-15 19:04:31 +02:00
Jouni Malinen
b89c43d36a tests: Group formation and two peers at the same time
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2014-03-05 22:40:28 +02:00
Jouni Malinen
7e6ca8a534 tests: Extended listen timing in GO Negotiation messages
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2014-03-05 22:40:28 +02:00
Jouni Malinen
0e67482427 tests: P2P GO Negotiation with PBC vs. PIN
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2014-03-05 22:40:28 +02:00
Jouni Malinen
08e4bd8751 tests: PD-before-GO-Neg workaround
Signed-off-by: Jouni Malinen <j@w1.fi>
2014-03-05 12:00:20 +02: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
99fa65bc28 tests: Verify peer discovery in no-Probe Request case
Verify that PD Request followed by GO Negotiation Request is enough to
learn the Listen frequency of the peer.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
2014-01-17 19:38:02 +02:00
Jouni Malinen
a06b1070d8 tests: P2P_REJECT to reject GO Negotiation Request frames
Signed-hostap: Jouni Malinen <j@w1.fi>
2014-01-07 10:45:12 +02:00
Jouni Malinen
2db832b1e6 tests: Negative test case for P2P group formation with incorrect PIN
Signed-hostap: Jouni Malinen <j@w1.fi>
2014-01-07 10:45:12 +02:00
Jouni Malinen
0c35b91c5f tests: Cleaner error processing for threads
When a thread is used to follow P2P group formation progress, it is
better to return a clear failure indication from the thread instead of
allowing an exception to be thrown from the thread.

Signed-hostap: Jouni Malinen <j@w1.fi>
2014-01-07 10:45:11 +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
41af1305d7 tests: Add test cases for concurrent P2P operations
Signed-hostap: Jouni Malinen <j@w1.fi>
2013-11-24 21:20:15 +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