History log of /external/autotest/server/cros/network/wpa_cli_proxy.py
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
9daf5972d65d60cc34ff25e09d4207aadfdbc723 03-Nov-2015 Roshan Pius <rpius@google.com> autotest(wifi): Use WPACliProxy for all wpa_cli invocations.

There are a bunch of different places where we invoke wpa_cli commands
in the server tests:
1. On the server side in wifi_client.py (|WifiClient.reassociate|).
2. On the client side in shill_xml_rpc_server.py
(|ShillXmlRpcDelegate.request_roam|) and wifi_proxy.py
(|WifiProxy.clear_supplicant_blacklist|).

Changes:
1. Move all of these invocations to one central place i.e WifiClient on the
server side and remove the associated XML RPC methods.
2. Invoke all wpa_cli commands using the WpaCliProxy instance
initialized in WifiClient. WpaCliProxy was formerly being used as a Shill XML
RPC server substitute on android devices. Now we're going to use this
class for running wpa_cli commands for Android, Brillo and Cros testing.

BUG=b:25432676
TEST=`test_that --board=$board $host network_WiFi_Reassociate` on both
Dragonboard and Cros device. (Tests |WifiClient.reassociate| method)
TEST=`test_that --board=$board $host network_WiFi_Prefer5Ghz` on Cros
device. (Tests |WifiClient.clear_supplicant_blacklist| method)
TEST=`test_that --board=$board $host network_WiFi_PMKSACaching` on Cros
device. (Tests |WifiClient.request_roam| method)

Change-Id: I339260401b882b4142c28e24df15038aca9c17f0
Reviewed-on: https://chromium-review.googlesource.com/310229
Commit-Ready: Roshan Pius <rpius@chromium.org>
Tested-by: Roshan Pius <rpius@chromium.org>
Reviewed-by: Christopher Wiley <wiley@chromium.org>
Reviewed-by: Roshan Pius <rpius@chromium.org>
/external/autotest/server/cros/network/wpa_cli_proxy.py
68a80074108f58e9d60c56bddd601125373f93c7 14-Jul-2015 Filipe Brandenburger <filbranden@chromium.org> autotest: Escape commands run under `adb shell`

This fixes problems such as checking the pid of commands put in
background by echoing the value of "$!". Without the proper escaping,
the value of "$!" would be expanded on the adb_host instead.

Correct an instance in WpaCliProxy running the set_network which tries
to insert literal double quotes and goes to some lengths trying to
"work around" the poor escaping.

The correct way of doing shell escaping would be to use single quotes
(which bypass all expansions and is safe for characters such as "$",
"`", backslash and double quotes) and replace existing instances of "'"
with the expression "'\''", which terminates the current string, inserts
a literal single quote (using backslash for escaping) and then starts a
new string.

However, such a change is too complex for this scope, so I will try to
propose that in a follow up instead.

BUG=chrome-os-partner:42310
TEST=Ran network_WiFi_SimpleConnect through adb successfully.
Ran suite:wifi_matfunc against a Samus in a wifi cage.

Change-Id: I260a20f2a344754790d509ea801d868965f2fe05
Reviewed-on: https://chromium-review.googlesource.com/285641
Reviewed-by: Filipe Brandenburger <filbranden@chromium.org>
Commit-Queue: Filipe Brandenburger <filbranden@chromium.org>
Tested-by: Filipe Brandenburger <filbranden@chromium.org>
/external/autotest/server/cros/network/wpa_cli_proxy.py
09d70cab68798b08b6a67f0e89f24638e56aee72 14-Jul-2015 Filipe Brandenburger <filbranden@chromium.org> autotest: Add a delete_entries_for_ssid() to WpaCliProxy

This new delete_entries_for_ssid() API was added after the latest
changes to WpaCliProxy, so bring it up to date by adding such a method
that disconnects from the specified WiFi network.

Use a simple stub on disconnect() which serves the same purpose.

BUG=chrome-os-partner:42310
TEST=Ran network_WiFi_SimpleConnect on an Android device, which will use
the WpaCliProxy.
Ran suite:wifi_matfunc against a Samus in a wifi cage.

Change-Id: I49a5ac0dcb5ce1570a227b243d1200880a66f136
Reviewed-on: https://chromium-review.googlesource.com/285640
Reviewed-by: Filipe Brandenburger <filbranden@chromium.org>
Commit-Queue: Filipe Brandenburger <filbranden@chromium.org>
Tested-by: Filipe Brandenburger <filbranden@chromium.org>
/external/autotest/server/cros/network/wpa_cli_proxy.py
825a74a46266c33a9ec6aff94a91a1408bf42dd9 22-Nov-2013 Christopher Wiley <wiley@chromium.org> autotest: Enable runnning WiFi tests on Android again

Add a stub of set_device_enabled() to WpaCliProxy so that
tests do not immediately fail in the initializatino of WiFiClient
when trying to make sure the device is enabled.

TEST=(some) WiFi tests pass again on Android.
BUG=chromium:313959

