History log of /external/autotest/client/common_lib/error.py
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
6ee645357e48ac0a32a4543e29f58a7b6bc5d183 10-Aug-2016 Justin Giorgi <jgiorgi@google.com> [autotest] GenericHostRunError.

Renamed HostRunErrorMixIn to GenericHostRunError as a generic
error used for both client and server host.run failures. Fixed ADBHost,
EmulatedADBHost, EmulatorManager and all android/brillo tests to catch this
exception where they were catching one or both of AutotestHostRunError and
AutoservRunError.

TEST=Verified locally, ran unit tests.
BUG=None

Change-Id: I87e166bd580df7dd4b021e2fe0b426beaba2c270
Reviewed-on: https://chromium-review.googlesource.com/367015
Commit-Ready: Justin Giorgi <jgiorgi@google.com>
Tested-by: Justin Giorgi <jgiorgi@google.com>
Reviewed-by: Dan Shi <dshi@chromium.org>
/external/autotest/client/common_lib/error.py
5f5579e6f825cf33bb022c08a1b2ab95bcb9d1d7 11-May-2016 Richard Barnette <jrbarnette@chromium.org> [autotest] Bury more virtualization code.

This deletes two unused modules and tests related to kvm virtualization.

BUG=None
TEST=git grep, see that the modules are unused

Change-Id: I317c1d9d64d3663f7209a85e3f4048f80281dd39
Reviewed-on: https://chromium-review.googlesource.com/343919
Commit-Ready: Richard Barnette <jrbarnette@chromium.org>
Tested-by: Richard Barnette <jrbarnette@chromium.org>
Reviewed-by: Dan Shi <dshi@google.com>
/external/autotest/client/common_lib/error.py
c32ef4d9f8a9f659cafdfaeebfdcfcb6d3356211 21-Apr-2016 Richard Barnette <jrbarnette@chromium.org> [autotest] Delete client/tests/kvm and related dead code.

This deletes code related to kernel tests for KVM (N.B. _not_ the
Chrome OS tests that run inside KVM in the builders), as well as
various client-side libraries that become dead after the deletion.

BUG=None
TEST=Run push_to_prod suite on a local instance

Change-Id: I6cb49f7c0eac5da07c27112071e0effda69f2a7a
Reviewed-on: https://chromium-review.googlesource.com/340243
Commit-Ready: Richard Barnette <jrbarnette@chromium.org>
Tested-by: Richard Barnette <jrbarnette@chromium.org>
Reviewed-by: Kevin Cheng <kevcheng@chromium.org>
Reviewed-by: Dan Shi <dshi@google.com>
/external/autotest/client/common_lib/error.py
0f7755d1e9ceca25f95ebb01dd05f040f154cba3 18-Apr-2016 xixuan <xixuan@google.com> Autotest: Make autotest call the new devserver API list_suite_controls

Related to CL:338931, this CL is to change the code in autotest to call
the API: list_suite_controls, to get the control contents of all control
files in one call to devserver.

BUG=chromium:602562
TEST=Ran dev_server_unittest, control_file_getter_unittest,
suite_unittest.py, site_rpc_interface_unittest for
ENABLE_CONTROLS_IN_BATCH=False/True;
Ran test_suite:dummy in local autotest instance using local devserver
for ENABLE_CONTROLS_IN_BATCH=False/True.

Change-Id: I075fad07b79827a5d78b7de371bba845fcdf09b1
Reviewed-on: https://chromium-review.googlesource.com/339480
Commit-Ready: Dan Shi <dshi@google.com>
Tested-by: Xixuan Wu <xixuan@chromium.org>
Reviewed-by: Dan Shi <dshi@google.com>
/external/autotest/client/common_lib/error.py
91137f091ec7c5df44081b692ab7e9d9bc79247e 11-Mar-2016 J. Richard Barnette <jrbarnette@chromium.org> [autotest] Convert CrosHost repair to the new Repair framework.

This moves all individual repair functions in CrosHost into
RepairAction subclasses in cros_repair.py and converts the repair()
method to use self._repair_strategy.

This also converts MoblabHost (a subclass of CrosHost) in a
similar fashion.

BUG=chromium:586326,chromium:586317
TEST=test against various DUTs in a local Autotest instance

Change-Id: I0eee80890da1cc63dc9efa5ba06548fd37c1a35d
Reviewed-on: https://chromium-review.googlesource.com/332292
Commit-Ready: Richard Barnette <jrbarnette@chromium.org>
Tested-by: Richard Barnette <jrbarnette@chromium.org>
Reviewed-by: Dan Shi <dshi@google.com>
/external/autotest/client/common_lib/error.py
908b2e44d75c799087f1cf8dca4d8e5435ded527 18-Mar-2016 J. Richard Barnette <jrbarnette@chromium.org> [autotest] Remove CrosHost.try_collect_crashlogs(), et seq.

This removes the verification check that could force repair in order
to collect logs; neither the check nor the associated repair code
could ever trigger.

The result is to remove _need_crash_logs(), try_collect_crashlogs()
and a variety of transitive dependencies.

BUG=None
TEST=GIT GREP ALL THE NAMES!

Change-Id: Iaaf64ce0d08e189ad8edd332627adca0e386d350
Reviewed-on: https://chromium-review.googlesource.com/333698
Commit-Ready: Richard Barnette <jrbarnette@chromium.org>
Tested-by: Richard Barnette <jrbarnette@chromium.org>
Reviewed-by: Xixuan Wu <xixuan@chromium.org>
/external/autotest/client/common_lib/error.py
9f364a6fe1fedaecc652f111cd143ab2ee7ca825 07-Dec-2015 Simran Basi <sbasi@google.com> [autotest] Block atest/run_suite from being ran as root user.

If these scripts run as root on MobLab, they leave files in
the autotest directory that user moblab can't open or delete,
and the autotest services will begin to fail. Usually a user
would have to powerwash if they got to this state, hence
lets stop these scripts from being ran as root at all.

BUG=chromium:391138
TEST=sudo python run_suite.py fails.

Change-Id: I341b0d38f211809eeafc174ef709a7b71ea87b64
Reviewed-on: https://chromium-review.googlesource.com/316448
Commit-Ready: Simran Basi <sbasi@chromium.org>
Tested-by: Simran Basi <sbasi@chromium.org>
Reviewed-by: Kevin Cheng <kevcheng@chromium.org>
Reviewed-by: Dan Shi <dshi@google.com>
/external/autotest/client/common_lib/error.py
c2d99cf743c86fe0519f155ffbcad54df31bd742 18-Nov-2015 J. Richard Barnette <jrbarnette@chromium.org> [autotest] Remove the concept of 'protection level' from repair.

In original Autotest, hosts have a 'protection level' that is
passed to repair jobs in order to limit the specific kinds of repair
that can be done. For the CrOS lab, this concept is largely not
useful; we want a uniform repair procedure determined by the kind of
DUT being repaired, not by a database configuration.

This removes the concept of 'protection level' from the repair flow;
repair steps are now determined only by the class of Host that
handles the operation. The protection level remains in the
database, but the only meaningful value is 'Do not verify'. That
setting on a host will prevent it from running any verify, cleanup,
or repair tasks. This is done for the sake of non-DUT hosts that
exist in the CrOS lab AFE database.

BUG=None
TEST=unit tests, and run repair in a local instance

Change-Id: I1d512eb2b1fe604b70fec00b3a290f5f6b9d9beb
Reviewed-on: https://chromium-review.googlesource.com/312979
Commit-Ready: Richard Barnette <jrbarnette@chromium.org>
Tested-by: Richard Barnette <jrbarnette@chromium.org>
Reviewed-by: Dan Shi <dshi@chromium.org>
/external/autotest/client/common_lib/error.py
767dced065c8918b5ff74c1347371a0f0f8d9c69 01-Feb-2015 Dan Shi <dshi@chromium.org> [autotest] Add a utility module to interact with LXC binaries.

