History log of /external/autotest/client/common_lib/cros/dbus_send.py
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
4df0c19683f40fd0554edebf9db70d56bb2015b5 29-Jan-2018 Xiaochu Liu <xiaochu@chromium.org> platform_AddPrinter: fix dbus_send and use it

dbus_send module assumes output of dbus-send command has a non-empty
return value list. However, we do have an API that returns empty list in
Chrome on success. This CL fixes dbus_send module to return None instead
of crash-and-fail on empty list return value.

Alternate solution is to change chrome API to return a fake boolean to
get around this limitation but that fake return value causes more
confusion that benefit. This fix does not alternate any behavior of
autotests that call dbus_send (call with empty return output already
crashes).

BUG=chromium:804485
TEST=test_that -b ${BOARD} 100.127.0.229 platform_AddPrinter.epson

Change-Id: I1756303b23c122cf2d47fdde1d8f429c88704d66
Reviewed-on: https://chromium-review.googlesource.com/891665
Commit-Ready: Xiaochu Liu <xiaochu@chromium.org>
Tested-by: Xiaochu Liu <xiaochu@chromium.org>
Reviewed-by: Sean Kau <skau@chromium.org>
/external/autotest/client/common_lib/cros/dbus_send.py
8cd06cea704d27bac99e18290bc7097611cfafb7 25-Apr-2017 Daniel Wang <wonderfly@google.com> [autotest]dbus_send: Drop the compat regex in the output parsing logic

Now that dbus is upgraded to 1.10.12, we can drop the compat logic.

BUG=chromium:704365
TEST=python client/common_lib/cros/dbus_send_unittest.py
TEST=test_that -b amd64-generic-goofy ... peerd_DiscoverServices peerd_AdvertiseServices
TEST=trybot for amd64-generic-goofy-release

Change-Id: I2294d78b32c49e9ab44f1bdef6d10432dabba416
Reviewed-on: https://chromium-review.googlesource.com/487263
Commit-Ready: Daniel Wang <wonderfly@google.com>
Tested-by: Daniel Wang <wonderfly@google.com>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
/external/autotest/client/common_lib/cros/dbus_send.py
26a6a8a63ebf40c01eb089b55e026d446b1c6d50 25-May-2017 Alexander Curtiss <curtissa@google.com> dbus_send: Fixed a bug with _build_arg_string()

The function would incorrectly error when a numeric dbus.* type object
was passed in (e.g. dbus.Int16) due to a 'continue' statement within a
nested loop. This was bypassed by refactoring the loop body.

BUG=chromium:726432
TEST=dbus_send_unittest.py

Change-Id: Ic8028746fe2e4cc5ae459c91bea28208d675bacf
Reviewed-on: https://chromium-review.googlesource.com/514409
Commit-Ready: Alexander Curtiss <curtissa@google.com>
Tested-by: Kirtika Ruchandani <kirtika@chromium.org>
Tested-by: Alexander Curtiss <curtissa@google.com>
Reviewed-by: Eric Caruso <ejcaruso@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
/external/autotest/client/common_lib/cros/dbus_send.py
7e382a9d9f87d7a4946d2855f9783a514fdbbd21 15-Apr-2017 Mengqi Guo <mqg@chromium.org> dbus_send: allow dbus name with the form org.freedesktop.DBus

The current dbus object name pattern only allows for pattern like
":1.12", now adding pattern "org.freedesktop.DBus" to it. Unit
test is also changed accordingly.

BUG=None
TEST=test_that & ./dbus_send_unittest.py

Change-Id: I2ba7ebd902c1002ac3f0a6668aa2b6f4b068f56d
Reviewed-on: https://chromium-review.googlesource.com/478775
Commit-Ready: Mengqi Guo <mqg@chromium.org>
Tested-by: Mengqi Guo <mqg@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
/external/autotest/client/common_lib/cros/dbus_send.py
2b1a26afb4b43172e7b455378084b37b78571391 31-Mar-2017 Daniel Wang <wonderfly@google.com> dbus_send: correctly parse new dbus message header

dbus-1.10.12 has changed the message header a bit. Noticeably, it now
includes an optional "time=" field, and a mandatory "serial=" field.
Also, "dest=" is changed to "destination="

https://cgit.freedesktop.org/dbus/dbus/tree/tools/dbus-print-message.c?id=dbus-1.10.12#n545
https://cgit.freedesktop.org/dbus/dbus/tree/tools/dbus-print-message.c?id=dbus-1.10.12#n572

