New issue
Advanced search Search tips

Issue 820292 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Apr 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Feature

Blocked on:
issue 817688



Sign in to add a comment

tast: Collect system info after running remote tests

Project Member Reported by derat@chromium.org, Mar 8 2018

Issue description

Tast's local_test_runner process currently gets the initial state of the DUT's log files and crash reports at the start of a run and then copies the updates into temporary directories at the end. These dirs are listed in the RunEnd control message so the tast process can copy the data to its results dir.

This was straightforward to implement, but it's a bit too simple. The tast process now runs remote_test_runner after local_test_runner finishes, so we don't get any logs or crashes generated during remote tests.

I think it'd make sense to add new two new commands to local_test_runner, one that returns the serialized initial state of these files, and another that takes that state and copies the updated data into temp dirs. The tast process can run the first command at the beginning of testing and the second command after testing is done.

This also adds more flexibility for the future. I've seen DUTs die in the middle of testing (e.g. not coming back after a remote test requests a reboot), so it could be advantageous to make just-in-case copies of logs and crash files midway through testing, e.g. before running the first remote test.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Mar 16 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/tast/+/6786eb2122f0df8d29f527d49c25190b0db471ac

commit 6786eb2122f0df8d29f527d49c25190b0db471ac
Author: Daniel Erat <derat@chromium.org>
Date: Fri Mar 16 18:13:59 2018

tast: Cache SSH connection to DUT.

Make run.Config cache an SSH connection to the DUT. The
connection doesn't get reused yet (the tast command opens a
single connection for local tests, while each remote test
bundle needs its own connection), but it will be used to
avoid reestablishing connections unnecessarily after system
info collection is moved outside of the local test run.

BUG= chromium:820292 
TEST=unit tests pass

Change-Id: Icf6bee424be855b69367924c89394abeeefe0f41
Reviewed-on: https://chromium-review.googlesource.com/965448
Commit-Ready: Dan Erat <derat@chromium.org>
Tested-by: Dan Erat <derat@chromium.org>
Reviewed-by: Jason Clinton <jclinton@chromium.org>

[modify] https://crrev.com/6786eb2122f0df8d29f527d49c25190b0db471ac/src/chromiumos/cmd/tast/run/config.go
[modify] https://crrev.com/6786eb2122f0df8d29f527d49c25190b0db471ac/src/chromiumos/cmd/tast/run/remote_test.go
[modify] https://crrev.com/6786eb2122f0df8d29f527d49c25190b0db471ac/src/chromiumos/cmd/tast/run_cmd.go
[modify] https://crrev.com/6786eb2122f0df8d29f527d49c25190b0db471ac/src/chromiumos/cmd/tast/run/local.go
[modify] https://crrev.com/6786eb2122f0df8d29f527d49c25190b0db471ac/src/chromiumos/cmd/tast/run/local_test.go

Project Member

Comment 2 by bugdroid1@chromium.org, Mar 20 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/tast/+/710c880c7b605fd1a7e73ebe4b3986845032af72

commit 710c880c7b605fd1a7e73ebe4b3986845032af72
Author: Daniel Erat <derat@chromium.org>
Date: Tue Mar 20 21:38:41 2018

tast: Make local_test_runner support getting system info.

Add new GetSysInfoStateMode and CollectSysInfoMode modes to
local_test_runner that can be used to get the initial state
of log files and crash reports and then later copy them into
temp dirs. These modes will be used by the tast executable
in later change.

BUG= chromium:820292 
TEST=unit tests pass; also used in conjunction with updated
     tast executable and verified that an old tast
     executable still collects logs and crashes from local
     tests when used in conjunction with an updated
     local_test_runner

Change-Id: I662fbc7e29f40a0a4d94230ba04b72ca4ebaff9f
Reviewed-on: https://chromium-review.googlesource.com/969450
Commit-Ready: Dan Erat <derat@chromium.org>
Tested-by: Dan Erat <derat@chromium.org>
Reviewed-by: Jason Clinton <jclinton@chromium.org>

