New issue
Advanced search Search tips

Issue 860008 link

Starred by 1 user

Issue metadata

Status: Available
Owner: ----
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

autotest: shell_wrapper.run_command_get_output should check status code

Project Member Reported by rrangel@chromium.org, Jul 3

Issue description

If the command ran by shell_wrapper.run_command_get_output() returns a non 0 status code an exception should occur. Right now the return code is hidden and is never exposed in logs so it's hard to disambiguate a failure of the command or the command not returning any output.

We should instead be using subprocess.check_output().

https://chromium.googlesource.com/chromiumos/third_party/autotest/+/master/client/cros/faft/utils/shell_wrapper.py#71
 
Owner: waihong@chromium.org
Labels: Hotlist-Fixit
Owner: ----
Status: Available (was: Untriaged)
The proposed solution is very invasive because it changes the API of the method which could have unintended consequences on remote parts of the system.  Better to add a new method and individually replace the callers on a case by case basis.

Sign in to add a comment