New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 766631 link

Starred by 2 users

Issue metadata

Status: Verified
Owner:
Last visit > 30 days ago
Closed: Oct 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 1
Type: Bug



Sign in to add a comment

Client side logs not stored in cfm autotest test results

Project Member Reported by dtosic@chromium.org, Sep 19 2017

Issue description

Trying to follow up on https://crbug.com/764799

I am not able to find any logs from the client side code, e.g. entries from http://cs/chromeos_public/src/third_party/autotest/files/client/common_lib/cros/cfm_hangouts_api.py appear to be completely missing.

Can we please add them?
 

Comment 1 by dtosic@chromium.org, Sep 19 2017

Cc: harpreet@chromium.org
Components: UI>Shell>Kiosk
Labels: OS-Chrome
Owner: waihong@chromium.org
Hi Tom, this is what I spoke to you about couple weeks back. For CFM, we are using xmlrpc and multimedia facades to run telemetry commands on the device via server side test. Can we get all the javascript logs for the telemetry commands that are run on the client and store those in the server-side test logs?
Status: Started (was: Untriaged)
Due the huge amount of the log messages from the client, I'd like to put them to the DEBUG level. You can use "test_that --debug" to show the DEBUG messages, or check the .DEBUG file in the result directory. The format of this kind of log messages is having the prefix "[client]" to differentiate from others, for example:

16:54:36 INFO | autoserv| Waiting for calibration image to stabilize...
16:54:47 INFO | autoserv| [client] 14:54:46 INFO | Dispatching method <bound method DisplayFacadeNative.func_retry of <autotest_lib.client.cros.multimedia.display_facade_native.DisplayFacadeNative object at 0x7f5cb558c2d0>> with args ()
16:54:47 INFO | autoserv| [client] 14:54:46 DEBUG| Running 'modetest -c'
16:54:47 INFO | autoserv| [client] 14:54:46 DEBUG| Running 'modetest -p'
16:54:47 INFO | autoserv| [client] 127.0.0.1 - - [26/Sep/2017 14:54:46] "POST /RPC2 HTTP/1.1" 200 -
16:54:47 INFO | autoserv| RPC 'display.get_external_resolution'((), {}) returns [1920, 1080].
16:54:47 INFO | autoserv| Checking the resolutions of Chameleon and CrOS...
16:54:47 INFO | autoserv| Resolutions across CrOS and Chameleon match: 1920x1080
16:54:47 INFO | autoserv| Capturing the screen on Chameleon...
16:54:52 INFO | autoserv| Capturing the external screen on CrOS... 

The above "[client]" messages are the log messages coming from the client.

CL will be sent out later.
Project Member

Comment 4 by bugdroid1@chromium.org, Sep 28 2017

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

commit 610b49cad27e9904bbc7f2665b7f6e2f4ed6447b
Author: Wai-Hong Tam <waihong@google.com>
Date: Thu Sep 28 06:52:15 2017

multimedia: Introduce a way to save and show the log messages from the client

Server tests use the multimedia facade framework to call the client
library, such that the existing client library can be reused in server
tests. The implementation is done by RPC. The Autotest logging system
is unable to know the log output from the client. It is hard for debug.

This change introduces a way to save the log by running a tail command
in background. The stdout and stderr are piped to the Autotest logging
system. On every RPC call, the log is processed, meaning showed to
the Autotest log.

BUG= chromium:766631 
TEST=Ran a multimedia test cases, with --debug, saw the log, like:
16:54:36 INFO | autoserv| Waiting for calibration image to stabilize...
16:54:47 INFO | autoserv| [client] 14:54:46 INFO | Dispatching method
<bound method DisplayFacadeNative.func_retry of
<autotest_lib.client.cros.multimedia.display_facade_native.DisplayFacadeNative
object at 0x7f5cb558c2d0>> with args ()
16:54:47 INFO | autoserv| [client] 14:54:46 DEBUG| Running 'modetest -c'
16:54:47 INFO | autoserv| [client] 14:54:46 DEBUG| Running 'modetest -p'
16:54:47 INFO | autoserv| [client] 127.0.0.1 - - [26/Sep/2017 14:54:46]
"POST /RPC2 HTTP/1.1" 200 -
16:54:47 INFO | autoserv| RPC 'display.get_external_resolution'((), {})
returns [1920, 1080].
16:54:47 INFO | autoserv| Checking the resolutions of Chameleon and
CrOS...
16:54:47 INFO | autoserv| Resolutions across CrOS and Chameleon match:
1920x1080
16:54:47 INFO | autoserv| Capturing the screen on Chameleon...
16:54:52 INFO | autoserv| Capturing the external screen on CrOS...

