Commit graph

124 commits

Author SHA1 Message Date
Jouni Malinen
fab49f6145 tests: Python coding style cleanup (pylint3 bad-whitespace)
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2019-03-16 18:52:09 +02:00
Masashi Honma
54c58f29c0 tests: Replace str.encode('hex') with binascii.hexlify() for python3
Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
Signed-off-by: Jouni Malinen <j@w1.fi>
2019-02-04 12:26:34 +02:00
Masashi Honma
cc02ce96cf tests: Explicit str/bytes conversion for socket operations for python3
Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
Signed-off-by: Jouni Malinen <j@w1.fi>
2019-02-04 12:26:33 +02:00
Masashi Honma
04fa9fc7fd tests: Decode Popen() output values for python3
Explicit conversion to str is needed here for python3 compatibility.

Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
2019-02-04 12:26:33 +02:00
Masashi Honma
89896c0008 tests: Use python3 compatible print statement
This patch is made by using 2to3 command.

$ find . -name *.py | xargs 2to3 -f print -w -n

Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
2019-01-26 12:37:25 +02:00
Masashi Honma
bab493b904 tests: Use python3 compatible "except" statement
This patch is made by using 2to3 command.

$ find . -name *.py | xargs 2to3 -f except -w -n

Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
2019-01-26 12:11:35 +02:00
Jouni Malinen
23c024b9c1 tests: Do not fail if driver supports power saving
Couple of "invalid value" tests started to fail now that mac80211_hwsim
actually accepts power save configuration. Fix these by running the same
command for more code coverage, but in a way that ignores the result of
the operation (succeeds with older kernel versions and fails with
newer).

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2018-05-04 23:56:32 +03:00
Jouni Malinen
2956fcc401 tests: Remove peerkey testing
This is in preparation of complete removal of the PeerKey functionality.

Signed-off-by: Jouni Malinen <j@w1.fi>
2017-10-16 02:03:47 +03:00
Jouni Malinen
1123bd4834 tests: wpa_supplicant get_pref_freq_list_override
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2017-02-16 12:08:22 +02:00
Jouni Malinen
065c3cb8d1 tests: wpa_supplicant SET relative RSSI
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2017-02-10 19:48:12 +02:00
Jouni Malinen
d85b1aa6de tests: More GET wifi_display coverage
Signed-off-by: Jouni Malinen <j@w1.fi>
2017-01-08 16:52:56 +02:00
Jouni Malinen
74582acc14 tests: wpa_supplicant SET tdls_trigger_control
Signed-off-by: Jouni Malinen <j@w1.fi>
2017-01-08 16:48:59 +02:00
Jouni Malinen
35b023b79a tests: wpa_supplicant SET radio_disabled
Signed-off-by: Jouni Malinen <j@w1.fi>
2017-01-08 14:54:01 +02:00
Jouni Malinen
22e0dade9a tests: wpa_supplicant SET lci error cases
Signed-off-by: Jouni Malinen <j@w1.fi>
2017-01-08 14:51:09 +02:00
Jouni Malinen
0c8d7b085c tests: wpa_supplicant BSS CURRENT command
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-12-21 12:46:14 +02:00
Jouni Malinen
c64b454a2f tests: Fix wpas_ctrl_sched_scan_plans without WPA_TRACE
This test case did not clear sched_scan_plans if alloc_fail() resulted
in skipping the test case. This would result in the following
autoscan_exponential and autoscan_periodic test cases failing.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-10-03 11:35:42 +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
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
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
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
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
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
David Spinadel
51269b386a tests: Add RRM tests
1. Add tests for hostapd neighbor database and neighbor report and
   request. Remove the partial neighbor report request test from
   test_wpas_ctrl.py since they are now covered more completely in
   test_rrm.py.
2. Add LCI request test.
3. Add FTM range request signaling test. This covers only the control
   interface commands and measurement request/response exchange for now.
   Full end-to-end functionality requires support of station reporting
   RRM capability.

Signed-off-by: David Spinadel <david.spinadel@intel.com>
2016-04-17 18:32:18 +03:00
David Spinadel
bf767ac136 tests: Replace radio_measurements with rrm_neighbor_report
This moves neighbor report testing to use the new hostapd.conf
parameter.

Signed-off-by: David Spinadel <david.spinadel@intel.com>
2016-04-16 21:05:40 +03:00
David Spinadel
56de6fe4fe tests: Update NEIGHBOR_REP_REQUEST format
Use quotation marks to match the new SSID encoding format in the
NEIGHBOR_REP_REQUEST command. In this specific test case, the exact SSID
value did not make any difference for behavior. The previous version
ended up getting decoded as a hexstring after the NEIGHBOR_REP_REQUEST
format change. The new version goes back to the ASCII string version of
"abcdef".

