New issue
Advanced search Search tips

Issue 804485 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Feb 2018
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 3
Type: Bug



Sign in to add a comment

use dbus_send wrapper in platform_AddPrinter

Project Member Reported by xiaochu@chromium.org, Jan 22 2018

Issue description

dbus_send.dbus_send expects a non-empty return value list. But UnloadComponent returns an empty list on success (return error on failure) which causes error in the dbus_send wrapper. 

I could either fix dbus_send wrapper to accept an empty_list or fix UploadComponent to return a list with a boolean value. I prefer the latter since I'm not sure if the former may break other tests...
 
Project Member

Comment 1 by bugdroid1@chromium.org, Jan 31 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/autotest/+/4df0c19683f40fd0554edebf9db70d56bb2015b5

commit 4df0c19683f40fd0554edebf9db70d56bb2015b5
Author: Xiaochu Liu <xiaochu@chromium.org>
Date: Wed Jan 31 01:47:21 2018

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>

[modify] https://crrev.com/4df0c19683f40fd0554edebf9db70d56bb2015b5/client/common_lib/cros/dbus_send.py
[modify] https://crrev.com/4df0c19683f40fd0554edebf9db70d56bb2015b5/client/site_tests/platform_AddPrinter/platform_AddPrinter.py

Status: Fixed (was: Assigned)

Sign in to add a comment