commit | ae79cc35abc123c3ab0d3f19089f72157e14f7e4 | [log] [tgz] |
---|---|---|
author | Oliver Newman <olivernewman@fuchsia.infra.roller.google.com> | Tue Jan 18 15:39:28 2022 +0000 |
committer | Copybara-Service <copybara-worker@google.com> | Tue Jan 18 07:41:05 2022 -0800 |
tree | 4faace2e3d42d254237ea7d87463c1ed71d2def4 | |
parent | b6738a0290b4ff112e1333297aaeeb94aef3998c [diff] |
[roll] Roll fuchsia [subprocess] Return ctx.Err() if context cancelled If the context is cancelled while a command is running, we should return the context error after cleaning up instead of returning the ExitError returned by Cmd.Wait() after it gets SIGTERMed. This makes it much easier for the caller to determine if the subprocess failed to due a context cancellation or because of an internal failure within the subprocess. Notably, this will make it easier for testrunner to determine if a subprocess test fails due to a timeout or due to an internal failure, and classify the test failure correctly as a timeout or generic failure. I also simplified the subprocess runner code in a couple ways: - Move the cleanup logic into the main thread and run `Cmd.Wait()` in a goroutine instead of the reverse. This means less state that has to be passed around between functions. - Because the cleanup logic is now synchronous in relation to starting the command, we don't run the cleanup logic unless the command has definitely been started, so we don't need to use a mutex to safely check if the process has been started. I tried to avoid introducing any changes to the behavior of how the runner starts and cleans up subprocesses; the only functional difference should be the return value of Run(). Original-Bug: 49266 Original-Reviewed-on: https://fuchsia-review.googlesource.com/c/fuchsia/+/632265 Original-Revision: 55631efdb0b9a1c884d0c05148b1d10d1ed9f595 GitOrigin-RevId: 21dac0c83e0160598284b561ef1b4ba00aa83b36 Change-Id: I6cc37e5e74e3d49be2166043db4415d6edc1f6d9
This repository contains Fuchsia's Global Integration manifest files.
All changes should be made to the internal version of this repository. Our infrastructure automatically updates this version when the internal one changes.
Currently all changes must be made by a Google employee. Non-Google employees wishing to make a change can ask for assistance via the IRC channel #fuchsia
on Freenode.
First install Jiri.
Next run:
$ jiri init $ jiri import minimal https://fuchsia.googlesource.com/integration $ jiri update
Third party projects should have their own subdirectory in ./third_party
.