Commit graph

45 commits

Author SHA1 Message Date
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
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
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
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
Jouni Malinen
dbd183c717 tests: D-Bus AssocStatusCode
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-03-06 20:54:16 +02:00
Jouni Malinen
be90370bd5 tests: Fix wpas_ctrl_country and dbus_country with valid db.txt
init=CORE was previously used due to invalid db.txt data for 00. For
now, allow both it and the new init=USER after fixed db.txt.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-12-12 12:45:30 +02:00
Jouni Malinen
1d32bc2c1c tests: Make dbus_wps_oom more robust
It was possible for the BSSs object property change signal to be
generated during the OOM test case for Get(). If that happened, the
signal was not sent out, but the following Get(BSSs) operation succeeded
unexpectedly which resulted in a test failure. Make this less likely to
happen by waiting 50 ms between the scan and Get(BSSs) operation. This
should be sufficient to cover most cases since wpa_supplicant uses 5 ms
timeout for D-Bus property changed updates.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-12-06 17:10:06 +02:00
Jouni Malinen
ce96e65cb7 tests: D-Bus vendor element operations
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-12-06 12:50:41 +02:00
Jouni Malinen
089e7ca372 tests: Skip dbus_connect_eap if altsubject_match is not supported
This test case fails with the current internal TLS client implementation
since the needed altsubject_match parameter is not yet supported.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-11-29 20:57:26 +02:00
Jouni Malinen
845d48c133 tests: Make dbus_p2p_group_idle_timeout more robust
This test case was failing if a PropertiesChanged signal for P2P peer
gets delivered from a previous test case. Avoid that by waiting for the
new group to be formed before processing any PropertiesChanged signals.

This failure was triggered by the following test case sequence:
dbus_p2p_two_groups dbus_p2p_group_idle_timeout

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-11-22 21:28:49 +02:00
Jouni Malinen
89a79ca2b9 tests: Force hw capability re-fetch at the end of dbus_connect_oom
This is needed since the forced OOM may have forced the cached
information to be invalid or dropped. This issue was hit with the
following hwsim test case sequence:
ap_interworking_scan_filtering fst_sta_config_llt_large dbus_connect_oom
wpas_ctrl_enable_disable_network

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-11-17 19:50:34 +02:00
Jouni Malinen
1992af115a tests: D-Bus P2P and InvitationReceived
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-11-17 19:50:34 +02:00
Jouni Malinen
2299b54383 tests: D-Bus SaveConfig
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-11-15 19:08:05 +02:00
Dan Williams
f0ef68892e tests: Add testcases for interface global properties
Signed-off-by: Dan Williams <dcbw@redhat.com>
2015-10-28 23:41:33 +02:00
Jouni Malinen
d679ab74a5 tests: D-Bus ExpectDisconnect
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-10-12 18:14:21 +03:00
Jouni Malinen
7966674d73 tests: Fix dbus_interface to restore P2P channel list to default
It was possible for the dbus_interface test case to leave the P2P
channel lists with 5 GHz channels enabled due to the special driver=none
case. This could make the following P2P test case fail due to selecting
an unexpected channel. Fix this by forcing P2P channel list update at
the end of the dbus_interface test case.