Also tested the cases, like DUT reboot, RPC error.

Change-Id: I870052d82cc489acd71b90dc009e470005a0d4ce
Reviewed-on: https://chromium-review.googlesource.com/685310
Commit-Ready: Wai-Hong Tam <waihong@google.com>
Tested-by: Wai-Hong Tam <waihong@google.com>
Reviewed-by: Cheng-Yi Chiang <cychiang@chromium.org>
Reviewed-by: Armando Miraglia <armax@chromium.org>
Reviewed-by: Harpreet Grewal <harpreet@chromium.org>
Reviewed-by: Denis Tosic <dtosic@chromium.org>

[modify] https://crrev.com/610b49cad27e9904bbc7f2665b7f6e2f4ed6447b/server/cros/multimedia/remote_facade_factory.py

Labels: Merge-Request-62 Merge-Request-61
Request to merge back to M61 and M62, for getting better log messages for tests.
Project Member

Comment 6 by sheriffbot@chromium.org, Sep 28 2017

Labels: -Merge-Request-62 Merge-Review-62 Hotlist-Merge-Review
This bug requires manual review: M62 has already been promoted to the beta branch, so this requires manual review
Please contact the milestone owner if you have questions.
Owners: amineer@(Android), cmasso@(iOS), bhthompson@(ChromeOS), abdulsyed@(Desktop)

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Labels: -Merge-Review-62 Merge-Approved-62
Approved for 62.
Project Member

Comment 8 by bugdroid1@chromium.org, Sep 29 2017

Labels: merge-merged-release-R62-9901.B
The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/autotest/+/a67cc7e8150fb5ea4b3f7e4fcc811c14d3753469

commit a67cc7e8150fb5ea4b3f7e4fcc811c14d3753469
Author: Wai-Hong Tam <waihong@google.com>
Date: Fri Sep 29 18:09:04 2017

multimedia: Introduce a way to save and show the log messages from the client

Server tests use the multimedia facade framework to call the client
library, such that the existing client library can be reused in server
tests. The implementation is done by RPC. The Autotest logging system
is unable to know the log output from the client. It is hard for debug.

This change introduces a way to save the log by running a tail command
in background. The stdout and stderr are piped to the Autotest logging
system. On every RPC call, the log is processed, meaning showed to
the Autotest log.

BUG= chromium:766631 
TEST=Ran a multimedia test cases, with --debug, saw the log, like:
16:54:36 INFO | autoserv| Waiting for calibration image to stabilize...
16:54:47 INFO | autoserv| [client] 14:54:46 INFO | Dispatching method
<bound method DisplayFacadeNative.func_retry of
<autotest_lib.client.cros.multimedia.display_facade_native.DisplayFacadeNative
object at 0x7f5cb558c2d0>> with args ()
16:54:47 INFO | autoserv| [client] 14:54:46 DEBUG| Running 'modetest -c'
16:54:47 INFO | autoserv| [client] 14:54:46 DEBUG| Running 'modetest -p'
16:54:47 INFO | autoserv| [client] 127.0.0.1 - - [26/Sep/2017 14:54:46]
"POST /RPC2 HTTP/1.1" 200 -
16:54:47 INFO | autoserv| RPC 'display.get_external_resolution'((), {})
returns [1920, 1080].
16:54:47 INFO | autoserv| Checking the resolutions of Chameleon and
CrOS...
16:54:47 INFO | autoserv| Resolutions across CrOS and Chameleon match:
1920x1080
16:54:47 INFO | autoserv| Capturing the screen on Chameleon...
16:54:52 INFO | autoserv| Capturing the external screen on CrOS...

Also tested the cases, like DUT reboot, RPC error.