Add a module (lxc.py) to interact with LXC binaries.

lxc_functional_test.py is a test script to test the module. It will
1. Set up base container in a tmp directory.
2. Create a test container from the base container.
3. Test site-packages and results directory can be mounted and shared between
host and test container.
4. Run autoserv in test mode.

Also add a utility function in client/common_lib/site_utils.py to get the value
of the given argument for the function. It's used in decorator to check function
parameters.

BUG=chromium:453621
CQ-DEPEND=CL:251140

TEST=unittest,
sudo python site_utils/lxc_functional_test.py
sudo python site_utils/lxc.py -s -p /tmp/container_123
sudo python site_utils/lxc.py -s -p /tmp/container_123 -f
sudo python site_utils/lxc.py -p /tmp/container_123 -f

Change-Id: Id7b259c4bc03977974af44d6d88420b220706589
Reviewed-on: https://chromium-review.googlesource.com/247271
Reviewed-by: Dan Shi <dshi@chromium.org>
Commit-Queue: Dan Shi <dshi@chromium.org>
Trybot-Ready: Dan Shi <dshi@chromium.org>
Tested-by: Dan Shi <dshi@chromium.org>
/external/autotest/client/common_lib/error.py
4164d1d6174802673e3841974758a5242607784e 03-Dec-2014 J. Richard Barnette <jrbarnette@chromium.org> Enforce a minimum number of free i-nodes in verify_software().

This adds a check in CrosHost.verify_software to enforce a
minimum number of i-nodes available in the stateful file
system. The initial minimum is selected to be twice as large
as the number of entries in a typical stateful.tgz.

BUG=chromium:438456
TEST=Verify a broken host in a local autotest instance.

Change-Id: I2c126e5f317bc53eab089413a3da2f0d2e074253
Reviewed-on: https://chromium-review.googlesource.com/232817
Commit-Queue: Richard Barnette <jrbarnette@chromium.org>
Tested-by: Richard Barnette <jrbarnette@chromium.org>
Reviewed-by: Richard Barnette <jrbarnette@chromium.org>
/external/autotest/client/common_lib/error.py
9a535c9f3144690cf85d88a51e07b98c21454159 24-Nov-2014 Dan Shi <dshi@chromium.org> [autotest] Add server database to django model.

Server database is added to store information about servers running in an
Autotest instance. This is the first CL to implement it. Design doc:
go/chromeos-lab-serverdb-design

django model uses db_router to rout database calls to different database
connections:
local: All AFE table calls.
global: All TKO table calls.
readonly: Calls from web frontend.

This CL adds another router for all calls to server database to `server`.

DEPLOY=migrate_server_db
CQ-DEPEND=CL:230814
BUG=chromium:424778
TEST=unitest, part of the test is done by atest code that'll be in another cl.
Test server database migration:
./database/migrate.py sync 0 -d AUTOTEST_SERVER_DB
./database/migrate.py sync 1 -d AUTOTEST_SERVER_DB
./database/migrate.py sync 2 -d AUTOTEST_SERVER_DB
./database/migrate.py sync 3 -d AUTOTEST_SERVER_DB
python frontend/health/utils_unittest.py

Change-Id: I84be386c8f5b7efd53ae1ecbd6293eae4326f19f
Reviewed-on: https://chromium-review.googlesource.com/231671
Tested-by: Dan Shi <dshi@chromium.org>
Reviewed-by: Fang Deng <fdeng@chromium.org>
Commit-Queue: Dan Shi <dshi@chromium.org>
/external/autotest/client/common_lib/error.py
6285f6acffd9ed3176cdc89544944a87340ac0b1 09-May-2014 Prashanth B <beeps@google.com> [autotest] Retry when staging a control files fails in run-suite.

The cl also adds some stats for reporting run_suite failures, and
sneaks in some autoserv testing changes.

TEST=Ran run_suite against a bad devserver, raised the exception.
BUG=chromium:418928, chromium:359741, chromium:371644

Change-Id: If49a3b96c053432cb26a01a02e160176be37c037
Reviewed-on: https://chromium-review.googlesource.com/220973
Reviewed-by: Prashanth B <beeps@chromium.org>
Tested-by: Prashanth B <beeps@chromium.org>
Commit-Queue: Prashanth B <beeps@chromium.org>
/external/autotest/client/common_lib/error.py
35d661e09666d315325f8942d06949ca7283666f 26-Sep-2014 MK Ryu <mkryu@google.com> [autotest] Integrate crashlog collection into repair workflow.

When a DUT goes offline before logs are gathered, we lose those
logs if the DUT is re-imaged.
To grab such logs as much as we can, we integrate crashlog
collection into the repair workflow.

BUG=chromium:215160
TEST=./server/autoserv -R -m <DUT ip> -r ~/tmp/repair
CQ-DEPEND=CL:221510

Change-Id: Ifd562bfd539b133381572aeec503d9a3940ab448
Reviewed-on: https://chromium-review.googlesource.com/219999
Reviewed-by: Fang Deng <fdeng@chromium.org>
Commit-Queue: Mungyung Ryu <mkryu@google.com>
Tested-by: Mungyung Ryu <mkryu@google.com>
/external/autotest/client/common_lib/error.py
a94efe60bc94c9aa10ecfe40bddf97518985c7c2 19-Sep-2014 Jakob Juelich <jakobjuelich@chromium.org> [autotest] Endpoints for syncing jobs and hqes back to master

The status of jobs that were completed on a shard should be visible
in the master AFE, so a human can easily see which jobs have been run in one
central place.

This adds the functionality to the AFE to retrieve newer versions of
jobs and hqes from shards.

This is a newer version of CL:213901 which was reverted because of
http://crbug.com/418022.

BUG=418022
DEPLOY=apache, afe
TEST=Ran Suites

Change-Id: I3c9a35c78585a43d193874decbb7b16216b2c69a
Reviewed-on: https://chromium-review.googlesource.com/220141
Reviewed-by: Fang Deng <fdeng@chromium.org>
Tested-by: Jakob Jülich <jakobjuelich@chromium.org>
Commit-Queue: Jakob Jülich <jakobjuelich@chromium.org>
/external/autotest/client/common_lib/error.py
e5482e5614e47a1eda238902eaa83e16a0f5475d 26-Sep-2014 Owen Lin <owenlin@chromium.org> Revert "[autotest] Endpoints for syncing jobs and hqes back to master"

This reverts commit 1b22ff2921c65b45e3727a8aaa852325f0f0cfb4.

BUG=418022

Change-Id: I30473d21d16911f620ee7f06917c13e6017f20fb
Reviewed-on: https://chromium-review.googlesource.com/219918
Reviewed-by: Owen Lin <owenlin@chromium.org>
Commit-Queue: Owen Lin <owenlin@chromium.org>
Tested-by: Owen Lin <owenlin@chromium.org>
/external/autotest/client/common_lib/error.py
1b22ff2921c65b45e3727a8aaa852325f0f0cfb4 19-Sep-2014 Jakob Juelich <jakobjuelich@chromium.org> [autotest] Endpoints for syncing jobs and hqes back to master

The status of jobs that were completed on a shard should be visible
in the master AFE, so a human can easily see which jobs have been run in one
central place.

This adds the functionality to the AFE to retrieve newer versions of
jobs and hqes from shards.

BUG=None
DEPLOY=apache, afe
TEST=Ran Suites

Change-Id: I04c3401921a3f54bae6070639af805904952bf6a
Reviewed-on: https://chromium-review.googlesource.com/213901
Reviewed-by: Fang Deng <fdeng@chromium.org>
Commit-Queue: Jakob Jülich <jakobjuelich@chromium.org>
Tested-by: Jakob Jülich <jakobjuelich@chromium.org>
/external/autotest/client/common_lib/error.py
3b27dbc2358aef655e050a92510ff8e9e080bf81 04-Sep-2014 Jakob Juelich <jakobjuelich@chromium.org> [autotest] Fetching jobs from global AFE to moblab