For easier transition, the regex for older header format is kept. That
way this CL can go in before the dbus upgrade, and we could delete it
easily when that happens.

BUG=chromium:704365, b:34841890
TEST=test_that -b x86-generic ... peerd_DiscoverServices peerd_AdvertiseServices

Change-Id: I032706f681537dbe880d358b8c832a86c8ce3a35
Reviewed-on: https://chromium-review.googlesource.com/465546
Commit-Ready: Daniel Wang <wonderfly@google.com>
Tested-by: Daniel Wang <wonderfly@google.com>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
/external/autotest/client/common_lib/cros/dbus_send.py
976b1ad72aee5e071cab5763d2f095ec7350eafb 05-Jan-2017 Greg Kerr <kerrnel@chromium.org> Add autotest for ImageLoader.

This adds an autotest for ImageLoader. The autotest runs ImageLoader in
the actual runtime environment, as a dbus environment, with the
sandboxing technologies enabled.

BUG=chromium:677162
CQ-DEPEND=CL:425707
TEST=test_that -b ${BOARD} DUT platform_ImageLoader

Change-Id: I19e877c62853b411fe267434888e25c9e9296b2e
Reviewed-on: https://chromium-review.googlesource.com/425088
Tested-by: Greg Kerr <kerrnel@chromium.org>
Reviewed-by: Ilja H. Friedel <ihf@chromium.org>
Reviewed-by: Eric Caruso <ejcaruso@chromium.org>
/external/autotest/client/common_lib/cros/dbus_send.py
9350c4efd2c6a97c92b064d4d5cc4a73f8919bd0 10-Mar-2015 Christopher Wiley <wiley@chromium.org> leaderd: Add NFacedPeerd

This fake version of peerd claims the same DBus service name, and
more or less implements the same interfaces. However, instead of
looking for remote peers, it just treats each process exposing a
service as a separate peer (it has N faces, one for each process
talking to NFacedPeerd).

We'll use this functionality to replace peerd and run N instances of
leaderd on the same system. Each leaderd instance will be told to
claim a slightly different DBus well known name, and expose handlers
on different ports. By faking out peerd, we'll be able to run a
bunch of scenarios with N peers negotiating leadership.

BUG=brillo:535
TEST=This code is used in follow on CLs successfully.

Change-Id: Ie838d8a83afaece5c5dffc29c29d5ca5961847cd
Reviewed-on: https://chromium-review.googlesource.com/260683
Tested-by: Christopher Wiley <wiley@chromium.org>
Reviewed-by: David Zeuthen <zeuthen@chromium.org>
Commit-Queue: Christopher Wiley <wiley@chromium.org>
/external/autotest/client/common_lib/cros/dbus_send.py
fa0aa9721b44a0062033c9ea5047fde9acc04405 06-Feb-2015 Christopher Wiley <wiley@chromium.org> Test that we load firmwareVersion in buffet_BasicDBusAPI

BUG=brillo:103
TEST=This is a passing test
CQ-DEPEND=CL:247234

Change-Id: Ia2184caa95df09969a5514c52c97af2ed53a4fbb
Reviewed-on: https://chromium-review.googlesource.com/247240
Reviewed-by: Christopher Wiley <wiley@chromium.org>
Tested-by: Christopher Wiley <wiley@chromium.org>
Commit-Queue: Christopher Wiley <wiley@chromium.org>
/external/autotest/client/common_lib/cros/dbus_send.py
b1a5bdb56a234b4ed7c41aa9746a695f825be2e3 02-Feb-2015 Christopher Wiley <wiley@chromium.org> Refactor avahi_utils to be usable from server tests

This makes these utilities more broadly useful by allowing them
to be used from server tests, where we cannot call DBus methods
on the local host.

In order to do this, route DBus calls through dbus_send.py, a wrapper
around the dbus-send utility. This wrapper does some limited parsing
of dbus-send output in order to conver it to meaningful Python types.

While here, allow original errors from p2p setup to propagate upward.
This increases the meaningful content in test failures.

BUG=brillo:8
TEST=peerd_* tests pass, as to p2p related tests.

Change-Id: If98be716f2061b90d1fa9d4681d1e00152f4005a
Reviewed-on: https://chromium-review.googlesource.com/245545
Tested-by: Christopher Wiley <wiley@chromium.org>
Reviewed-by: David Zeuthen <zeuthen@chromium.org>
Commit-Queue: Christopher Wiley <wiley@chromium.org>
/external/autotest/client/common_lib/cros/dbus_send.py