Change-Id: I870052d82cc489acd71b90dc009e470005a0d4ce
Reviewed-on: https://chromium-review.googlesource.com/685310
Commit-Ready: Wai-Hong Tam <waihong@google.com>
Tested-by: Wai-Hong Tam <waihong@google.com>
Reviewed-by: Cheng-Yi Chiang <cychiang@chromium.org>
Reviewed-by: Armando Miraglia <armax@chromium.org>
Reviewed-by: Harpreet Grewal <harpreet@chromium.org>
Reviewed-by: Denis Tosic <dtosic@chromium.org>
(cherry picked from commit 610b49cad27e9904bbc7f2665b7f6e2f4ed6447b)
Reviewed-on: https://chromium-review.googlesource.com/692998
Commit-Queue: Harpreet Grewal <harpreet@chromium.org>
Tested-by: Harpreet Grewal <harpreet@chromium.org>
Trybot-Ready: Harpreet Grewal <harpreet@chromium.org>

[modify] https://crrev.com/a67cc7e8150fb5ea4b3f7e4fcc811c14d3753469/server/cros/multimedia/remote_facade_factory.py

Labels: -Merge-Approved-62
Labels: -Merge-Request-61 Merge-Approved-61
Approving merge to M61.
Project Member

Comment 11 by bugdroid1@chromium.org, Oct 2 2017

Labels: merge-merged-release-R61-9765.B
The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/autotest/+/54324d52f18ebfc6bf7a99e175500fd255d90a40

commit 54324d52f18ebfc6bf7a99e175500fd255d90a40
Author: Wai-Hong Tam <waihong@google.com>
Date: Mon Oct 02 20:52:17 2017

multimedia: Introduce a way to save and show the log messages from the client

Server tests use the multimedia facade framework to call the client
library, such that the existing client library can be reused in server
tests. The implementation is done by RPC. The Autotest logging system
is unable to know the log output from the client. It is hard for debug.

This change introduces a way to save the log by running a tail command
in background. The stdout and stderr are piped to the Autotest logging
system. On every RPC call, the log is processed, meaning showed to
the Autotest log.

BUG= chromium:766631 
TEST=Ran a multimedia test cases, with --debug, saw the log, like:
16:54:36 INFO | autoserv| Waiting for calibration image to stabilize...
16:54:47 INFO | autoserv| [client] 14:54:46 INFO | Dispatching method
<bound method DisplayFacadeNative.func_retry of
<autotest_lib.client.cros.multimedia.display_facade_native.DisplayFacadeNative
object at 0x7f5cb558c2d0>> with args ()
16:54:47 INFO | autoserv| [client] 14:54:46 DEBUG| Running 'modetest -c'
16:54:47 INFO | autoserv| [client] 14:54:46 DEBUG| Running 'modetest -p'
16:54:47 INFO | autoserv| [client] 127.0.0.1 - - [26/Sep/2017 14:54:46]
"POST /RPC2 HTTP/1.1" 200 -
16:54:47 INFO | autoserv| RPC 'display.get_external_resolution'((), {})
returns [1920, 1080].
16:54:47 INFO | autoserv| Checking the resolutions of Chameleon and
CrOS...
16:54:47 INFO | autoserv| Resolutions across CrOS and Chameleon match:
1920x1080
16:54:47 INFO | autoserv| Capturing the screen on Chameleon...
16:54:52 INFO | autoserv| Capturing the external screen on CrOS...

Also tested the cases, like DUT reboot, RPC error.

Change-Id: I870052d82cc489acd71b90dc009e470005a0d4ce
Reviewed-on: https://chromium-review.googlesource.com/685310
Commit-Ready: Wai-Hong Tam <waihong@google.com>
Tested-by: Wai-Hong Tam <waihong@google.com>
Reviewed-by: Cheng-Yi Chiang <cychiang@chromium.org>
Reviewed-by: Armando Miraglia <armax@chromium.org>
Reviewed-by: Harpreet Grewal <harpreet@chromium.org>
Reviewed-by: Denis Tosic <dtosic@chromium.org>
(cherry picked from commit 610b49cad27e9904bbc7f2665b7f6e2f4ed6447b)
Reviewed-on: https://chromium-review.googlesource.com/695702
Reviewed-by: Wai-Hong Tam <waihong@google.com>
Commit-Queue: Wai-Hong Tam <waihong@google.com>

[modify] https://crrev.com/54324d52f18ebfc6bf7a99e175500fd255d90a40/server/cros/multimedia/remote_facade_factory.py

Labels: -Merge-Approved-61
Status: Fixed (was: Started)

Comment 14 by dchan@chromium.org, Jan 22 2018

Status: Archived (was: Fixed)

Comment 15 by dchan@chromium.org, Jan 23 2018

Status: Fixed (was: Archived)
Status: Verified (was: Fixed)

Sign in to add a comment