New issue
Advanced search Search tips

Issue 906286 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Dec 1
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Bug



Sign in to add a comment

Incorrect exception handling code in tradefed_test.cleanup()

Project Member Reported by benchan@chromium.org, Nov 16

Issue description

Observed in https://stainless.corp.google.com/browse/chromeos-image-archive/betty-arcnext-pre-cq/R72-11268.0.0-b3139604/vm_test_results_2/smoke/test_harness/results-03-cheets_CTS_P.9.0_r4.x86.CtsAdminTestCases/

where tradefed_test.py has a bug in the exception handling code:

11/16 15:04:59.048 DEBUG|              test:0611| Running cleanup for test.
11/16 15:04:59.048 DEBUG|             utils:0219| Running 'adb -s 'localhost:9228' kill-server'
11/16 15:04:59.071 ERROR|              test:0614| Ignoring exception during cleanup() phase:
11/16 15:04:59.072 ERROR|         traceback:0013| Traceback (most recent call last):
11/16 15:04:59.072 ERROR|         traceback:0013|   File "/build/betty-arcnext/usr/local/build/autotest/client/common_lib/test.py", line 612, in _exec
11/16 15:04:59.073 ERROR|         traceback:0013|     _cherry_pick_call(self.cleanup, *args, **dargs)
11/16 15:04:59.073 ERROR|         traceback:0013|   File "/build/betty-arcnext/usr/local/build/autotest/client/common_lib/test.py", line 715, in _cherry_pick_call
11/16 15:04:59.074 ERROR|         traceback:0013|     return func(*p_args, **p_dargs)
11/16 15:04:59.074 ERROR|         traceback:0013|   File "/build/betty-arcnext/usr/local/build/autotest/server/cros/tradefed_test.py", line 156, in cleanup
11/16 15:04:59.075 ERROR|         traceback:0013|     except (CmdError, AttributeError):
11/16 15:04:59.075 ERROR|         traceback:0013| NameError: global name 'CmdError' is not defined
11/16 15:04:59.075 ERROR|              test:0618| Now raising the earlier <class 'autotest_lib.client.common_lib.error.AutoservRunError'> error
11/16 15:04:59.077 DEBUG|   logging_manager:0627| Logging subprocess finished
11/16 15:04:59.082 DEBUG|   logging_manager:0627| Logging subprocess finished
 
Project Member

Comment 1 by bugdroid1@chromium.org, Dec 1

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

commit 592b9e6d0da0f1b2b5d09d8d595512f6d621f176
Author: Ben Chan <benchan@chromium.org>
Date: Sat Dec 01 03:34:45 2018

tradefed_test: fix CmdError exception handling in TradefedTest.cleanup()

This CL fixes a bug (introduced in CL:1271927) in the exception handling
code in TradefedTest.cleanup() where 'CmdError' should be
'error.CmdError'.

BUG= chromium:906286 
TEST=None

Change-Id: I5ca9341ccc5620279e4bbc6936501b9bede8ef6c
Reviewed-on: https://chromium-review.googlesource.com/c/1340658
Tested-by: Ben Chan <benchan@chromium.org>
Reviewed-by: Ilja H. Friedel <ihf@chromium.org>
Commit-Queue: Ilja H. Friedel <ihf@chromium.org>

[modify] https://crrev.com/592b9e6d0da0f1b2b5d09d8d595512f6d621f176/server/cros/tradefed_test.py

Status: Fixed (was: Started)

Sign in to add a comment