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

Issue 856924 link

Starred by 1 user

Issue metadata

Status: Verified
Owner:
Closed: Jul 10
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 3
Type: Bug

Blocking:
issue 856913



Sign in to add a comment

Improve error message for run_test_binary()

Project Member Reported by deanliao@chromium.org, Jun 27 2018

Issue description

Right now, if command in run_test_binary failed to run with returncode 126 or 127, it just emits CmdError with "Unable to parse fail reason...".

06/17 15:48:54.690 ERROR|video_VideoDecodeA:0064| test-25fps.h264:320:240:250:258:35:150:1: Unable to parse fail reason: Command <s'...'> failed, rc=126, Command returned non-zero exit status

We should emit meaningful error message like:
Unable to execute binary: ... 
Command not found: ...


 

Comment 1 by hiroh@chromium.org, Jun 27 2018

Could you do something like this?
I experimented video_VideoDecodeAccelereator.h264 50 times at daisy on lab.
The error was not reproduced. It might be autotest lab specific issue.
But I don't know inserting these log message is allowed in chrome_binary_test.py.

@@ -116,6 +115,16 @@ class ChromeBinaryTest(test.test):
             specified and not None.
         """
         gtest_xml = tempfile.mktemp(prefix='gtest_xml', suffix='.xml')
+        binary_name = '%s/%s' % (self.test_binary_dir, binary_to_run)
+        cur_name = ''
+        for x in binary_name.split('/'):
+            cur_name += '/' + x
+            if cur_name:
+                if not os.path.exists(cur_name):
+                    logging.info("hiroh: cur_name=%s, NOT FOUND", cur_name)
+                    continue
+                logging.info("hiroh: cur_name=%s, permission=%s", cur_name, oct(os.stat(cur_name).st_mode))
+
 
         cmd = '%s/%s %s' % (self.test_binary_dir, binary_to_run, extra_params)
         env_vars = ' '.join([

Project Member

Comment 3 by bugdroid1@chromium.org, Jul 4

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

commit 1ea28c6170d1d62a4c4df432be35d551e1493d09
Author: Dean Liao <deanliao@chromium.org>
Date: Wed Jul 04 05:30:57 2018

autotest: improve run_test_binary() error message

Right now, if command in run_test_binary failed to run with
returncode 126 or 127, it just emits CmdError with
"Unable to parse fail reason...". This commit emits meaningful
error message. For rc 126, it says "Cannot execute command
<command_path>. Permissions: <list of  permission of its own and
parents>." For rc 127, it says "Command not found: <command_path>".

BUG= chromium:856924 
TEST=run video_VideoDecodeAccelerator with binary -x or rm the binary

Change-Id: Iefe088fcba4d73921089b876f00f6215990a43aa
Reviewed-on: https://chromium-review.googlesource.com/1116513
Commit-Ready: Shuo-Peng Liao <deanliao@google.com>
Tested-by: Shuo-Peng Liao <deanliao@google.com>
Reviewed-by: Shuo-Peng Liao <deanliao@google.com>

[modify] https://crrev.com/1ea28c6170d1d62a4c4df432be35d551e1493d09/client/cros/chrome_binary_test.py
[modify] https://crrev.com/1ea28c6170d1d62a4c4df432be35d551e1493d09/client/common_lib/file_utils.py

Status: Verified (was: Started)
Based on the recent error message (see  https://crbug.com/856913#c3 ), the issue is addressed.

Sign in to add a comment