This was triggering with the following hwsim test case sequence:
dbus_interface p2ps_connect_adv_go_p2ps_method_group_iface.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-10-12 15:36:46 +03:00
Jouni Malinen
084780f1ca tests: D-Bus GroupFormationFailure signal
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-09-05 23:01:20 +03:00
Jouni Malinen
5a233fbdf0 tests: Regression test for D-Bus setting scan_freq and freq_list
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-08-28 00:20:30 +03:00
Jouni Malinen
035efb2c43 tests: Trigger failure on exceptions in the dbus_p2p_autogo thread
This makes the test case more robust in reporting failures.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-08-17 00:18:32 +03:00
Jouni Malinen
708ec753bc tests: ap_scan=2 AP mode operation and scan failure
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-08-11 21:48:55 +03:00
Jouni Malinen
6fad40df9e tests: Make dbus_p2p_group_termination_by_go more robust
Set peer_group_removed only if peer_group_added has already been set.
This fixes an issue where a propertiesChanged event triggered by an
earlier test case was able to get dbus_p2p_group_termination_by_go
terminated too early. This happened, e.g., with sequence
"dbus_p2p_two_groups dbus_p2p_group_termination_by_go".

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-08-03 18:52:10 +03:00
Jouni Malinen
5a21764994 tests: Avoid exception in dbus_p2p_two_groups
Only run peerJoined() steps once to avoid trying to use GetAll() on an
already removed group and double-removal of a group. This did not make
the test case fail, but the exception is printed out in pretty confusing
way to stdout, so better get rid of it.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-08-03 18:44:53 +03:00
Jouni Malinen
20fd8defa0 tests: D-Bus PropertiesChanged events on P2P Peer.Groups
Verify that Groups list for a P2P Peer gets updated properly on group
addition and removal (three different paths).

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-08-02 21:37:09 +03:00
Jouni Malinen
d9e2a057c8 tests: D-Bus AddNetwork and connection with WPA+WPA2-Enterprise AP
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-06-20 23:04:31 +03:00
Jouni Malinen
001c4bf5b3 tests: D-Bus RemoveClient()
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-06-19 13:07:03 +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
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
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
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
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
cb346b49d2 tests: Extend D-Bus test cases to cover separate P2P Device operations
Number of the P2P test cases through D-Bus commands were not prepared
for there being a separate group interface when the P2P Device concept
is used.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-04-29 20:44:23 +03:00
Jouni Malinen
9bbce25772 tests: D-Bus AddNetwork for AP mode
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-04-24 01:22:15 +03:00
Jouni Malinen
1d0a917f36 tests: D-Bus BSS interface and WPS Type values
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-04-13 15:09:23 +03:00
Jouni Malinen
53f4ed68ee tests: WPA2-PSK AP with passphrase only in memory
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-03-28 11:08:31 +02:00
Jouni Malinen
364e28c982 tests: Restore p2ps config_method in dbus_get_set_wps
This test case is modifying the list of enabled config_method values and
needs to restore "p2ps" option that is included by default. Without
this, P2PS executed after dbus_get_set_wps could fail.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-02-03 01:35:07 +02:00
Jouni Malinen
b4de353c85 tests: Import gobject in a way that allows failures
It looks like the gobject module does not get installed by default for
Python at least on Ubuntu server, so modify the D-Bus test case files to
import this in a way that allows other test cases to be run even without
gobject module being installed.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-01-18 12:50:20 +02:00
Jouni Malinen
fb9adae466 tests: Fix dbus_probe_req_reporting_oom if already registered
If dbus_probe_req_reporting was run before dbus_probe_req_reporting_oom,
the SubscribeProbeReq() method succeeded since the memory allocation
that was supposed to fail in the OOM test case was not even tried.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-01-17 12:39:00 +02:00
Jouni Malinen
2099fed400 tests: dbus_connect_eap to verify dNSName constraint configuration
This verifies that Certification signals include the expected
information on peer certificates and that dNSName constraint can be
configured based on that and is working both in matching and not
matching cases.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-01-14 15:45:18 +02:00
Jouni Malinen
0e126c6dca tests: Out-of-memory cases for D-Bus operations
This increases testing coverage on various error paths.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-01-09 02:46:26 +02:00
Jouni Malinen
795b6f57a8 tests: Additional D-Bus error path coverage
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-01-09 02:32:15 +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
51c5aeb42a tests: Convert "hwsim-SKIP" exception to use a custom class
This makes the design a bit cleaner for catching the exceptions.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-01-07 16:31:22 +02:00
Jouni Malinen
910eb5b525 tests: Import dbus module in a cleaner way
There is no need to use prepare_dbus() function to check whether the
dbus module can be imported.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-01-07 13:29:25 +02:00
Jouni Malinen
2ec82e67c1 tests: wpa_supplicant D-Bus interface
This adds new files with test cases to verify both the old and new
wpa_supplicant D-Bus interface.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-01-02 22:50:27 +02:00