To scale autotest with sharding jobs and hosts need to be fetched by
the shards. This adds the fetching-functionality on the shard side.

TEST=Ran suites and tried scheduling dummy on global and fetching it
DEPLOY=apache

Change-Id: I54ac73e07027e36982e18eb606cdf5958c8c6c89
Reviewed-on: https://chromium-review.googlesource.com/212725
Reviewed-by: Fang Deng <fdeng@chromium.org>
Commit-Queue: Jakob Jülich <jakobjuelich@chromium.org>
Tested-by: Jakob Jülich <jakobjuelich@chromium.org>
/external/autotest/client/common_lib/error.py
7a61d2f7b1c221ddd30b60e9b8d90d3052fc60e4 23-May-2014 Gwendal Grignou <gwendal@chromium.org> Add suspend method.

Add method to be able to suspend machines from server side
without calling a client test: this way, we can suspend for hours.

Remove dummy_Suspend.

TEST=Run hardware_StorageStress/control.suspend
Run hardware_StorageStress/control.quick
Run kernel_MemoryRamoop/control

BUG=chromium:376881

Change-Id: Ic7e6624485e4473a90d575ed53ea89bb164724e0
Reviewed-on: https://chromium-review.googlesource.com/201385
Reviewed-by: Gwendal Grignou <gwendal@chromium.org>
Commit-Queue: Gwendal Grignou <gwendal@chromium.org>
Tested-by: Gwendal Grignou <gwendal@chromium.org>
/external/autotest/client/common_lib/error.py
83e6b54fa090935000130fd1786422d34717d055 13-Dec-2013 Richard Barnette <jrbarnette@chromium.org> Revert "Improve the standard error message in the lab if an update fails."

This reverts commit 71fe97fe10f6979e7db628e28ef0de087b79c021.

BUG=chromium:328522

Change-Id: Iec595fa3094a8079056786db88c8639209896fec
Reviewed-on: https://chromium-review.googlesource.com/180046
Reviewed-by: Richard Barnette <jrbarnette@chromium.org>
Commit-Queue: Richard Barnette <jrbarnette@chromium.org>
Tested-by: Richard Barnette <jrbarnette@chromium.org>
/external/autotest/client/common_lib/error.py
71fe97fe10f6979e7db628e28ef0de087b79c021 11-Dec-2013 Don Garrett <dgarrett@google.com> Improve the standard error message in the lab if an update fails.

Produce a more meaningful (but still generic) error message in the lab
if an update fails to apply.

BUG=chromium:246779
TEST=New unittest + trybots

Change-Id: Ib3be5fe27d7fd60732f9d20db4a08d1994358939
Reviewed-on: https://chromium-review.googlesource.com/179543
Reviewed-by: Richard Barnette <jrbarnette@chromium.org>
Commit-Queue: Don Garrett <dgarrett@chromium.org>
Tested-by: Don Garrett <dgarrett@chromium.org>
/external/autotest/client/common_lib/error.py
3cbd76b06c383d8bc3e4ba959659a0bd04180761 27-Nov-2013 J. Richard Barnette <jrbarnette@chromium.org> Move certain content from client/ to server/site_utils.py

This moves the lab status functions and ParseBuildName(). They
were out of place in client/common_lib, as they're only needed/
meaningful in server side code.

BUG=None
TEST=run driver_unittest.py

Change-Id: I756291f27d7b041f0a907dee4004c3b447def929
Reviewed-on: https://chromium-review.googlesource.com/178306
Reviewed-by: Richard Barnette <jrbarnette@chromium.org>
Commit-Queue: Richard Barnette <jrbarnette@chromium.org>
Tested-by: Richard Barnette <jrbarnette@chromium.org>
/external/autotest/client/common_lib/error.py
cd69dc0d26c44dd7d8b61c972cc962e2cb786ef2 09-Sep-2013 Christopher Wiley <wiley@chromium.org> autotest: Ignore ssh command timeouts on request

Add a flag to SSHHost.run() that allows callers to ignore command
timeouts. Upon SSH command timeouts, we get None instead of a result
value. Callers must be prepared to expect this.

TEST=Add a host parameter to dummy_PassServer and add:
host.run('sleep 10', timeout=1, ignore_timeout=True)
Observe that the test still passes, unlike before.
BUG=chromium:282471

Change-Id: I2bf64fb3f06b57d44ee7f13ad51ca2b19707891e
Reviewed-on: https://chromium-review.googlesource.com/168651
Tested-by: Christopher Wiley <wiley@chromium.org>
Reviewed-by: Simran Basi <sbasi@chromium.org>
Commit-Queue: Christopher Wiley <wiley@chromium.org>
/external/autotest/client/common_lib/error.py
46250750c649237074dfada83582d743afd33cca 28-Aug-2013 Aviv Keshet <akeshet@chromium.org> [autotest] add a no_pipes argument to BgJob constructor

This CL introduces an alternative type of BgJob, to match the master-ssh
connection use case. The new type of BgJob is created by specifying
no_pipes=True when calling BgJob's constructor. BgJobs constructed in
this way do not expect to ever be joined with a join_bg_jobs call, and
do not interact via their stdout/stderr with other BgJobs.

This CL also causes the master ssh connection BgJob to be created with
this flag.

This CL only addresses flaw #2 in the "Problems with current semantics"
section of the referenced bug.

BUG=chromium:279312
TEST=Unit tests pass. Running an autoserv tests with ssh verbosity
turned up to 3 no longer causes a deadlock.

Change-Id: I1a6861501eb4fc8439add213c79eaa3777978df0
Reviewed-on: https://chromium-review.googlesource.com/167173
Reviewed-by: Aviv Keshet <akeshet@chromium.org>
Tested-by: Aviv Keshet <akeshet@chromium.org>
Commit-Queue: Aviv Keshet <akeshet@chromium.org>
/external/autotest/client/common_lib/error.py
4a193695bd3038f0d44f039584fc5c5015b13404 21-Aug-2013 Alex Miller <milleral@chromium.org> [autotest] create_job should fail if the metahost cannot run the job

If one passes a specific list of hosts into `create_job`, then those
hosts are vetted to make sure they satisfy the dependencies of the job.

If one passes in a metahost, no checking is done. This is unfortunate,
as it means one needs to be very careful when scheduling jobs with
metahosts to make sure that it is actually possible for the job to run.
Instead, let's just do the checking in the RPC and raise an
easy-to-identify Exception if we do hit this case.

BUG=chromium:250586
DEPLOY=apache
TEST=unit, Scheduled a job with a metahost and DEPENDENCIES that did not
exist. Got an error.NoEligibleHostException. Both dummy and bvt still
run (testing provisionable labels and tests with unsatisfyable
dependencies).

Change-Id: I020be2607867fafd04194b9c17d3052b006f60e0
Reviewed-on: https://chromium-review.googlesource.com/66603
Tested-by: Alexander Miller <milleral@chromium.org>
Reviewed-by: Dan Shi <dshi@chromium.org>
Reviewed-by: Prashanth Balasubramanian <beeps@chromium.org>
Commit-Queue: Alexander Miller <milleral@chromium.org>
/external/autotest/client/common_lib/error.py
60aec2423a2c2a14c46dc21757a6fd748931f428 26-Jun-2013 beeps <beeps@chromium.org> [autotest] Divorce the devserver retry requests and sigalarm.

All dev_server requests made from the client go through a retry
wrapper that uses sigalarm to expedite unresponsive calls. Since
we cannot register our signal handlers with mod wsgi, this cl
modifies the urlopen call to manage an internal socket timeout
instead. In order to continue retrying on other URLErrors, the
urlopen wrapper in site_utils converts socket timeouts to
TimeoutExceptions.