Signed-off-by: David Spinadel <david.spinadel@intel.com>
2016-04-16 21:05:39 +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
eaef5861d7 tests: Fix wpas_ctrl_oom
The OpenSSL memory allocation changes broke this test case. Fix this by
removing the cases that do not get triggered anymore and add a separate
wpas_ctrl_error test case to cover the fail_test() versions of errors.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-01-15 16:27:13 +02:00
Jouni Malinen
27f6b03115 tests: wpa_supplicant SIGNAL_MONITOR command
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-12-18 21:02:37 +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
c00f19061c tests: wpa_supplicant sched_scan_plans parsing
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-11-30 14:03:29 +02:00
Jouni Malinen
c5ef7bbfa5 tests: Fix wpas_ctrl_oom with the internal TLS implementation
One of the OOM cases does not apply for internal crypto implementation.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-11-29 20:43:44 +02:00
Jouni Malinen
c675f669c3 tests: Fix wpas_ctrl_network without SAE
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-11-29 20:38:34 +02:00
Jouni Malinen
05bc2b44c1 tests: INTERFACE_ADD create testing coverage
This covers an invalid interface type and interface type 'sta'.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-11-22 17:59:54 +02:00
Ilan Peer
061190308d tests: wpa_supplicant interface creation in AP mode
Add a test case that creates a new interface in AP mode.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
2015-11-22 17:54:07 +02:00
Jouni Malinen
d0f56772ea tests: Fix wpas_ctrl_network for builds without Suite B support
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-11-02 00:30:00 +02:00
Jouni Malinen
1720ff58ec tests: More SET_CRED coverage
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-11-01 01:03:45 +02:00
Jouni Malinen
dd5e61b4d8 tests: Additional SET_NETWORK coverage
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-11-01 00:46:09 +02:00
Jouni Malinen
4128f53d8b tests: Additional wpa_supplicant SET ctrl_iface command coverage
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-11-01 00:28:35 +02:00
Jouni Malinen
3392a90dec tests: Clear config_methods at the end of wpas_ctrl_set_wps_params
It was possible for dev[2] to be left with non-default config_methods
parameter at the end of the test case and that could result issues in
following test cases. This hit a failure in the following sequence:
wpas_ctrl_set_wps_params p2ps_channel_active_go_and_station_same

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-10-31 21:56:59 +02:00
Avraham Stern
c5d070f249 tests: Set MAC address in wpas_ctrl_interface_add2 test
mac80211_hwsim only supports 2 different MAC addresses.
Configurations that use a dedicated P2P Device interface already
use these 2 addresses, so adding another interface on the same
PHY results in a duplicated MAC address.

Fix this by changing the MAC address of the added interface to make
sure the new interface has a unique MAC address.

Signed-off-by: Avraham Stern <avraham.stern@intel.com>
2015-10-16 20:26:48 +03:00
Jouni Malinen
35d2e24bc7 tests: Read monitor events explicitly in wpas_ctrl_interface_add_many
This test case ended up hitting control socket output queue limit
unnecessarily due to the test script not reading pending event messages.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-10-04 18:52:38 +03:00
Jouni Malinen
d9052150eb tests: wpa_supplicant control socket and event burst
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-10-04 18:52:38 +03:00
Jouni Malinen
6b86872a7c tests: Control interface output buffer limit
This verifies wpa_supplicant behavior in number of cases where the
external program opening a control interface socket does not behave
properly.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-08-14 21:21:00 +03:00
Jouni Malinen
492f007ec5 tests: Various wpa_supplicant ctrl_iface OOM cases
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-08-08 23:52:43 +03:00
Jouni Malinen
ccfe3e5db9 tests: wpa_supplicant ctrl_iface network OOM in string parsing
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-07-19 23:07:04 +03:00
Jouni Malinen
523061996c tests: wpa_supplicant control interface wait for client
This test case is also adding code coverage for process daemonizing and
Linux tracing.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-07-19 23:07:04 +03:00
Jouni Malinen
5b0afb0a29 tests: UUID parsing error cases
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-07-19 22:04:50 +03:00
Jouni Malinen
2531dc9f6b tests: wpa_supplicant ctrl_iface DUP_NETWORK (global)
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-07-16 18:26:16 +03:00
Jouni Malinen
1275208c82 tests: Update wpas_ctrl_network to match removal of WEP as group cipher
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-06-20 23:04:31 +03:00
Ben Rosenfeld
2e96aef298 tests: Wait on the global control interface for CTRL-EVENT-REGDOM-CHANGE
The event is not interface specific, so wait for it on the global
control interface socket.

Signed-off-by: Ben Rosenfeld <ben.rosenfeld@intel.com>
2015-06-19 11:31:53 +03:00