[modify] https://crrev.com/710c880c7b605fd1a7e73ebe4b3986845032af72/src/chromiumos/tast/runner/runner_test.go
[modify] https://crrev.com/710c880c7b605fd1a7e73ebe4b3986845032af72/src/chromiumos/tast/runner/runner.go
[modify] https://crrev.com/710c880c7b605fd1a7e73ebe4b3986845032af72/src/chromiumos/cmd/local_test_runner/main.go
[modify] https://crrev.com/710c880c7b605fd1a7e73ebe4b3986845032af72/src/chromiumos/tast/control/control.go
[add] https://crrev.com/710c880c7b605fd1a7e73ebe4b3986845032af72/src/chromiumos/tast/runner/sys_info.go

Project Member

Comment 3 by bugdroid1@chromium.org, Mar 21 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/tast/+/7e4178a46d6b5cd2d19f2670d4dc4ad3e9b2ee91

commit 7e4178a46d6b5cd2d19f2670d4dc4ad3e9b2ee91
Author: Daniel Erat <derat@chromium.org>
Date: Wed Mar 21 22:55:45 2018

tast: Update tast executable to explicitly get system info.

Update the tast command to request the initial state of logs
and crashes from local_test_runner before testing and to
collect updates after both local and remote tests have
finished.

BUG= chromium:820292 
TEST=unit tests pass; also manually verified that logs and
     crashes are collected at the end of the test run

Change-Id: Ifad48c566d3c8eb68e8652603a2cd65a31907221
Reviewed-on: https://chromium-review.googlesource.com/972331
Commit-Ready: Dan Erat <derat@chromium.org>
Tested-by: Dan Erat <derat@chromium.org>
Reviewed-by: Jason Clinton <jclinton@chromium.org>

[modify] https://crrev.com/7e4178a46d6b5cd2d19f2670d4dc4ad3e9b2ee91/src/chromiumos/cmd/tast/run_cmd_test.go
[modify] https://crrev.com/7e4178a46d6b5cd2d19f2670d4dc4ad3e9b2ee91/src/chromiumos/cmd/tast/run/remote.go
[modify] https://crrev.com/7e4178a46d6b5cd2d19f2670d4dc4ad3e9b2ee91/src/chromiumos/cmd/tast/run/results_test.go
[modify] https://crrev.com/7e4178a46d6b5cd2d19f2670d4dc4ad3e9b2ee91/src/chromiumos/cmd/tast/run_cmd.go
[modify] https://crrev.com/7e4178a46d6b5cd2d19f2670d4dc4ad3e9b2ee91/src/chromiumos/cmd/tast/run/local.go
[modify] https://crrev.com/7e4178a46d6b5cd2d19f2670d4dc4ad3e9b2ee91/src/chromiumos/cmd/tast/run/local_test.go
[add] https://crrev.com/7e4178a46d6b5cd2d19f2670d4dc4ad3e9b2ee91/src/chromiumos/cmd/tast/run/sys_info.go
[add] https://crrev.com/7e4178a46d6b5cd2d19f2670d4dc4ad3e9b2ee91/src/chromiumos/cmd/tast/run/sys_info_test.go
[modify] https://crrev.com/7e4178a46d6b5cd2d19f2670d4dc4ad3e9b2ee91/src/chromiumos/cmd/tast/run/results.go
[modify] https://crrev.com/7e4178a46d6b5cd2d19f2670d4dc4ad3e9b2ee91/src/chromiumos/cmd/tast/run/remote_test.go
[modify] https://crrev.com/7e4178a46d6b5cd2d19f2670d4dc4ad3e9b2ee91/src/chromiumos/cmd/tast/run/config.go

Project Member

Comment 4 by bugdroid1@chromium.org, Mar 28 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/tast/+/c9610e09d0788c67abc5b6b77c5a126062ced287