TEST=
1. Added a bad devserver, tried to run_suite on a build that hashed
to said devserver with and without this change and verified that
it only worked in the latter case.
2. Sigalarm still fires when devserver's resolve is called outside wsgi,
and urlopen has a larger timeout.
3. Non TimeoutException URLErrors retry.
4. dev_server_unittest pass.
BUG=chromium:246209

Change-Id: Iec9ef39982f4c8b92e260cf27bf454e624bccfa9
Reviewed-on: https://gerrit.chromium.org/gerrit/58659
Tested-by: Prashanth Balasubramanian <beeps@chromium.org>
Reviewed-by: Alex Miller <milleral@chromium.org>
Commit-Queue: Prashanth Balasubramanian <beeps@chromium.org>
/external/autotest/client/common_lib/error.py
62bacae728a8e736060c225cccdc21b2f6f641d8 05-Mar-2013 Scott Zawalski <scottz@google.com> Revamp repair workflow.

Modify all repair functions to raise exceptions rather than return a
bool and raise an exception.

Change repair_full to iterate through each repair function until one of
them repairs the DUT or we have no more to use.

Modify servo_repair to include an initial power on step. Often times if
a DUT is unreachable it may just need to be turned back on. This saves
us a bit of overhead when it comes to repairing the device.

Modify site_host calls to use RPCs instead of models directly. Removing
direct database access where we can will be preferred moving forward.

Fix a bug where we fail to resolve to a different dev_server if one is
down.

Modify power_state_controller.power_on to default to REC_OFF.

TEST=Tested on a good DUT, tested on a DUT that was in a bad state but
was pingable, tested on a completely dead DUT with servo.
server/autoserv -C -m scottz-stumpy1 --image stumpy-release/R27-3837.0.0
utils/unittest_suite.py
autotest_lib.client.common_lib.cros.dev_server_unittest
server/autoserv -s -m chromeos1-rack3-host9
server/site_tests/platform_InstallTestImage/control
End to end suite run

BUG=chromium:220303,chromium:225782,chromium:223094

Change-Id: I894e59413b7e1f758a97c05cdee8e1e88e477d7f
Reviewed-on: https://gerrit.chromium.org/gerrit/47437
Commit-Queue: Scott Zawalski <scottz@chromium.org>
Reviewed-by: Scott Zawalski <scottz@chromium.org>
Tested-by: Scott Zawalski <scottz@chromium.org>
/external/autotest/client/common_lib/error.py
39164cad07a790017c84482bb5f68768b27313cf 27-Mar-2013 Aviv Keshet <akeshet@chromium.org> [autotest] only retry tests if they fail with TestFailRetry

For tests that have known flaky failure modes, it is still desirable for
the test to fail (without retries) when an unknown flaky failure occurs.
Therefore, this CL changes the behavior of test retries, so that retires
of a test are only attempted if the test fails with a TestFailRetry
exception. Any other test failure will be treated as a failure
regardless of retries.

This means it is up to the tests in question to catch errors /
exceptions caused by known flaky failure modes, and rethrow those as
TestFailRetry.

For the purposes of testing this change, some changes have been made to
the dummyflake suite.

CQ-DEPEND=Ibaa84f42beac52881cd34351e92474ef1457b15b

BUG=chromium:224372
TEST=added new unit test for test.py
run_remote_tests.sh --remote=<ip> suite:dummyflake;
Suite runs as expected. In particular --
- client/.../dummy_Fail/control.retry_alwaysfail fails immediately even
though the control file uses retries, because the failure is of type
TestFail and hence not retry-able
- The same applies to server/.../dummy_Fail/control.retry_failfast
- client/.../dummy_Fail/control.retry_alwaysflake fails and gets
retried 5 times, failing with a TestRetryFail each time such that it
can be retried

Change-Id: I4d1354cb410856c9de8b720c9f8310cb10d03156
Reviewed-on: https://gerrit.chromium.org/gerrit/46696
Commit-Queue: Aviv Keshet <akeshet@chromium.org>
Reviewed-by: Aviv Keshet <akeshet@chromium.org>
Tested-by: Aviv Keshet <akeshet@chromium.org>
/external/autotest/client/common_lib/error.py
a713e2575a9ea59db59444deb29a951a395aec7e 01-Mar-2013 Alex Miller <milleral@chromium.org> [autotest] Do not allow unicode control files.

Our system does not properly handle non-ascii characters. Therefore,
rather than having the scheduler explode somewhere down the line, let's
just explicitly disallow control files that contain unicode characters.

BUG=chromium-os:39337
TEST=local run_suite

Change-Id: Id2dcee75087803f1bd4236872f75e71039ae034b
Reviewed-on: https://gerrit.chromium.org/gerrit/44401
Tested-by: Alex Miller <milleral@chromium.org>
Reviewed-by: Aviv Keshet <akeshet@chromium.org>
Reviewed-by: Scott Zawalski <scottz@chromium.org>
Commit-Queue: Alex Miller <milleral@chromium.org>
/external/autotest/client/common_lib/error.py
30837901b7793a49e39a2e2f8c7f9bd7b71dd64f 03-Feb-2013 Alex Miller <milleral@chromium.org> [autotest] Refactor reimage type selection to support >2 types.

One now passes a string that is tied to the name of the type of
reimaging that one would like to do. More reimaging types can now
be easily added.

BUG=chromium-os:38250
TEST=run_suite with trybot'd control.dummy changed to use reimage_type

Change-Id: I276556ff6822800cc846b20b564ffc36ec07e61b
Reviewed-on: https://gerrit.chromium.org/gerrit/42748
Reviewed-by: Aviv Keshet <akeshet@chromium.org>
Reviewed-by: Simran Basi <sbasi@chromium.org>
Commit-Queue: Alex Miller <milleral@chromium.org>
Tested-by: Alex Miller <milleral@chromium.org>
/external/autotest/client/common_lib/error.py
24c27c1e92abea892f4bbf3ed14b1a979d22d6e1 09-Aug-2012 Alex Miller <milleral@chromium.org> [autotest] Find package of crashing processes.

Do some clever find/portageq tricks to map an executable name back to
the package that owns the executable while we're collecting crashes.
Follow up work will then deduplicate and file bugs on these crashes.

BUG=chromium-os:32834
TEST=pkill -SEGV tlsdated, and looked for "Would report bug on
net-misc/tlsdate-0.0.4-r14." in logs.

Change-Id: I54426eaef6b1954746cb3d2405a0c292a4979559
Reviewed-on: https://gerrit.chromium.org/gerrit/29828
Commit-Queue: Alex Miller <milleral@chromium.org>
Reviewed-by: Alex Miller <milleral@chromium.org>
Tested-by: Alex Miller <milleral@chromium.org>
/external/autotest/client/common_lib/error.py
41bfae4ba63e7010e882d3de9fd8eea0612a4f8a 09-Jan-2013 Simran Basi <sbasi@chromium.org> Autotest: Use Lab Status to Disable Certain Boards

Now that we have the Lab Status Page up, we would like to make more
use of it by allowing it to be able to disable running new suites
on certain boards.

This becomes useful should a bug starts bringing down DUT's for a
specific subset of boards.

Now the status message should follow the format of:
Lab is 'status' [boards_disabled] (comment)