Change-Id: I464795a90be4c2644fa8be2a0bb9be3fc80f4a19
Reviewed-on: https://chromium-review.googlesource.com/177624
Tested-by: Christopher Wiley <wiley@chromium.org>
Reviewed-by: Paul Stewart <pstew@chromium.org>
Commit-Queue: Christopher Wiley <wiley@chromium.org>
/external/autotest/server/cros/network/wpa_cli_proxy.py
5ed45fa74ffbef5a6c820c00ace123e679c44151 09-Oct-2013 Christopher Wiley <wiley@chromium.org> autotest: Refine WpaCliProxy connect_wifi() logic

Internally, wpa_supplicant builds its scan_results reply in a 4K byte
buffer. However, with lots of APs, we can run out of space in the
buffer and not see our intended BSS. Tolerate this by short-circuiting
out of the discovery wait period if we discover that we've already
associated.

Also, not all routers happen to put us on a 192.168.0.0/16 subnet.
Don't hardcode that expectation.

BUG=chromium:305801
TEST=Had a successful interop run with these changes.

Change-Id: Ib85504fc0f521d79cef24342b821b7211841fd3e
Reviewed-on: https://chromium-review.googlesource.com/172502
Tested-by: Christopher Wiley <wiley@chromium.org>
Reviewed-by: Paul Stewart <pstew@chromium.org>
Commit-Queue: Christopher Wiley <wiley@chromium.org>
/external/autotest/server/cros/network/wpa_cli_proxy.py
21981fa0e7f55e1d073b039a5c9d213ffad5c09c 08-Oct-2013 Christopher Wiley <wiley@chromium.org> autotest: Log connection failure reasons

While here, reduce the log spam from WpaCliProxy for scanning stations.
With a lot of stations, this gets very annoying.

BUG=chromium:305002
TEST=Ran against local aps.

Change-Id: I345a5701071255fb4a1571a171259c8dcc32cd25
Reviewed-on: https://chromium-review.googlesource.com/172200
Tested-by: Christopher Wiley <wiley@chromium.org>
Reviewed-by: Kris Rambish <krisr@chromium.org>
Commit-Queue: Christopher Wiley <wiley@chromium.org>
/external/autotest/server/cros/network/wpa_cli_proxy.py
aa6155496d62c3936d97aca094739b835e9b9812 04-Oct-2013 Christopher Wiley <wiley@chromium.org> autotest: Make interop tests work on WpaCliProxy hosts

Since wpa_cli hosts don't have profiles, we can't manipulate profiles to
create a clean test context. Add a method init_test_network_state which
abstracts these details into platform specific operations.

The shill XMLRPC delegate simply returns False when it is unable to
disconnect from a given ssid. WpaCliProxy should do likewise rather
than complaining about missing keys in its created networks list.

TEST=Interop tests work against WpaCliProxy based hosts.
check11b still passes on a normal host.
BUG=chromium:302855

Change-Id: I5886df8154f46e3e1b43b325d2ac1a857cbaebc2
Reviewed-on: https://chromium-review.googlesource.com/171923
Tested-by: Christopher Wiley <wiley@chromium.org>
Reviewed-by: Paul Stewart <pstew@chromium.org>
Commit-Queue: Christopher Wiley <wiley@chromium.org>
/external/autotest/server/cros/network/wpa_cli_proxy.py
b460e1946b69653cef8e3ed64d3792025b67bf90 28-Sep-2013 Christopher Wiley <wiley@chromium.org> autotest: Add logic to sync times for Android hosts

TEST=syncing times at the beginning of WiFi tests now works correctly
on Android.
BUG=chromium:302855

Change-Id: I6351068bbdaed1ef9c8e836121ee119620ebf8e8
Reviewed-on: https://chromium-review.googlesource.com/171850
Tested-by: Christopher Wiley <wiley@chromium.org>
Reviewed-by: Paul Stewart <pstew@chromium.org>
Commit-Queue: Christopher Wiley <wiley@chromium.org>
/external/autotest/server/cros/network/wpa_cli_proxy.py
c25e967e1eb60d423f8f3f855fd06e4963efc0fd 16-Sep-2013 Christopher Wiley <wiley@chromium.org> autotest: Add wpa_cli_proxy.py

This file provides a class WpaCliProxy which acts like an XMLRPC proxy
for WiFi tests. Underneath however, this object just runs in the local
python process and interacts with the DUT through shell commands.

TEST=We are able to run network_WiFi_SimpleConnect.wifi_check11b
successfully against an ADBHost.
BUG=chromium:269134
CQ-DEPEND=CL:169884

Change-Id: I2b43b032dec26337623940544a43447c3f5853af
Reviewed-on: https://chromium-review.googlesource.com/170033
Reviewed-by: Christopher Wiley <wiley@chromium.org>
Tested-by: Christopher Wiley <wiley@chromium.org>
Commit-Queue: Christopher Wiley <wiley@chromium.org>
/external/autotest/server/cros/network/wpa_cli_proxy.py