commit c9610e09d0788c67abc5b6b77c5a126062ced287
Author: Daniel Erat <derat@chromium.org>
Date: Wed Mar 28 03:34:47 2018

tast: Delete old system info code.

Delete old code related to collecting logs and crashes
automatically as part of local test runs. The tast
executable explicitly manages the collection of system info
now.

The tast command still passes SkipSysInfoForRun when running
local_test_runner, and it needs to continue doing so until
local_test_runner has been updated to not collect system
info as part of the test run by default (i.e. after this
change makes its way into DUTs in the lab).

BUG= chromium:820292 
TEST=unit tests pass

Change-Id: I4a3c1ca42f378e1853be62f028c2ce4c4cdcb90e
Reviewed-on: https://chromium-review.googlesource.com/982395
Commit-Ready: Dan Erat <derat@chromium.org>
Tested-by: Dan Erat <derat@chromium.org>
Reviewed-by: Jason Clinton <jclinton@chromium.org>

[modify] https://crrev.com/c9610e09d0788c67abc5b6b77c5a126062ced287/src/chromiumos/tast/runner/runner_test.go
[modify] https://crrev.com/c9610e09d0788c67abc5b6b77c5a126062ced287/src/chromiumos/cmd/tast/run/results_test.go
[modify] https://crrev.com/c9610e09d0788c67abc5b6b77c5a126062ced287/src/chromiumos/tast/control/control_test.go
[modify] https://crrev.com/c9610e09d0788c67abc5b6b77c5a126062ced287/src/chromiumos/cmd/tast/run/local_test.go
[modify] https://crrev.com/c9610e09d0788c67abc5b6b77c5a126062ced287/src/chromiumos/tast/control/control.go
[modify] https://crrev.com/c9610e09d0788c67abc5b6b77c5a126062ced287/src/chromiumos/cmd/tast/run/results.go
[modify] https://crrev.com/c9610e09d0788c67abc5b6b77c5a126062ced287/src/chromiumos/cmd/tast/run/remote_test.go
[modify] https://crrev.com/c9610e09d0788c67abc5b6b77c5a126062ced287/src/chromiumos/tast/runner/runner.go
[modify] https://crrev.com/c9610e09d0788c67abc5b6b77c5a126062ced287/src/chromiumos/cmd/local_test_runner/main.go

Project Member

Comment 5 by bugdroid1@chromium.org, Apr 5 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/tast/+/8da43cd1263b02d7a785c68dd821ba8e0a6b4a86

commit 8da43cd1263b02d7a785c68dd821ba8e0a6b4a86
Author: Daniel Erat <derat@chromium.org>
Date: Thu Apr 05 03:55:34 2018

tast: Delete old SkipSysInfoForRun test runner arg.

Remove the last piece of the now-unused code for
automatically collecting system info as part of local test
runs.

BUG= chromium:820292 
TEST=unit tests pass; also manually verified that system
     info is still collected using the new procedure

Change-Id: Ie7e1c51601a4613f5d8826fe55d209f971064407
Reviewed-on: https://chromium-review.googlesource.com/991460
Commit-Ready: Dan Erat <derat@chromium.org>
Tested-by: Dan Erat <derat@chromium.org>
Reviewed-by: Jason Clinton <jclinton@chromium.org>

[modify] https://crrev.com/8da43cd1263b02d7a785c68dd821ba8e0a6b4a86/src/chromiumos/tast/runner/runner.go
[modify] https://crrev.com/8da43cd1263b02d7a785c68dd821ba8e0a6b4a86/src/chromiumos/cmd/tast/run/local.go
[modify] https://crrev.com/8da43cd1263b02d7a785c68dd821ba8e0a6b4a86/src/chromiumos/cmd/tast/run/local_test.go

Comment 6 by derat@chromium.org, Apr 7 2018

Status: Fixed (was: Started)

Sign in to add a comment