For example:
Lab is Open [stumpy, kiev, x86-alex] (power_resume bug bringing down
DUT's)

BUG=chromium-os:37346
TEST=local setup

Change-Id: Ib2e4960f8cac427db1606f56477305d82bc110d4
Reviewed-on: https://gerrit.chromium.org/gerrit/40940
Reviewed-by: Scott Zawalski <scottz@chromium.org>
Reviewed-by: Simran Basi <sbasi@chromium.org>
Tested-by: Simran Basi <sbasi@chromium.org>
Commit-Queue: Brian Harring <ferringb@chromium.org>
/external/autotest/client/common_lib/error.py
22aa9fe678bec0e6a1451922f96b6973ea3586f1 08-Dec-2012 Simran Basi <sbasi@chromium.org> Autotest: Be able to grab the lab status and add it to run_suites

Now that the lab status page is up, we need to be able check when the
lab is not up and in that case stop run_suite from being able to schedule
jobs.

BUG=chromium-os:37095
TEST=Changed the lab status page to lab is closed and ensure that run_suites
did not schedule the job if that occured.

Change-Id: I0e0f80e872c4b94f5d6148eb5634298ff7263cbc
Reviewed-on: https://gerrit.chromium.org/gerrit/39449
Reviewed-by: Simran Basi <sbasi@chromium.org>
Tested-by: Simran Basi <sbasi@chromium.org>
Commit-Queue: Simran Basi <sbasi@chromium.org>
/external/autotest/client/common_lib/error.py
94d9bd0eb3dc70f7261a39c3ba97b98aacb4acc0 13-Nov-2012 Simran Basi <sbasi@chromium.org> Autotest: Dynamic Suite dies if Try Job has been aborted.

Updated wait_for_and_lock_job_hosts to check if all the dependent
jobs have been aborted. If so return False and the reimager will
also return False.

This will prevent suite jobs from getting stuck Running if the try
job has actually been aborted.

BUG=chromium-os:36175
TEST=local setup. Ensured that when a try job is aborted the suite job
died as well. Also updated the unittests.

Change-Id: Iedf40953e3d2a373886d168d0ae918e7b215499f
Reviewed-on: https://gerrit.chromium.org/gerrit/37918
Reviewed-by: Scott Zawalski <scottz@chromium.org>
Reviewed-by: Simran Basi <sbasi@chromium.org>
Tested-by: Simran Basi <sbasi@chromium.org>
/external/autotest/client/common_lib/error.py
8906ab1e576797069b5b928e646f06da015fbfd0 24-Jul-2012 Chris Masone <cmasone@chromium.org> [autotest] Honor DEPENDENCIES information when running dynamic_suites.

A test control file can specify a list of DEPENDENCIES, which are really just
the set of labels a host needs to have in order for that test to be scheduled
on it. In the case of a dynamic_suite, many tests in the suite may have
DEPENDENCIES specified. They may overlap, they may not.

This is a first-pass at a very naive mechanism for finding and reimaging a
set of machines that can satisfy all the test DEPENDENCIES in a given suite.
Per-test-per-suite DEPENDENCIES information is generated at build time, and
then fetched and consumed during suite preparation. If info exists for the
suite being run, the infrastructure will look for a host that matches each
unique DEPENDENCY list. If it can find such a set that is <= the suite
sharding factor, the infrastructure will schedule those machines for
reimaging. If not, the suite will fail.

If the suite to be run has no DEPENDENCIES, meta_host scheduling will be used
as today.

BUG=chromium-os:22060
TEST=unit
TEST=run_suite.py with a suite (like 'dummy') that uses DEPENDENCIES
TEST=run_suite.py with a suite that doesn't use DEPENDENCIES
TEST=run_suite.py with a suite that uses DEPENDENCIES; shut down a non-essential machine during reimage. Suite should complete.
TEST=Same as above, but for a suite that doesn't use DEPENDENCIES
TEST=run_suite.py with a suite that uses DEPENDENCIES; shut down an essential machine (e.g. the only one with the 'bluetooth' label) during reimage. Suite should not complete.

Change-Id: I64b2e39a79a05c92748f34ffa4acf7667b0476a6
Reviewed-on: https://gerrit.chromium.org/gerrit/27526
Commit-Ready: Chris Masone <cmasone@chromium.org>
Reviewed-by: Chris Masone <cmasone@chromium.org>
Tested-by: Chris Masone <cmasone@chromium.org>
/external/autotest/client/common_lib/error.py
8dca4641f3b98181843b752e2b51b99c52541a0a 31-Aug-2012 Alex Miller <milleral@chromium.org> [autotest] Unlock machines in the SIGTERM handler.

This patch semi-reverts the SignalsAsExceptions work, as the code being
run inside the context manager isn't exception-safe. Instead, we
directly hold onto the HostLockManager, and manually unlock machines if
we receive a signal or leave the context.

BUG=chromium-os:33523
TEST=pylint, unit
TEST=queue jobs, and run nuke_pid on all the autoserv pids. No missing
exit code errors were encountered.

Change-Id: I669d852aa87fc2a9fcc3111864b0065bfcd44cb4
Reviewed-on: https://gerrit.chromium.org/gerrit/32163
Commit-Ready: Alex Miller <milleral@chromium.org>
Reviewed-by: Alex Miller <milleral@chromium.org>
Tested-by: Alex Miller <milleral@chromium.org>
/external/autotest/client/common_lib/error.py
b493555db2d43e79d96e793cae9d1ffb822dd6c1 14-Aug-2012 Chris Masone <cmasone@chromium.org> [autotest] Move dynamic suite code into its own module

No big rewrite, just moving files around

BUG=chromium-os:30266
TEST=unit
TEST=successful run_suite.py run
TEST=suite_enumerator.py, suite_preprocessor.py, and suite_scheduler.py

Change-Id: I2fbcae0332104ce3adcb10a1e90ce94cb209aca8
Reviewed-on: https://gerrit.chromium.org/gerrit/30267
Reviewed-by: Scott Zawalski <scottz@chromium.org>
Commit-Ready: Chris Masone <cmasone@chromium.org>
Tested-by: Chris Masone <cmasone@chromium.org>
/external/autotest/client/common_lib/error.py
31cf2bdbd8bded9c8e2aa1dfff56c33a4f068c91 15-Aug-2012 Simran Basi <sbasi@chromium.org> Autotest: Have the scheduler not die trying to kill a dead pid

Currently if the drone tries to kill a process that has a PID that does
not exist, the scheduler can crash and leave itself in a bad state on
reboot.

Therefore in this CL we instead log a message in this situation and
continue on.

Added a new type of autoserv error and if the pid is dead that error is
raised to drone_utility which will catch the error and continue.

BUG=chromium-os:33374
TEST=ensured that a nonexistant PID logs a message into
drone_utlity.warnings and a valid PID is actually killed by
kill_process.

Change-Id: If8712ae946fba3644d462accb80307a7faa825eb
Reviewed-on: https://gerrit.chromium.org/gerrit/30350
Reviewed-by: Yu-Ju Hong <yjhong@chromium.org>
Reviewed-by: Chris Masone <cmasone@chromium.org>
Commit-Ready: Simran Basi <sbasi@google.com>
Tested-by: Simran Basi <sbasi@google.com>
/external/autotest/client/common_lib/error.py
7a2160a31f5ca4ce41faac94aeb3c3ffc389021e 01-Aug-2012 Alex Miller <milleral@chromium.org> [autotest] Throw on sigterm when locking machines.

If the python process receives a sigterm while machines are locked, the
machines will never be unlocked. If we translate the signal into an
exception, then the standard python cleanup mechanisms can apply, and
all will be well.

BUG=chromium-os:33094
TEST=pylint+unit

Change-Id: Ifdd96df1fef809da9618e47d7361c290e29cdd76
Reviewed-on: https://gerrit.chromium.org/gerrit/29321
Tested-by: Alex Miller <milleral@chromium.org>
Reviewed-by: Chris Masone <cmasone@chromium.org>
Commit-Ready: Alex Miller <milleral@chromium.org>
/external/autotest/client/common_lib/error.py
9807bd6ce1d549c9a94d87f4dbb5e39ce597c697 11-Jul-2012 Chris Masone <cmasone@chromium.org> [autotest] Add HostLockManager class, for locking/unlockin DUTs

An instance of HostLockManager is intended to be bound to a set of
hostnames shortly after instantiation. Thereafter, it can be used to
lock/unlock those hosts freely, until it is destroyed. At that time,
it will unlock() the associated hosts for you and complain that you
should've done it yourself.

This class is intended for use with dynamic_suite.Reimager and
dynamic_suite.Suite. The purpose is to allow Reimager.attempt() to
lock some hosts while allowing Suite.run_and_wait() to unlock them
during the course of its run. Therefore, a HostLockManager must be
instantiated _before_ we know what hosts are being reimaged, and live
after Reimager.attempt() has finished execution. Hence, the prime()
method that takes an iterable of hostnames.

BUG=chromium-os:30978
TEST=unit

Change-Id: I806a39ccc4951b011b2f7664aa4e942506829bbb
Reviewed-on: https://gerrit.chromium.org/gerrit/27204
Tested-by: Chris Masone <cmasone@chromium.org>
Reviewed-by: Scott Zawalski <scottz@chromium.org>
Commit-Ready: Chris Masone <cmasone@chromium.org>
/external/autotest/client/common_lib/error.py
f8b5306840870a8ebec3a5dc4b77c0bd79a69c5b 09-May-2012 Chris Masone <cmasone@chromium.org> [autotest] Make json_rpc raise meaningful exceptions

Add some dynamic suite exceptions to client/common_lib/error.py so
that different parts of the system can all reference them. Then,
enable the json_rpc code to detect these exceptions coming back
over the wire, re-instantiate them on the client side, and raise
them.

BUG=chromium-os:30279
TEST=unit
TEST=use atest suite create to try to create a suite for a build that doesn't exist
TEST=use atest suite create to try to run a suite that doesn't exist

Change-Id: I1b6d56a7e1bdb63cc893a07581efc8decc0407f4
Reviewed-on: https://gerrit.chromium.org/gerrit/22250
Tested-by: Chris Masone <cmasone@chromium.org>
Reviewed-by: Chris Sosa <sosa@chromium.org>
Commit-Ready: Chris Masone <cmasone@chromium.org>
/external/autotest/client/common_lib/error.py
8adf78936c915df6fd1edb6c592f40a7ed8350a5 09-Sep-2011 Dale Curtis <dalecurtis@chromium.org> Autotest upstream merge.

Merged from d9d64b855363d214996b187380532d4cc9991d29 to
7bad38846fe9c74e42018131ce85aec2b5e6c7a9

BUG=none
TEST=emerge autotest, run bvt, smoke.

Change-Id: Ibe6462198e84e0d41fa160af086283cd712da4a6
Reviewed-on: http://gerrit.chromium.org/gerrit/7440
Tested-by: Dale Curtis <dalecurtis@chromium.org>
Reviewed-by: Dale Curtis <dalecurtis@chromium.org>
/external/autotest/client/common_lib/error.py
861b2d54aec24228cdb3895dbc40062cb40cb2ad 04-Feb-2011 Eric Li <ericli@chromium.org> Merge remote branch 'cros/upstream' into master

Merged to upstream autotest @4749~@5215.

The entire change list description is too big to enlist here. Please refer to upstream (http://autotest.kernel.org/browser) for more details.

BUG=
TEST=emerged both x86 and arm build.
Tested emerged x86 build bvt against a chromeos device.

Review URL: http://codereview.chromium.org/6246035

Change-Id: I8455f2135c87c321c6efc232e2869dc8f675395e
/external/autotest/client/common_lib/error.py
2615f4ae76880e2882d6873f7a735b4a79cd0786 19-Jul-2010 jadmanski <jadmanski@592f7852-d20e-0410-864c-8624ca9c26a4> Add a exception that repair code can throw to indicate that it believes hardware repairs are necessary, and have the full-repair implementation call the hardware repair method after seeing that exception multiple times.

Signed-off-by: John Admanski <jadmanski@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@4723 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/common_lib/error.py
999fb13dcbf4de5e37ca2b3059ef1061b5faba43 23-Apr-2010 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> barrier cleanups:
* renames barrier.py to base_barrier.py and adds a barrier.py
stub to import from base_barrier and override with site_barrier
if found. barrier_unittest.py is renamed to match.
* Move BarrierAbortError to the error module with everything else.
* Add a rendezvous_servers abort=True from the server test case.
* Moved get_sync_control_file() from common_lib.utils to
server.base_utils where it belongs to avoid a circular
import of utils importing barrier.

Signed-off-by: Gregory Smith <gps@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@4444 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/common_lib/error.py
c1dda2104e10faa089c466886055390e00103367 18-Nov-2009 jadmanski <jadmanski@592f7852-d20e-0410-864c-8624ca9c26a4> Replacing AutoservInstallError with a slightly different version.

Signed-off-by: John Admanski <jadmanski@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@3954 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/common_lib/error.py
9fa2afc4d2a8c36e3e892365c62f661b9770eca6 18-Nov-2009 lmr <lmr@592f7852-d20e-0410-864c-8624ca9c26a4> Adding AutoservInstallError to common_lib.error

server/autotest.py was referencing it but it didn't exist.
This patch creates the error class.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@3953 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/common_lib/error.py
ce955fcf58207d795ff1fe0001851b8b3728452c 24-Aug-2009 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Created a common_lib host object hierarchy (with site specific override
support) and moved *some* non server specific code from server/hosts to
the common_lib version. Created a client.bin LocalHost host object
inheriting from the common_lib Host and implemented a run() method based
on utils.run() (ie a host object for the local machine). Modified
client/bin/autotest to receive a new --hostname argument to tell it the
hostname to use for the LocalHost.hostname instance attribute and
updated server/autotest.py to send use this argument. Modified
client.bin.job to set a self.host instance attribute with an instance of
LocalHost and updated the unittest. Added an AutotestHostRunError class
(raised on LocalHost.run() failures).

Risk: high (there are modifications in the core server side support code
and some core client code).

Tested with verify/repair and client/server sleeptest jobs.

To be able for SVN to remember code history (that most of the new
client/common_lib/hosts/base_classes.py is based on the old
server/hosts/base_classes.py) then the following steps are probably needed
to apply this patch:
$ svn mkdir client/common_lib/hosts
$ svn copy server/hosts/base_classes.py client/common_lib/hosts
$ patch -p1 ...
$ svn add client/bin/local_host.py client/bin/local_host_unittest.py client/common_lib/hosts/__init__.py client/common_lib/hosts/base_classes_unittest.py

Signed-off-by: Mihai Rusu <dizzy@google.com>


git-svn-id: http://test.kernel.org/svn/autotest/trunk@3594 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/common_lib/error.py
c27c231ee840e8ce97012477ba1f917674375a1e 05-Aug-2009 jadmanski <jadmanski@592f7852-d20e-0410-864c-8624ca9c26a4> A very large first-pass refactoring of the packaging code. Ultimately
my goal is to replace the if-elif-elif-else type method calls in
the package manager that fetches a file with a more OO-style method
that tries to fetch the files from a variety of RepositoryFetcher
instances. My primary motivation for doing that is so that I can
add a more specialized RepositoryFetcher instance that's closesly
tied to the code in harness_autoserv.py and I feel it would be a bad
idea to try and intergrate that into packages.py itself.

However some other refactoring and cleanup ended up being required
so as a first pass I left the if-elif-elif-else style of
fetch_pkg_file, except now it just creates and instance of the
RepositoryFetcher on the fly and asks it to fetch a package.

The major changes that I did make were:
- moved the fetch_pkg_file_* methods into RepositoryFetcher classes
- moved the bulk of the packages.py into a base_packages.py file
and just left a base+site stub in packages.py since I was running
into some circular dependency troubles with packages and
site_packages
- moved the package error classes out of packages.py and into
error.py, and added an extra abstract error class so that all
the package error classes inherit from a common class
- cleaned up some of the fetch_pkg_file_* code while moving it around
such as removing a bunch of dead code from fetch_pkg_file_http
- fixed up all the utilities, tests and infrastructure that
referenced the packages module to use the error module instead
(or in a few cases base_packages)

Functionally these rather large changes should actually have very
little impact on Autotest as a whole, since this is mostly just moving
code around. I plan to follow it up with another patch later on that
replaces the fetch_pkg_file code with something that uses a set of
long-lived RepositoryFetcher instances, along with factory methods
for constructing those fetchers, and then later on with a patch that
adds support for retriving packages directly from autoserv (using
harness_autoserv).

Risk: High
Visibility: Mostly refactoring, moved error classes into error.py,
an a few bits and pieces of code cleanup in the moved
code.

Signed-off-by: John Admanski <jadmanski@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@3511 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/common_lib/error.py
65eb8f50740bb290f8b4e5340c44ac15c558b601 24-Jul-2009 jadmanski <jadmanski@592f7852-d20e-0410-864c-8624ca9c26a4> Allow for multiple retries when attempting to hard reset a
a machine using conmux.

Signed-off-by: Travis Miller <raphtee@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@3435 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/common_lib/error.py
c971c5f48255e9a016fb86fbb902ca210dcc2915 08-Jun-2009 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Added specific exceptions for various failures in verify and changed the
code that raised them to use these new exceptions. Completely reworked
the 3 repair phases to try to fix things by handling the specific errors
generated by verify (in a loop where it exits either by not being able
to fix an issue or if the last verify ran successfully). Reorganized
some code to support this new way to repair hosts.

The code tries to remember each repair handler it used to catch the case
where even after executing the handler the same verify failure is
reported and it may execute the repair handler in an infinite loop.
When it finds out that the same repair handler has already been executed
it will re-raise the original exception hoping it will be cought in
surrounding try/except contexts or the exception will make repair fail.

Signed-off-by: Mihai Rusu <dizzy@google.com>


git-svn-id: http://test.kernel.org/svn/autotest/trunk@3217 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/common_lib/error.py
9d738d6db3b900f509c8c94581da9062819928dc 09-Mar-2009 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Moved server.hosts.ssh_host.PermissionDeniedError into
client.common_lib.error.AutoservSsshPermissionDeniedError and updated
users. Changed parsing of 'Permission denied.' SSH error to work in
verbose mode too. Changed AbstractSSHHost.ssh_ping() to not convert the
permission denied error to a AutoservRunError and instead let it
propagate to the callers (it is inherited from AutoservRunError
anyways).

Signed-off-by: Mihai Rusu <dizzy@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@2857 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/common_lib/error.py
25c0b8cb56358f22dccf7fdc32dd1662787dc9ca 24-Jan-2009 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Added new host protection level (repair software only) that would allow any
type of repair except the hardware repairs. Updated users. Added
Host.request_hardware_repair() function to be called by repair_full when
software repair fails. Added error.AutoservHardwareRepairRequestedError to be
raised when hardware repair has been requested and updated server_job.repair()
to let it propagate through.

Signed-off-by: Mihai Rusu <dizzy@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@2686 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/common_lib/error.py
1ca1c2c8f46ee8bbc8f005df12ab377809dd9815 10-Dec-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Fix wrong parent constructor call from UnhandledJobError.__init__

Signed-off-by: Gregory Smith <gps@google.com>




git-svn-id: http://test.kernel.org/svn/autotest/trunk@2558 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/common_lib/error.py
c39fa9ada24f773079d6162383013827e4bc4292 06-Dec-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Catch and categorize errors raised directly from the controlfile top
level itself. This takes care of runs using a single non-stepped
control file that raise any of the Test exceptions.

Removes the recently added JobNAError. It and TestNAError are
identical, there is never a case where one would be caught and the
other wouldn't.

This is hopefully the final nail in the error handling coffin.

Signed-off-by: Gregory Smith <gps@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@2549 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/common_lib/error.py
4f407467b805dfef38c886364f575581775105f3 03-Dec-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Adds an UnhandledJobError exception and JobNAError exception.

When executing steps in the step engine, catch JobNAError and record it
as a TEST_NA and continue on to the next step. Turn all other
non-SystemExit exceptions into an UnhandledJobError wrapping the
original.

This allows control files and othe common code to raise
error.JobNAError to indicate that a particular thing in a multi-test
(step) control file cannot be run but should not cause the entire job
to abort.

Signed-off-by: Gregory Smith <gps@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@2534 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/common_lib/error.py
021679f1803cf6c95b5a9ab57550179d5da2a183 27-Nov-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Document job exception handling machinations in comments and remove an
except Exception: case in job.run_test() that was impossible to reach.

Allow error.JobError raised from a test (run via run_test or run_group)
to be recorded as an ABORT and passed on up to actually ABORT things.

Signed-off-by: Gregory Smith <gps@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@2522 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/common_lib/error.py
9167225694a0c89a256172a189e153fe4e4c82f7 17-Oct-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Add an __all__ to limit the names imported in the common case where code
does 'from autotest_lib.client.common_lib.errors import *' to only
those that we define ourselves.

Signed-off-by: Gregory Smith <gps@google.com>




git-svn-id: http://test.kernel.org/svn/autotest/trunk@2296 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/common_lib/error.py
6ef0b672180d334b4c992315dc63ee4e2d3c9128 01-Oct-2008 jadmanski <jadmanski@592f7852-d20e-0410-864c-8624ca9c26a4> It is possible for a CmdError to be raised with an exit_status of
None, if the command times out and cannot be SIGTERMed or SIGKILLed.
The CmdError.__str__ method needs to be able to handle that case.

Risk: Low
Visibility: If a command times out and can't be SIGKILLed, we should
still be able to str the resulting CmdError.

Signed-off-by: John Admanski <jadmanski@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@2212 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/common_lib/error.py
6d7e94ff89987771f785dfead456eb4e6455e3a0 20-Aug-2008 showard <showard@592f7852-d20e-0410-864c-8624ca9c26a4> Include repr() of the CmdResult object in str() of CmdError and AutoservRunError. This should make it easier to debug problems with failed commands.



git-svn-id: http://test.kernel.org/svn/autotest/trunk@2018 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/common_lib/error.py
f2171e28f35eb8439c4038a4e3d079c606ae6e2f 28-Jul-2008 jadmanski <jadmanski@592f7852-d20e-0410-864c-8624ca9c26a4> Add in a pass to an empty class definition, for consistency with our other declarations.

Signed-off-by: John Admanski <jadmanski@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@1907 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/common_lib/error.py
c218083b6b96257788364ef8b7fa0fad5087fcbd 25-Jul-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Smarter way that tests handle default exceptions (unhandled errors) and also a cleanup on test exception classes.

From: rxaviers@br.ibm.com



git-svn-id: http://test.kernel.org/svn/autotest/trunk@1899 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/common_lib/error.py
e867310401602123035b11d95f67d1fbc9880446 16-Jul-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Summary: Fixing circular reference issue during barrier module import.

The issue was breaking nearly all autotest modules, since it's right on
the common_lib setup. The fix was simple, just remove the circular
reference to common. Also, changed the placement of the __author__
decorator, and transferred the BarrierError class to the error module,
for the sake of consistency (all other modules define their exceptions
on error). This patch is the fix for the bug #4
(http://test.kernel.org/trac-autotest/ticket/4)

Visibility: High (Makes all modules that import common to work again)

Signed-off-by: Lucas Meneghel Rodrigues <lucasmr@br.ibm.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@1840 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/common_lib/error.py
c23051cdb6499bb38795b7edc970dde38d2a3f1c 27-Jun-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Some fixes and minor cleanups as suggested by PyLint.

Signed-off-by: Jeremy Orlow <jorlow@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@1745 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/common_lib/error.py
8d01bfe40a0ae23cea194dd08a107b9d222282ff 23-Jun-2008 jadmanski <jadmanski@592f7852-d20e-0410-864c-8624ca9c26a4> The changes to the error hierarchy in rev 1732 break the UnhandledError
class by changing the superclass but not properly adjusting the
superclass __init__ calls.

Also fixes up some inconsistent spacing introduced by the same patch.

Signed-off-by: John Admanski <jadmanski@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@1734 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/common_lib/error.py
b48fa5697850e04c0a5eb0abc094b9dff3c806e9 23-Jun-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Add other test exit status according to the spec in:
http://test.kernel.org/autotest/ResultsSpecification

TestNAError -> TEST_NA (clean msg)
TestError -> ERROR (clean msg)
TestFail -> FAIL (clean msg)
default -> FAIL (traceback)

Risk: Low, since the default behavior is still the same (FAIL)
Signed-off-by: Rafael Xavier <rxaviers@br.ibm.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@1732 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/common_lib/error.py
e01c2e5ac45beee3c595c4aac28940bf7c54449e 18-Jun-2008 jadmanski <jadmanski@592f7852-d20e-0410-864c-8624ca9c26a4> Lets not insert a newline between every single character of the
exception traceback.

Risk: Low
Visibility: Should reduce the number of lines in UnhandledError
tracebacks.

Signed-off-by: John Admanski <jadmanski@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@1721 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/common_lib/error.py
6f731364e6207c198ac8de748a043eba1e9223b3 17-Jun-2008 jadmanski <jadmanski@592f7852-d20e-0410-864c-8624ca9c26a4> Changes the semantics of UnhandledError. First, it takes in a root
exception to wrap, rather than implicitly grabbing the last caught
exception. Second, it displays the root exception message instead
of wrapping it in a new message and only displaying the root cause
in a pre-collected traceback.

Signed-off-by: John Admanski <jadmanski@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@1710 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/common_lib/error.py
0afbb6369aa5aa9a75ea67dd9e95ec4b21c0c181 06-Jun-2008 jadmanski <jadmanski@592f7852-d20e-0410-864c-8624ca9c26a4> Convert all python code to use four-space indents instead of eight-space tabs.

Signed-off-by: John Admanski <jadmanski@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@1658 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/common_lib/error.py
7aff6bd66565a9f478fee96052fa3eb663fc76c0 06-Jun-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Risk: Low
Visibility: All people raising CmdError exceptions

The CmdError exception was defined in such a way that it needs to format
the exit code of the failed command as an integer. However, by mistake,
the whole result object was being passed to the format string, hence
raising a ValueError. This patch fixes the problem by passing only the
exit code attribute of the result object to the format string operation.

Signed-off-by: Lucas Meneghel Rodrigues <lucasmr@br.ibm.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@1634 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/common_lib/error.py
7e1b1503e86719c131fc2d659d645b0915b3a008 06-Jun-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Properly space error.py according to coding style

Signed-off-by: Martin J. Bligh <mbligh@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@1633 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/common_lib/error.py
d93d7d2a9728bbed6d125a6d8a9f61bb3f2b6718 29-May-2008 jadmanski <jadmanski@592f7852-d20e-0410-864c-8624ca9c26a4> Risk: Medium
Visibility: Should improve error messages from failing commands.

This converts the CmdErrors raised by run to something more useful.
It seems that the original command failure code that actually told
you what command actually failed got excised during the big merge
of all of our system/system_output/run stuff until a single common
lib run function.

It also clears out a bunch of the util stubs in server utils, since
the fixes made them mostly unnecessary.

Signed-off-by: John Admanski <jadmanski@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@1572 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/common_lib/error.py
8ea61e2f9f55bd9f646735069e1f029e86d08320 09-May-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> 1. Removed the system() and system_output() implementations from client/bin/autotest_utils.py so that the ones in common_lib/utils.py are used throughout.
2. Add an optional parameter to system_output() in client/common_lib/utils.py to retain stdout and not throw it away.
3. Renamed ignorestatus to ignore_status to make it consistent with the rest of the code.
4. Modified the tests to use the renamed ignore_status option
5. Modifed the CmdError() implementation in client/common_lib/error.py and made sure all the places on the server side, that expect a AutoservRunError exception are changed to expect and handle a CmdError exception instead.

Signed-off-by: Ashwin Ganti <aganti@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@1499 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/common_lib/error.py
302482ea9ed9407ce1ac736ac9adcac814ad5a7d 01-May-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Add a new status field called TEST_NA (in addition to PASS and FAIL).

From: Travis Miller



git-svn-id: http://test.kernel.org/svn/autotest/trunk@1476 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/common_lib/error.py
158ba7ba2757794b96c5c39d794c743be676fe90 07-Mar-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> I fixed a bug in AutoservSubcommandError.__str__ that was making the
exception unformattable, and added some code to parallel to catch the
exception. Unfortunately, the final error message will still just end
up being "One or more subcommands failed", but I can't see a good way
to output a more detailed error at that high level, since parallel
can be given an arbitrary set of tasks to run.

Signed-off-by: John Admanski <jadmanski@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@1317 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/common_lib/error.py
6e2ffec8a247d84271dc86a1551c3ad543475d0f 05-Mar-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Enhance the error message displayed when a server-side test fails.
The existing message just indicates that a runtest function failed, and
gives you the exit code. We can at least display the name of the
failed test in the error message.

Signed-off-by: John Admanski <jadmanski@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@1301 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/common_lib/error.py
6f015c44cad8984c6117a2bbf8ff8a5a16602012 12-Feb-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Move some error classes out of server/autotest.py and into the error
library, and associate them with the appropriate superclasses since
these errors are really autotest errors and not autoserv errors.

Signed-off-by: John Admanski <jadmanski@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@1233 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/common_lib/error.py
34faa283baa32aea834e57779f915e702c15b9b8 16-Jan-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> SSH has an exit code of 255 and prints out an error message when
it reaches a connection timeout. We should catch this and return
a sensible exception.

Also, bit-shift all exit codes by 8 to match what we're now doing
in the client.

From: Jeremy Orlow <jorlow@google.com>
Signed-off-by: John Admanski <jadmanski@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@1170 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/common_lib/error.py
6a2a2df5393811e4688f01ecfafda82869560f22 16-Jan-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Ensure all AutoservRunErrors are constructed with a tuple of two objects, as expected. Also change AutoservRunError's docstring to reflect this requirement. Fixed up some formatting in run_grep while I was at it.

From: Steve Howard <showard@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@1168 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/common_lib/error.py
642b03e401142565a8109ac6e8495eda1dead577 14-Jan-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Now fixing the places where we're raising string exceptions on the
client code. The patch also fixes identation errors in the iostat
profiler and error.py'>error.py.

Signed-off-by: Lucas Meneghel Rodrigues <lucasmr@br.ibm.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@1158 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/common_lib/error.py
5deff3d429f06c301a8235d761e12408c1a9a5f6 04-Jan-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Add a new exception for installation failures.
Change wait_for_restart to be public function.

Signed-off-by: Jean-Marc Eurin <jmeurin@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@1110 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/common_lib/error.py
03f4fc7be7966d839d6055021424b8a9d430faa8 29-Nov-2007 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Pull the server-side errors.py into the common error library.

Signed-off-by: John Admanski <jadmanski@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@1007 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/common_lib/error.py
906b9f7386c58a59a9226556c58bed43eb2e3db9 29-Nov-2007 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Oops. Fix missing / not deleted files from last commit

Signed-off-by: Martin J. Bligh <mbligh@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@1005 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/common_lib/error.py