History log of /external/autotest/client/bin/job.py
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
f0c8224364e104aabe3ff76525e0cc7a39be2a6c 19-May-2017 Aviv Keshet <akeshet@chromium.org> autotest: (base_job) delete TAPReport and all callers

This looks unused.

BUG=None
TEST=None

Change-Id: I7ceff7c4c546eba72ab6c24e66abe759077a758c
Reviewed-on: https://chromium-review.googlesource.com/509013
Commit-Ready: Aviv Keshet <akeshet@chromium.org>
Tested-by: Aviv Keshet <akeshet@chromium.org>
Reviewed-by: Keith Haddow <haddowk@chromium.org>
Reviewed-by: Richard Barnette <jrbarnette@google.com>
/external/autotest/client/bin/job.py
bf0c4410efcc066070954f0b7222bd06ba5fe389 04-Feb-2017 Allen Li <ayatane@chromium.org> [autotest] Merge client/common_lib/site_packages

BUG=chromium:672727
TEST=None

Change-Id: Idb55408fa26aa3a8b876ce6dfe54100afd69c980
Reviewed-on: https://chromium-review.googlesource.com/437711
Commit-Ready: Allen Li <ayatane@chromium.org>
Tested-by: Allen Li <ayatane@chromium.org>
Reviewed-by: Prathmesh Prabhu <pprabhu@chromium.org>
/external/autotest/client/bin/job.py
097e0371b6f462a9ed2aea43dcfcb2fbbb67396b 03-Feb-2017 Allen Li <ayatane@chromium.org> [autotest] Make status_indenter.job private

BUG=chromium:672727
TEST=None

Change-Id: I812a3a81f31ba80ce0edbef8f47a3b66dc19ab32
Reviewed-on: https://chromium-review.googlesource.com/437664
Commit-Ready: Allen Li <ayatane@chromium.org>
Tested-by: Allen Li <ayatane@chromium.org>
Reviewed-by: Prathmesh Prabhu <pprabhu@chromium.org>
/external/autotest/client/bin/job.py
0fe0da37d1d3d0b8c7bda5d5dd4ee7778a7d17bc 02-Feb-2017 Allen Li <ayatane@chromium.org> [autotest] Fix job imports

BUG=None
TEST=None

Change-Id: I462f0297ce3a87b067f6c2ab008df2b61dae343d
Reviewed-on: https://chromium-review.googlesource.com/436347
Commit-Ready: Allen Li <ayatane@chromium.org>
Tested-by: Allen Li <ayatane@chromium.org>
Reviewed-by: Prathmesh Prabhu <pprabhu@chromium.org>
/external/autotest/client/bin/job.py
775de1d6c04ff0a74d04844ce2f9330a0ccb9240 02-Feb-2017 Allen Li <ayatane@chromium.org> [autotest] Fix unused variables

BUG=None
TEST=None

Change-Id: Ib70336662caa6b75d2067daa97f36dcfc7419b44
Reviewed-on: https://chromium-review.googlesource.com/436346
Commit-Ready: Allen Li <ayatane@chromium.org>
Tested-by: Allen Li <ayatane@chromium.org>
Reviewed-by: Prathmesh Prabhu <pprabhu@chromium.org>
/external/autotest/client/bin/job.py
2e68f186d24153994c8776d5b563921cf6d1d6cb 02-Feb-2017 Allen Li <ayatane@chromium.org> [autotest] Merge site_job into job

BUG=chromium:672727
TEST=None

Change-Id: I4da8896a0b64bcb8e4cee6fe78b5affacff69243
Reviewed-on: https://chromium-review.googlesource.com/436345
Commit-Ready: Allen Li <ayatane@chromium.org>
Tested-by: Allen Li <ayatane@chromium.org>
Reviewed-by: Prathmesh Prabhu <pprabhu@chromium.org>
/external/autotest/client/bin/job.py
9aec6930955ea7d3d345cf2d214f9e6982f84cb8 03-Jun-2016 Richard Barnette <jrbarnette@chromium.org> [autotest] Remove the last of the support for kernel selection.

This removes all the vestiges related to support selecting a kernel
for test from client side code. This completes removal of all such
code from the Chrome OS fork of Autotest.

N.B. It's possible that there are still design concepts within the
code that exist primarily for the benefit of kernel selection.
Finding and simplifying those design concepts are left for the
next intrepid developer.

BUG=chromium:266704
TEST=Run push_to_prod suite in a local instance.

Change-Id: I7a8bbee0f58c14c4826689d5d04999b3708ad5f6
Reviewed-on: https://chromium-review.googlesource.com/349710
Commit-Ready: Richard Barnette <jrbarnette@chromium.org>
Tested-by: Richard Barnette <jrbarnette@chromium.org>
Reviewed-by: Aviv Keshet <akeshet@chromium.org>
/external/autotest/client/bin/job.py
1bf60eb788365f083d0ee8045a6556f906149dec 02-Dec-2015 Simran Basi <sbasi@google.com> [autotest] autoserv add --lab & --host_attributes arguments

Added two new flags to autoserv.

--lab indicates that autoserv is running in the lab and has
the full Autotest infrastructure at its disposal.

--host_attributes allows host attribute information that is
usually in the database to be retrievable from the command
line arguments.

If --lab is pulled in, autoserv will request the host attributes
from the database at test runtime.

From here this change, then updates the concept of the "machines"
list that test control files receive to now be a list of dicts
that contain the machine hostname and host attributes. This will
enable identifing information the hosts library needs to create
host objects to be available whether or not there is a database
present.

BUG=chromium:564343
TEST=local autoserv runs. Also verified scheduler changes work
via MobLab. waiting on trybot results.
DEPLOY=scheduler

Change-Id: I6021de11317e29e2e6c084d863405910c7d1a71d
Reviewed-on: https://chromium-review.googlesource.com/315230
Commit-Ready: Simran Basi <sbasi@chromium.org>
Tested-by: Simran Basi <sbasi@chromium.org>
Reviewed-by: Simran Basi <sbasi@chromium.org>
/external/autotest/client/bin/job.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/bin/job.py
456d3c115952bf1ae984770e226c5a50676b31c0 19-Jul-2011 Dale Curtis <dalecurtis@chromium.org> Upstream Autotest merge.

Merged from d9d64b855363d214996b187380532d4cc9991d29.

BUG=none
TEST=emerge autotest-tests, local server, run_remote_tests.

Change-Id: Id8cf1ef930bc0cd80347d77f2de65561be2a12a4
Reviewed-on: http://gerrit.chromium.org/gerrit/4664
Reviewed-by: Mike Truty <truty@chromium.org>
Reviewed-by: Scott Zawalski <scottz@chromium.org>
Tested-by: Dale Curtis <dalecurtis@chromium.org>
/external/autotest/client/bin/job.py
0a99391317b5caca3d373d0bba931bcb62302566 17-May-2011 Eric Li <ericli@chromium.org> Merge autotest upstream from @5337 ~ @5360

Change-Id: Iad59314186db370f9219c3fb294b851f4e214e2e
Reviewed-on: http://gerrit.chromium.org/gerrit/1045
Reviewed-by: Eric Li <ericli@chromium.org>
Tested-by: Eric Li <ericli@chromium.org>
/external/autotest/client/bin/job.py
6c0b70ba5fa83b57fc0bc2f6cf347b546c1bc9e8 17-May-2011 Eric Li <ericli@chromium.org> Revert "Merge autotest upstream from @5337 ~ @5360"

This reverts commit ce1b0620fddfb6efa33cc9441d9c91ce06b30de3.

Change-Id: Iab10c235ce76bfd45e7a2036ea2413729e34ae15
Reviewed-on: http://gerrit.chromium.org/gerrit/1033
Reviewed-by: Eric Li <ericli@chromium.org>
Tested-by: Eric Li <ericli@chromium.org>
/external/autotest/client/bin/job.py
ce1b0620fddfb6efa33cc9441d9c91ce06b30de3 16-May-2011 Eric Li <ericli@chromium.org> Merge autotest upstream from @5337 ~ @5360

Change-Id: I2052380f1fb1ff952977914cb6f516a31c076aba
Reviewed-on: http://gerrit.chromium.org/gerrit/1031
Tested-by: Eric Li <ericli@chromium.org>
Reviewed-by: Eric Li <ericli@chromium.org>
/external/autotest/client/bin/job.py
d656d56473f50b9c1a9f5e2b2f5a9472181ee342 20-Apr-2011 Eric Li <ericli@chromium.org> Merge remote branch 'autotest-upstream/master' into autotest-merge

Merged to autotest upstream @5317.

BUG=none
TEST=
1. utils/unittest_suite.py
2. utils/packager.py --all upload -r /tmp/pkgs
3. utils/compile_gwt_clients.py

enter_chroot
emerge-x86-generic autotest-*
emerge-arm-generic autotest-*

run_remote_test suite_Smoke
run_remote_test bvt

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

Change-Id: I03240d8652ffdfde4d6c8fbf474e2fad7f3cda10
/external/autotest/client/bin/job.py
8a12e800f05f6862fc39c6a45c9c57d9051b795e 17-Feb-2011 Eric Li <ericli@chromium.org> Merge remote branch 'cros/upstream' into master.

Merged to upstream autotest @5216~@5235.

Most of the stuff are from Olof's arm cross compiling and some misc changes from Dale Curtis.

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

BUG=none
TEST=1. emerge-arm-generic autotest autotest-deps autotest-tests
2. emerge-x86-generic autotest autotest-deps autotest-tests
3. run bvt from both src/third_party and inside emerged
chroot/..usr/local/autotest.
Seems fine. No regression found.

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

Change-Id: I613929ec9c29849db5110ae8234bc68a80f4d2d5
/external/autotest/client/bin/job.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/bin/job.py
e0493a4af57c1a73376a7bafaed542c01f588196 15-Nov-2010 Eric Li <ericli@chromium.org> Merge remote branch 'cros/upstream' into tempbranch

BUG=
TEST=

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

Change-Id: I5d56f1c10d0fce7f9d7dc3ad727ea52dcb9b2d6c
/external/autotest/client/bin/job.py
6f27d4f22a1ba5063968b8c322fa0845f3279ade 29-Sep-2010 Eric Li <ericli@chromium.org> Merge remote branch 'cros/upstream' into tempbranch3

Merge to trunk@4817

BUG=
TEST=

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

Change-Id: I83376bc7d28104ec2678e157eadbe7df7c05c0e0
/external/autotest/client/bin/job.py
517d95a1ef4edb04da427763f86068a447d45ec7 29-Sep-2010 Benson Leung <bleung@chromium.org> Revert "Merge remote branch 'cros/upstream' into tempbranch2"

This reverts commit 25fc6d1f28e54c46689f12d3b93c2540ef45323a.

TBR=ericli@chromium.org

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

Change-Id: Ib0165b19bfdf02264f8a6a74ddf3ae74c8c0f7df
/external/autotest/client/bin/job.py
25fc6d1f28e54c46689f12d3b93c2540ef45323a 29-Sep-2010 Eric Li <ericli@chromium.org> Merge remote branch 'cros/upstream' into tempbranch2

Merged to trunk@4816.

BUG=
TEST=we will build a new autotest server instance, and keep cautotest running and then later do a cname switch.

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

Change-Id: Iee5f52f45f28f84927d6c6f9a74edc370d40288a
/external/autotest/client/bin/job.py
be583c18a66815a3d93fae411c5fd58788aff4c0 23-Jul-2010 lmr <lmr@592f7852-d20e-0410-864c-8624ca9c26a4> Crash handler: Make sure autotest cleans up leftover debugdir files

Sometimes, autotest might abort (autotest bug, job error) and
there will be some /tmp/autotest_results_dir.XXX files lying
around. If there are such files lying around, if a program
segfaults, the crash handler will re-create some of the old
debugdirs, that might clash with the debugdirs of the tests
being executed on the new job. Make sure we clean up all old
files prior to autotest execution. Updated the unittests
job_unittest and setup_job_unittest accordingly. The unittests
are passing.

Also, fixed up some indentation prolems found on setup_job.py,
and made setup_job_unittest.py executable

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


git-svn-id: http://test.kernel.org/svn/autotest/trunk@4731 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
430de8f0d9920ca3149086b87a387cae6508e41f 14-May-2010 jadmanski <jadmanski@592f7852-d20e-0410-864c-8624ca9c26a4> Add a check that the CPU count is unchanged after a reboot.

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


git-svn-id: http://test.kernel.org/svn/autotest/trunk@4489 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
4afc3676e5735bd52303c0612b1cbc62c2d6fba8 30-Apr-2010 jadmanski <jadmanski@592f7852-d20e-0410-864c-8624ca9c26a4> Yet another round of extraction of job code up into base_job.py in the common
library. This focuses on pulling job.record up from the client job into the
base, with an eye towards doing the same with the server job.record code (thus
providing a single unified implementation).

Currently I extracted all the job.record code from the client out into a
status_log_entry and status_logger class. The idea was that all the code that
knows how to convert status,subdir,operation,etc. parameters into a string to
go into the status log would be in the status_log_entry class, and all the
code that actually knows how to write an entry into the log files would be in
the status_logger class. It also pulls all the code for tracking the nesting
into the status_logger class, instead of scattering increment and decrement
calls throughout the job class.

This multi-class separation might seem a little overdesigned, but it made it
easier to write good unit tests that don't throw up a million mocks
all over the place. I also think it will be easier to extend when I
try to make this work for server jobs as well; the server has to mix
together job.record calls, status logs from client jobs, and injected
WARNs, so separating out the entry class and the class that actually
writes out the logs should be helpful for supporting that model.

The CL also contains a lot of generic docstring cleanup that I had to do
while working on the classes.

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


git-svn-id: http://test.kernel.org/svn/autotest/trunk@4455 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
1222d059eada48e9da2da6c8931f5a5131b86c07 30-Mar-2010 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> John,

Attached is a separate patch that adds support for args to
client/bin/autotest. The downside of doing it this way is that it implements
a separate path for passing args to client-side control. The benefit is that
it's simple.

Darin

On Mon, Mar 29, 2010 at 8:33 AM, John Admanski <jadmanski@google.com> wrote:

> I was looking at this a bit more, and I still see an issue; now you can't
> write code that uses args that just works on a straight client, you have to
> be launching the client via autoserv. I suppose that's not a huge problem,
> since autoserv is the only way that you can set args anyway, but I guess I'd
> just envisioned a grander patch that actually added support for command-line
> args to client/bin/autotest, and then just used server/autotest.py to pass
> through any autoserv args.
>
> Still, I think it's not a huge deal. I'm just a little worried about the
> continued trend of more and more code being written that just assumes you're
> using all the higher layers to run your tests. These days it seems everyone
> just wants to write client tests that assume you're using autoserv, or even
> assumes you're using a full scheduler setup.
>
> -- John
>
>
> On Fri, Mar 26, 2010 at 3:08 PM, Darin Petkov <petkov@google.com> wrote:
>
>>
>>
>> On Fri, Mar 26, 2010 at 2:43 PM, John Admanski <jadmanski@google.com>wrote:
>>
>>> This should probably use %r instead of %s. In practice I think repr(args)
>>> and str(args) will end up being the same, but in principle repr is supposed
>>> to be the inverse of eval so it's the more correct choice of formatting.
>>
>>
>> Good point. Updated the patch. PTAL.
>>
>>
>>>
>>>
>>> On Fri, Mar 26, 2010 at 2:40 PM, Darin Petkov <petkov@google.com> wrote:
>>>
>>>> A simple patch to propagate user args (autoserv -a/--args) to the
>>>> client-side control file.
>>>>
>>>>
>>>
>>
>
>From cdc4d7200f07bc626968e25b4e52452b7750a1fc Mon Sep 17 00:00:00 2001
From: Darin Petkov <petkov@chromium.org>
Date: Mon, 29 Mar 2010 10:54:50 -0700
Subject: [PATCH] Add args support to client/bin/autotest.


git-svn-id: http://test.kernel.org/svn/autotest/trunk@4354 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
cf20a62c800b93e5d76325d77a59db26999ed045 11-Mar-2010 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Remove the analysis directory, i.e. 2170-autotest/yrnx1/analysis/. I have not seen any use for this and the code does not seem to point to it anywhere. If someone uses it speak up otherwise we are removing it.

Signed-off-by: Scott Zawalski <scottz@google.com>


git-svn-id: http://test.kernel.org/svn/autotest/trunk@4298 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
b95c6a7a1eb72f188f3ffe66000abd6bda79f5b6 10-Feb-2010 jadmanski <jadmanski@592f7852-d20e-0410-864c-8624ca9c26a4> Add hooks to job.parallel to split out job._record_prefix state into
subtask-local persistent state. This should keep parallel tests from smashing
eachothers status log indentation.

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


git-svn-id: http://test.kernel.org/svn/autotest/trunk@4229 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
12b45582c04b2417036a6f11afc843ac5fddea50 11-Jan-2010 lmr <lmr@592f7852-d20e-0410-864c-8624ca9c26a4> Massive permission fix

Fix permissions for all the development tree

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


git-svn-id: http://test.kernel.org/svn/autotest/trunk@4094 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
9de6ed7ab19c29b5072d52439f434453df16bec0 11-Jan-2010 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Eliminate the last uses of the public state managment interface for
storing private job state. This does it for the last bits of
client-only state.

It also changes job.record to use a _record_prefix value, instead of
a group level value, for tracking the "current" indentation of status
logging. It's only a minimal change to record, I have more significant
refactoring in mind for getting rid of the massive duplication of
the job.record infrastructure, I just targetted this specific aspect
to get rid of the last of the "old" state management.

Note that unlike the other stateful properties, job._record_prefix is
NOT a single, global value automatically shared between the server
and client job; the client puts the stateful property in the client
namespace to keep its value independent of the server one.

Risk: Medium
Visibility: Clears out the last of the "old-style" use of storing
private job state in the public state area.

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


git-svn-id: http://test.kernel.org/svn/autotest/trunk@4086 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
fc3da5bbdcd63840cd224282812c050c5520db11 06-Jan-2010 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> More refactoring of the job state code to try and reduce duplication.
In the process this also refactors a bunch of job.run_test duplication,
specifically the handling of job tags (there's still lots more
duplicate code left).

The main state refactorings are:
* Storing client job steps in __steps and special-casing its removal
in autotest.py is gone. Instead the client job code stores it
directly in the client.steps state, and the autotest.py generically
removes the entire client.* namespace.
* Moving this out of the publicly-visible state and into a private
namespace allows us to drop has_state and discard_state, which
were really only needed so that we could make sure __steps was
not persisted across jobs.
* All of this client-job state managment was moved out of autotest.py
and into server_job.py. All the data this code was getting and
setting was in the job object, so it seemed like a better place
to put it. This also let us drop load_state and save_state, which
were really only there to make it easier to push and pull data
out of the server job object.
* Eliminate get_run_number and set_run_number in favour of a generic
use_sequence_number boolean property (that works on both client
and server automatically). The get_ and set_ code was only being
used to enable and disable an auto-incrementing sequence number to
be tagged to each test run, so we can just make the public
interface a boolean and handle the sequencing under the covers.
* Drop all the test_tag and test_tag_prefix code in favour of a
persistent automatic_test_tag property. Also drops the
show_kernel_in_test_tag flag in favour of just implementing this
in the control file generator using automatic_test_tag.
* Refactor all the test name tagging code into base_job, unifying
the tagging portion of the job.run_test code.

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


git-svn-id: http://test.kernel.org/svn/autotest/trunk@4075 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
fbf73aecdd357094ae05e7d1e4ea99b1ecf93ee4 19-Dec-2009 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Refactor all of the persistent state managing code in the client job
class into the common_lib base job class. The major change is that all
the details of the job state implementation are pulled into a class
base_job.job_state. This class handles all the internal details of the
state managment that job.get_state and job.set_state did, and also
provides a mechanism for creating job properties which are automatically
backed by job state.

This also includes a major change to the semantics of state passed
between autoserv and any Autotest clients it ran. Previously the code
was a bit of a hack, with code in server/autotest.py that would
pre-generate a state file with some pre-set values, and code that would
pull back the state file after the client job and extract some values
from it, as well as some more code that would prepend a bunch of
state initialization calls at the start of the client control file.
Instead of all these hacks, autotest.py now just pushes all of the
state out to the client at the start, and pulls it all back at the end
(with a special exception for __steps that's difficult to eliminate at
this time). So any state set on the server is automatically available
on the client, and any state set on the client is automatically
available on the server.

There are a couple of outstanding issues:
* More of the set_state/get_state code needs to be refactored
to either use the automatic properties, or the job-internal state
API (so that all the internal state is not leaked into the "public"
state visible through get_state and set_state).
* The job_state class is perhaps somewhat overengineered. It's really
just a big, automatically persistect dict-of-dicts. But most of it
is actually code that was being used before, it was just scattered
all over server/autotest.py and client/bin/job.py so it was less
obvious how overgrownt he state managment is.

Risk: High
Visibility: Replaces a bunch of get_*+set_*+default_* methods with
persistent properties, refactors all of the state managment
into a single implementation consistently used in both the
server and client.

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


git-svn-id: http://test.kernel.org/svn/autotest/trunk@4022 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
da8fb97be0353f54eb7e62e132482d728684f200 01-Dec-2009 lmr <lmr@592f7852-d20e-0410-864c-8624ca9c26a4> Fix autotest client when checking only client from svn

When the client was made configurable through
global_config.ini (r3956), the scenario "developer
checking out client directory only" wasn't
considered, and an exception will be thrown
due to the lack of a global_config.ini present.

In order to fix this, instead of throwing an
exception, just print a warning on cases that
matter, and make all the values that are
supposed to be grabbed from the config file
to have a sensible default.

2nd try: Now a warning is printed only when
autotest is being run through autoserv, since
it's probably the only case worth printing
a warning.

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


git-svn-id: http://test.kernel.org/svn/autotest/trunk@3981 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
d65ad8bfeb59536bb9f451a89ee62a2ea0a4f398 25-Nov-2009 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> From: Gustavo Rahal<grahal@linux.vnet.ibm.com>

We are facing problems with some kernel builds that disable swap after
boot. This makes the job fail because before boot, swap partition was
not counted (since it was active) and after boot, since swap is
inactive, swap partition appears in the partitions list, raising job
error with msg "mounted partitions are different after reboot (old
entries: %s, new entries: %s)"

So, the practical result is that if swap is off after new kernel boot a
job error is triggered. If this is desirable we should at least make
that explicit and raise a job error specific for the swap status
change.

In short, since I don't see why in general we should care about swap on
or off.



git-svn-id: http://test.kernel.org/svn/autotest/trunk@3976 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
3d1b0b65a895c4c68d4903274ad11ca64fd7b170 18-Nov-2009 lmr <lmr@592f7852-d20e-0410-864c-8624ca9c26a4> Make client behavior configurable

Right now autotest will drop caches between:

* Test executions
* Same test iterations

This change turns those into configurable options on
global_config.ini. The default values were added on the
previous patch.

2nd attempt: Now global config support for stand alone client
runs was added. Everything should work now.


git-svn-id: http://test.kernel.org/svn/autotest/trunk@3956 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
6f6afd1b5df8a75f5be00483ca13018e81f12db7 12-Nov-2009 jadmanski <jadmanski@592f7852-d20e-0410-864c-8624ca9c26a4> Reverting revision 3917. This introduces problems since the global config
is currently not supported on standalone clients.

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



git-svn-id: http://test.kernel.org/svn/autotest/trunk@3939 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
38b2a85e36ae2ca0670c8da1347adc7715e98816 06-Nov-2009 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Right now autotest will drop caches between:
* Test executions
* Same test iterations

This change turns those into configurable options on
global_config.ini. Default configuration:

[CLIENT]
drop_caches: True
drop_caches_between_iterations: True

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


git-svn-id: http://test.kernel.org/svn/autotest/trunk@3917 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
0d0f67d6abcf6599ad626042d3236020e093558f 06-Nov-2009 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Create a base_job class in the common library as a location to
refactor common code from client/bin/job.py and server/server_job.py
into.

Initially this just creates the base class and attempts to refactor
some of the __init__ code into it. It also tries to refactor the
code somewhat so that it's easier to test without mocking out large
amounts of external dependencies.

It also tries to standardize on what all the official publicly usable
attributes are, mostly on the basis of looking at what the existing
code actually does. In general my approach was:
* If used outside of the job class, assume it's public. If it makes
sense make it a requirement of the base class, but in some cases
(e.g. serverdir) it really only makes sense for one of the
concrete classes. In that case I define it as "OPTIONAL", which
means it can be None (but must still be defined).
* If only used within the job class, make it "private", which means
it gets a name starting with _. Code outside of the job modules
shouldn't be touching these. This includes the "constants" that
we define with all-caps in the class.
* I added unit tests which try to actually validate this, by
checking that all the correct properties are defined after
__init__. The test cases are still limited (all the test_init
cases) because of the pain of stubbing out __init__, but I will
be adding more in the future as I refactor to reduce the amount
of mocking/stubbing needed.

Overall, I don't know that this change by itself makes the code
simpler or easier to understand, but I don't think it makes things
any worse in that regard, while adding a lot more testing and
finally giving us a well-defined interface. I have more changes
planned, but as new improvements kept creeping into this change I
decided to mail it out for some review instead of letting it grow
even bigger. Some ideas of what I still intend to do in followup
patches:
* Refactor more of the directory management code into job_directory, to
get the rest of the mkdir/makedirs code into there. That way all
of the directory management is concentrated in one place.
* Refactor all the of get_state/set_state code into something that
automatically handles this with properties without a lot of
boilerplate getter and setter methods.
* Refactor the job.record related code that's duplicated into the
base class.

Risk: High
Visibility: Mostly code changes to standardize the job class interface.
A lot of the visible changes just involve privatizing attributes
that aren't used outside of job anyway, or adding in attributes
that were only defined on the client or server.

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



git-svn-id: http://test.kernel.org/svn/autotest/trunk@3916 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
3c0ea96b0dbd2115fa2057c21635173eaf461f31 06-Nov-2009 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Added common_lib.hosts.Host.cleanup_kernels and some functions it's using.
Implemented a fast local version of those functions in LocalHost to not
go through the run() abstraction. Added call to cleanup_kernels() from
generated control file code so it will cleanup unused kernels (not
referenced by the bootloader) each time it's installing a new kernel.

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


git-svn-id: http://test.kernel.org/svn/autotest/trunk@3907 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
8904d6f41c99d44b01bcd60eab70f2ac5ef25337 14-Oct-2009 lmr <lmr@592f7852-d20e-0410-864c-8624ca9c26a4> Use shutil.move to move result files in job.py

Since os.rename requires that the file is in the same partition with
the dest directory, we would get a python OSError if the result
directory is mounted to a nfs server (or different partition or
something else alike).

the traceback would be like:

Traceback (most recent call last):
File "/usr/local/kvm/kvm-test/bin/autotest", line 52, in ?
options.log)
File "/usr/local/kvm/kvm-test/bin/job.py", line 1274, in runjob
myjob.complete(0)
File "/usr/local/kvm/kvm-test/bin/job.py", line 798, in complete
os.rename(self.state_file, dest)
OSError: [Errno 18] Invalid cross-device link

Signed-off-by: Cao, Chen <kcao@redhat.com>


git-svn-id: http://test.kernel.org/svn/autotest/trunk@3844 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
07e27af54bd841e9a7b8d6d189fec3dd4ae2a92b 12-Oct-2009 showard <showard@592f7852-d20e-0410-864c-8624ca9c26a4> I realized that my initial addition of the default_profile_only
property was missing proper persistent state support on the client.
It won't be preserved across reboots, and changes to it on the
client won't be pulled back to the server. This change fixes that.

It also goes back to the setter approach for setting this property.
When I fixed this it occured to me that this was the real reason
we've used setters in the past for properties like this. I have
some refactoring in mind to clean up the handling of these stateful
properties, but that's rather substantial and I don't want to block
these changes on that so for now I just put in an implementatation
that's consistent with the "standard" handling we already have.

Risk: Medium
Visibility: Properly preserves the state of default_profile_only
across reboots and after client jobs.

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


git-svn-id: http://test.kernel.org/svn/autotest/trunk@3826 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
a6082efeb30cd86d09fcf25d55cde15dedd60fce 12-Oct-2009 showard <showard@592f7852-d20e-0410-864c-8624ca9c26a4> Add a global mechanism to the job object to allow users to change
the behaviour of profile_only, so that all tests default to

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


git-svn-id: http://test.kernel.org/svn/autotest/trunk@3818 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
8b30a6c6dac81063d7799154e632b1eab3100ada 18-Sep-2009 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Make drop_caches_between_iterations default for all tests except
kernbench.

Signed-off-by: Divyesh Shah <dpshah@google.com>


git-svn-id: http://test.kernel.org/svn/autotest/trunk@3741 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
ea0405c4f0129ede9f0078b780014eafd7a7fde2 05-Sep-2009 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Pass the user autoserv is running as through to the client.
This can be used to su back to the running user on the remote
end for file access, etc

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



git-svn-id: http://test.kernel.org/svn/autotest/trunk@3662 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
22f160e1f689ee0391fc2b5ae5927551614e1428 03-Sep-2009 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Improved error reporting in case job.__init__ fails by trying to record
an ABORT message. In order to do so I had to split client.bin.job.__init__
into a "pre record init" part containing the required initialization
for job.record() to work and the rest of the initialization into a
"post record init" function. Also moved some of the initialization code
into their own functions where it was logically separated. Updated unittest.

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


git-svn-id: http://test.kernel.org/svn/autotest/trunk@3648 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.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/bin/job.py
b1a5113d43c8f0a8b115c541d3e590d280e75565 07-Aug-2009 jadmanski <jadmanski@592f7852-d20e-0410-864c-8624ca9c26a4> Next step in the PackageManager restructure, replace the static list
of repo urls with a list of RepositoryFetcher instances. Drops
PackageManager.fetch_pkg_file and just calls the
RepositoryFetcher.fetch_pkg_file on each repo directly in fetch_pkg.

Also adds an explicit add_repository method as a "clean" way for
other classes (specifically client/job.py) to add repositories.

Risk: Medium
Visibility: Switches over to the polymorphic RepositoryFetcher model
of fetching repo packages.

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



git-svn-id: http://test.kernel.org/svn/autotest/trunk@3512 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.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/bin/job.py
0179c1d39d6d15298cbf6d1f3f4b18b488ee8a7b 02-Jul-2009 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Somehow we missed this bugfix from Mihai. However, the actual patch has
to be a little different from Mihai's, as cont is an attribute from
options:

My original patch introduced a fairly serious bug, we need to apply this bugfix as soon as possible.

On Fri, 2009-05-29 at 18:55 -0700, Mihai Rusu wrote:
> On Monday 04 May 2009 13:42:18 Lucas Meneghel Rodrigues wrote:
> > Summary: If autotest is not running with the --continue flag,
> > delete the state file transparently
> >
> > For quite a while, people developing tests had problems when they
> > had to interrupt a given test before it ends: it's not possible to
> > guarantee the consistency of the state file, hence the next time
> > the test is executed, an exception is thrown. The workaround is, of
> > course, remove the state file allways. However, as Martin pointed
> > out, when autotest is not running with the flag -c or --continue,
> > we can just remove the previously left state file to make this
> > process transparent to the test developer.
> >
> > Signed-off-by: Lucas Meneghel Rodrigues <lookkas@gmail.com>
> >
> Unfortunately the patch misses any check if continuation has been
> requested thus current SVN is unable to execute any jobs that require
> continuation (for example kernel tests that reboot the machine).
> Please apply the following patch to fix it:
>
> --- autotest/client/bin/job.py
> +++ autotest/client/bin/job.py
> @@ -1251,7 +1251,7 @@
> state = control + '.state'
> # Ensure state file is cleaned up before the job starts to run if
> autotest
> # is not running with the --continue flag
> - if os.path.isfile(state):
> + if not cont and os.path.isfile(state):
> logging.debug('Cleaning up previously found state file')
> os.remove(state)

diff --git a/client/bin/job.py b/client/bin/job.py
index 437b729..6f8f650 100755


git-svn-id: http://test.kernel.org/svn/autotest/trunk@3361 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
e7d9c605bacd7b1816987994ae18a68c63306a16 02-Jul-2009 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Make the job executiontag available in both the server and client side job
objects as job.tag.

This is useful if your job would like to copy its data off directly to a
results repository on its own from the client machine.

Mostly small changes to pass the data down, though I did some docstring
cleanup near code that I touched which makes the diff larger.

The execution tag is taken from the autoserv -P parameter if supplied
and no explicit --execution-tag parameter is supplied. This prevents
the need to change monitor_db.py to pass yet another autoserv parameter.

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


git-svn-id: http://test.kernel.org/svn/autotest/trunk@3359 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
c3f3d6161da50f37fd3e62980ac916f36bc2be59 22-Jun-2009 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Save in the persistent client job state a list of (device, mount-point)
information of the current mounted partitions on the system before
rebooting and compare it to match after reboot, if not abort the job.

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


git-svn-id: http://test.kernel.org/svn/autotest/trunk@3312 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
10d8417b8c3576e1ba80ce00b6ae2e9cea826bc0 19-Jun-2009 showard <showard@592f7852-d20e-0410-864c-8624ca9c26a4> add two logging-related options to autoserv:
--verbose sets the console to DEBUG level output (this is added to autotest client as well)
--no_console_prefix disables the logging prefix entirely on the console

Signed-off-by: Steve Howard <showard@google.com>


git-svn-id: http://test.kernel.org/svn/autotest/trunk@3301 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
4cfdce15cca1bc4988ee4531e49f3da4d18848ea 15-Jun-2009 showard <showard@592f7852-d20e-0410-864c-8624ca9c26a4> change client-side logging to split files by severity and move them to the debug dir. this is quite a bit more involved than the server-side change because of some buggy directory clearing code and various places that depended on the old configuration.

This also changes the TKO autoserv log viewers to point to the new .DEBUG and .ERROR autoserv logs.

Signed-off-by: Steve Howard <showard@google.com>


git-svn-id: http://test.kernel.org/svn/autotest/trunk@3266 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
75cdfee87bfaa3cf3f9860832b228a6d32aaed2f 10-Jun-2009 showard <showard@592f7852-d20e-0410-864c-8624ca9c26a4> Make autoserv and autotest client use the new logging_manager system. I'd like to split them into separate changes, but the change in common_lib.test means it all has to change at once.

this replaces the old ini-style logging configurations with code-based configurations. i know the ini files were easier to read, but we're doing a lot more fancy stuff with logging and these give us much more power and less duplication. as one example, we'll probably move very soon to having separate .DEBUG, .INFO, .WARNING, and .ERROR logs. This will allow us to make a centralized change to make that happen, rather than duplicating a whole bunch of information across .ini files, and it'll make the information much more concise.

Risk: Gravely high

Signed-off-by: Steve Howard <showard@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@3243 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
a99594de85d8f794c2e210ad98fa4effd9b00987 01-Jun-2009 jadmanski <jadmanski@592f7852-d20e-0410-864c-8624ca9c26a4> Fix up a print that was incorrectly converted into a logging call.

Risk: Low
Visibility: Fix up a bad logging call.

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



git-svn-id: http://test.kernel.org/svn/autotest/trunk@3189 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
4bacefa158060706dbb21ed15682edd441e9ed75 13-May-2009 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Summary: Converting the remaining print statements on job.py to
logging statements

Signed-off-by: Lucas Meneghel Rodrigues <lookkas@gmail.com>


git-svn-id: http://test.kernel.org/svn/autotest/trunk@3128 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
205977943b2ca1489538f67701e15ea3deda279b 12-May-2009 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Summary: If autotest is not running with the --continue flag, delete
the state file transparently

For quite a while, people developing tests had problems when they had
to interrupt a given test before it ends: it's not possible to
guarantee the consistency of the state file, hence the next time the
test is executed, an exception is thrown. The workaround is, of
course, remove the state file allways. However, as Martin pointed out,
when autotest is not running with the flag -c or --continue, we can
just remove the previously left state file to make this process
transparent to the test developer.

Signed-off-by: Lucas Meneghel Rodrigues <lookkas@gmail.com>


git-svn-id: http://test.kernel.org/svn/autotest/trunk@3112 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
0a8c33262cb48723ef6ce5b0a6e1efec51f19914 28-Apr-2009 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Modified import_site_class() to not wrap baseclass with a local dummy
class when the site specific class does not exist (thus hopefully fixing
an issue in SVN about not being able to run server side tests because
sysinfo cannot be pickle dumped), instead have import_site_class return
the baseclass when the site specific class does not exist. Also, have it
perform automatically the mixin of baseclass and the site specific class
when the site specific one is not inherited already from baseclass and
removed the mixin that was done in some of the users.

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

Autotest@test.kernel.org
http://test.kernel.org/cgi-bin/mailman/listinfo/autotest


git-svn-id: http://test.kernel.org/svn/autotest/trunk@3050 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
d948bfb7729e94b457bafca91a13c963d7edcba6 08-Apr-2009 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Added support in client.bin.base_job.__init__ to copy kernel boot
parameters of the running kernel and have it by default copy "console="
parameters. Updated site specific code.

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


git-svn-id: http://test.kernel.org/svn/autotest/trunk@2973 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
16a7ff7af7fe2ae3093c5ad7452c516257184ffc 01-Apr-2009 jadmanski <jadmanski@592f7852-d20e-0410-864c-8624ca9c26a4> The enabling and disabling of warning messages unfortunately seems to
be rather racy. Unfortunately, since warnings and test status messages
are being pulled asynchronously from two different sources there can
be a skew of a few seconds between when the event actually occurs
and when the server thinks it does.

Ideally we could fix this by forcing some kind of sync but there
doesn't seem to be any way of doing that; we have no way of flushing
conmux output, and /var/log monitoring is even worse since we may
also have client filesystem buffering getting in the way.

I was able to fix all the cases I could reproduce by adding a five
second sleep before and after disabling and enabling warnings. This is
an...unfortunate way to fix it, but in practice it works rather well.
I'm not actually certain we can do a lot better, at least not without
completely restructuring the way we do warnings. And even then, we
still have network latency that can kill any approach that doesn't
use a "sleep for a moments while the buffers flush" anyway.

Hopefully this fixes things well enough; if this problems comes up
again thanks to > 5s skews then we may have to revisit this.

Risk: Low
Visibility: Adds some sleep to hack around warning monitor and
client status log time skew.

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



git-svn-id: http://test.kernel.org/svn/autotest/trunk@2950 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
f40c02cf27e3765326e937a0a59a38e13365fb97 25-Mar-2009 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Strip from the kernel version the '::<timestamp>' if present when
logging reboot END GOOD. This fixes grouping tests by source kernel
versions in the results database.

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



git-svn-id: http://test.kernel.org/svn/autotest/trunk@2932 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
4395bbd96ed53aec5fad87d6c169a47dfdb8c9dd 25-Mar-2009 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Added sysinfo support to log pre and post iteration (currently it logs
the contents of /proc/schedstat). Added client.common_lib.test hooks to
call pre and post iteration. Used the hooks in client.bin.test.runtest()
for client tests. Refactored server.test and added wrappers for the
pre/post iteration logging and used them on the new pre/post iteration
hooks.

For each iteration there will be a
resultsdir/sysinfo/iteration.N/schedstat.after and schedstat.before.

If there are tests that override execute() and implement their own
iteration logic they need to be changed over to override run_once()
instead and take advantage of the default execute() that supports the
pre/post iteration hooks and other things.

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



git-svn-id: http://test.kernel.org/svn/autotest/trunk@2929 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
b18134f8faa7c5b4623760bc88650a65e70b2cac 20-Mar-2009 showard <showard@592f7852-d20e-0410-864c-8624ca9c26a4> As discussed on the mailing list, we implemented logging with a single
root logger and logging configurations per entry points. The entry
points affected are:

* Autotest client
* Autoserv
* Scheduler

We are sending patches for each one of those entry points. Now we don't
need to 'grab' loggers anymore to log messages, only need to use the
utility functions:

logging.info('msg')
logging.debug('msg')
logging.warning('msg')
logging.error('msg')
logging.critical('msg')

Which reduces complexity of the log system, and makes it easier for
developers to log messages, just select the level, make sure the
standard logging module is loaded, and profit!

From: Lucas Meneghel Rodrigues <lmr@linux.vnet.ibm.com>
Signed-off-by: Steve Howard <showard@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@2915 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
f37df84b97538540185f91e2e5b62890ca407b3b 11-Feb-2009 jadmanski <jadmanski@592f7852-d20e-0410-864c-8624ca9c26a4> Add job.enable_warnings and job.disable_warnings methods to the job
classes, to allow you to disable and enable specific types of console
warnings from being logged. Whenever these messages are called an
INFO line is written to the status log.

I added three categories to the patterns, based off of suggestions
from Martin: BUG, OOM, and LOCKDEP.

There are some limitations to this capability; it the warnings are
basically disabled globally, there's no easy way to disable them for
specific hosts or tests. It could probably be extended to host-specifc
controls if a need arises, but extending it to specific tests isn't
really possible, there's simply no way for the console monitoring to
determine what test the warning is actually associated with. Note that
this is only a problem for tests run in parallel; if you are just
running a series of tests obviously the warnings can be turned off at
the start of the test and then turned back on after it is finished.

Risk: Medium
Visbility: Adds categories to the console warning patterns, and a
mechanism for enabling+disabling specific categories of warnings.

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



git-svn-id: http://test.kernel.org/svn/autotest/trunk@2771 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
d0d77a896aa6ccaffce8eb5b81783dbc23120934 03-Feb-2009 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Remove trailing whitespace from client/bin/job.py

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



git-svn-id: http://test.kernel.org/svn/autotest/trunk@2741 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
812631ca7622d457304cfbd9d7d5096129bbbe9d 30-Jan-2009 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Move job.py package timeout to an hour, good for slow connections and large files.


Signed-off-by: Scott Zawalski <scottz@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@2709 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
b0b58a2ae3eee9cac2b36cce70ba4b1483d6b442 30-Jan-2009 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Cleanup: Remove site-specific container code from client/bin/job.py.

Signed-off-by: Duane Sand <duanes@google.com>




git-svn-id: http://test.kernel.org/svn/autotest/trunk@2708 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
bc0914b942f6257d3b75cf6e75025e3003f37e9b 26-Jan-2009 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> forward mountpoint passed to job.partition to partition lib

Signed-off-by: Gustavo Rahal <grahal@linux.vnet.ibm.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@2689 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
f6de1337b47ec31bd3b0469cb8ef24a6dc315502 21-Jan-2009 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Job object should be more consistent to current naming in autotest
and technically more accurate so deprecate "filesystem" method
and create "partition" method.

Signed-off-by: Gustavo Rahal <grahal@linux.vnet.ibm.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@2668 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
3bf79ca4d5490f9af09e1ddc39b8df5343b34d06 21-Jan-2009 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Allow site_utils to override utils, for version control

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




git-svn-id: http://test.kernel.org/svn/autotest/trunk@2665 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
d544a35a0377414f4413227284ff9d642f02cf44 15-Jan-2009 jadmanski <jadmanski@592f7852-d20e-0410-864c-8624ca9c26a4> When performing a reboot, do a sync before starting the shutdown.
A really long sync can cause what should otherwise be a fairly
short operation to take a long time. Raising the timeout on the
wait_down command could potentially mask other real issues, so
instead lets just do an explicit sync as a seperate operation.

Risk: Low
Visibility: Having a ton of data to be sync'd shouldn't lead to
wait_down timeout on a reboot.

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



git-svn-id: http://test.kernel.org/svn/autotest/trunk@2654 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
a700772e70548b10721ba709c7ec5194bb6d7597 13-Jan-2009 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Created a client/common_lib/utils/import_site_class function to take
care of site specific importing of classes. Modified code to use it.

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



git-svn-id: http://test.kernel.org/svn/autotest/trunk@2626 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
b88d6dc723de628c0da22513c59997eab29ab1f3 10-Jan-2009 jadmanski <jadmanski@592f7852-d20e-0410-864c-8624ca9c26a4> Remove the reason logging from END messages when running a group
for "standard" failures (e.g. TestFail, TestError, etc.). The reason
should already be logged at the point of failure, so the duplicate
message is just noise.

Risk: High
Visibility: END reasons for normal failures should be empty

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



git-svn-id: http://test.kernel.org/svn/autotest/trunk@2619 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
53da18eddf69243ca175d9a4603cba5b55300726 05-Jan-2009 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Rename autotest_utils to utils

Fixes longstanding hangover ugliness from the original change away
from doing "from autotest_utils import *".

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



git-svn-id: http://test.kernel.org/svn/autotest/trunk@2595 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
34347afacc14a014a301ee3c738b33203824a717 11-Dec-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> client.bin.job.filesystem passes an extra mountpoint
argument to construct partition.partition.

Signed-off-by: Kazuo Ito <ito.kazuo@oss.ntt.co.jp>




git-svn-id: http://test.kernel.org/svn/autotest/trunk@2561 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.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/bin/job.py
0496582a29fbaead3bda41f7b88549f1455ab7ab 06-Dec-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Some style and documentation cleanup. The change to the run_group tag
parameter logic is a similification of what the old code already did.

no logic changes.

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



git-svn-id: http://test.kernel.org/svn/autotest/trunk@2548 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.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/bin/job.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/bin/job.py
b5dac4323ac5dca003da7e8114e80ab99612ac73 27-Nov-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Provide the ability to drop caches between benchmark iteration runs

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



git-svn-id: http://test.kernel.org/svn/autotest/trunk@2518 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
7afc3a678bdf39549f6397a9b8d5d181a628e992 27-Nov-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Increase pkgmgr fetch timeout to 30 minutes (from 10)
Throw a warning when run_command's timeout fires

Signed-off-by: Rachel Kroll <rkroll@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@2515 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
874f19f7805ce4ca6e11f4e2d4ab6ab3dcf4650a 20-Nov-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> A few misc changes to job.py

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



git-svn-id: http://test.kernel.org/svn/autotest/trunk@2472 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
5b2844f8306994a5bb09ef4f618910cc3c5d3427 19-Nov-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> git-svn-id: http://test.kernel.org/svn/autotest/trunk@2446 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
e39c3c0dbe16caed55f4538af78dbf057deb7fad 18-Nov-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Adds the ability for the client.bin.base_job class to keep track of run
numbers and include them in the output directory / test tag.

Adds the ability for the client.bin.base_job class to insert the
running kernel version (uname -r) into the test tag at run_test() time.

Enabled both of the above in the generated control file when multiple
kernels are given via the AFE.

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



git-svn-id: http://test.kernel.org/svn/autotest/trunk@2433 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
12eafffaf869570a62025f4dc1f3d0908285998c 06-Nov-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Add support for running a test over a sequence of multiple kernels.
The kernel version is appended to the test name before the tag when
making directories for test output.

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



git-svn-id: http://test.kernel.org/svn/autotest/trunk@2382 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
b600a99136c7ee1e12408d62fd245135825cd40d 04-Nov-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Fix run_group. There's no point in it creating a directory,
as the only real user for it is the filesystems code, and the run_test
inside the group will fail as the dir already exists. Somehow this
used to work, but I have no idea how - right now it's useless.

Also fixed the error handling from _rungroup not to be so ... odd.
I can't see any reason why it can't do the normal thing and just
re-raise the exception

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



git-svn-id: http://test.kernel.org/svn/autotest/trunk@2369 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
9c62752e0199e41c8472e5105c5be08c7a5172ac 27-Oct-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Some code clean up, speed up (cPickle vs pickle) and proper error
handling done while reviewing the code.

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



git-svn-id: http://test.kernel.org/svn/autotest/trunk@2346 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
8a17e7caeb8ae95e41b239c009b32de183fccd56 27-Oct-2008 jadmanski <jadmanski@592f7852-d20e-0410-864c-8624ca9c26a4> Some changes I recently made to the handling of client job state files
so that autoserv could push some pre-set state out to the client
broke the handling of client state on standalone clients. This adds
in a check to make sure that either if the job is not a continuation
then the state file should only be used if it looks like "fresh"
state (i.e. it's never been initialized).

This patch also includes some cleanup that Martin Bligh was working
on in order to try and make autotest+autoserv usable in #! lines
for shell scripts.

Risk: Low
Visibility: Prevents state-state problems when using a standalone
client.

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



git-svn-id: http://test.kernel.org/svn/autotest/trunk@2335 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
4ec32c1fa3ca4453f2d1efc8d182ef4430190829 22-Oct-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Rename the client.bin.filesystem module to client.bin.partition.
mbligh and I are refactoring this code. It should have been called
partition from the beginning.

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



git-svn-id: http://test.kernel.org/svn/autotest/trunk@2324 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
02c0e4514f86ab3027ff46bd8a32b5e0564b910c 21-Oct-2008 jadmanski <jadmanski@592f7852-d20e-0410-864c-8624ca9c26a4> Pull the reboot START logging out of job.reboot; the reboot END logging is
queued up by methods external to job.reboot (i.e. kernel.boot) and so the
START logging should be run from there as well; otherwise it's not possible
to call job.reboot properly without having to first queue up your own END
logging. The default should just work.

Risk: Low
Visibility: Code changes only; should have the same user-visible behaviour.

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



git-svn-id: http://test.kernel.org/svn/autotest/trunk@2316 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
c09fc1543a3f77026bab728770aa0191feaddd07 15-Oct-2008 jadmanski <jadmanski@592f7852-d20e-0410-864c-8624ca9c26a4> Make sysinfo more configurable. This adds some methods to the job
classes, job.add_sysinfo_command and job.add_sysinfo_logfile, that
can be used to add more commands and/or logfiles to the standard
sysinfo collection for the job.

Risk: High
Visiblity: You can add code to control files to customize sysinfo
collection.

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



git-svn-id: http://test.kernel.org/svn/autotest/trunk@2289 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
0910844396c68a8747dc1ab580fb898ecff2469e 15-Oct-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Keep track of the last kernel we explicitly 'reboot'ed into. This
should be the default for any subsequent reboots.

Fix a bug where we would set the default label on a platform when
host.rebooting() from the server side (when only a boot_once was
called for). Also fixed a bug where label=None would NOT reboot
into what was supposed to be the default kernel.

Fix a bug in the state engine which made it impossible for None to be
the default of a state variable.

Risk: High
Visibility: High (this tweaks the semantics a bit; most people would
have called the behavior a bug, but some may have
depended on it)

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


Make boottool handle the None case on boot_once and sanity check
it for set_default (since it takes an index, and Null is not a valid
use).

Risk: Medium
Visibility: Medium

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



git-svn-id: http://test.kernel.org/svn/autotest/trunk@2287 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
d33fa27cbfedf8207f1835ac19172f7d07713efe 14-Oct-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Dropping caches before each test can disrupt other tests if
we're doing multiple things in parallel. At John's suggestion,
do it in _run_test_complete_on_exit instead.

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



git-svn-id: http://test.kernel.org/svn/autotest/trunk@2280 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
76a42932939e6cb95ab63a131695ad6e7ab3b70c 09-Oct-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> recommit logging changes - was just spare pyc file




git-svn-id: http://test.kernel.org/svn/autotest/trunk@2266 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
b931b687e09cec9b25f37d437f33be73b6de20f3 09-Oct-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> back out logging changes for now




git-svn-id: http://test.kernel.org/svn/autotest/trunk@2265 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
6bb78731b0bc1d4bdd14e565effd72bea74c1c65 09-Oct-2008 jadmanski <jadmanski@592f7852-d20e-0410-864c-8624ca9c26a4> Fix a try-except-finally to be compatible with python 2.4.

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



git-svn-id: http://test.kernel.org/svn/autotest/trunk@2264 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
681b6a05a596fb0bf379979e11bb620b58a5707f 09-Oct-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Configuring main autotest classes to use the new debug infrastructure,
converting 2 of the major verbosity sources on autotest and autoserv
executions. Logs with timestamps as a bonus :). The patch should apply
cleanly against svn trunk.

Visibility: Users and developers of the command line programs (autotest
and autoserv) will perceive a reduced verbosity, that can be increased
on the debug configuration file if needed.

Risk: Low (small number of changes, all tested and things were done
trying to isolate sources of failure as much as possible).

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



git-svn-id: http://test.kernel.org/svn/autotest/trunk@2261 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
cefe2653333168a08c891f72a708b66855f07853 08-Oct-2008 jadmanski <jadmanski@592f7852-d20e-0410-864c-8624ca9c26a4> Refactor all the sysinfo collection code into something a bit less
ad-hoc than the original code. In particular:
- move all the code into base_sysinfo and site_sysinfo classes, and
use inheritance to hook the site-specific code rather that having
to add explicit hooks to the base code
- get rid of all the magic state created in client/bin/test.py so
that we can pass data between the sysinfo code run before and
after each test; instead, just have a single sysinfo instance
associated with a job and store state there
- change all the code to work with paths taken from job and test
objects (i.e. job.resultdir and test.outputdir) instead of just
magically changing the working directory and implicitly doing all
logging in place
- change the reboot in the job sysinfo dir to call them boot.0,
boot.1, etc. to be more in line with the names we use in TKO
- replace some code that used shell commands with functions from
the python standard library (e.g. os.symlink instead of "ln -s")

Risk: Medium
Visibility: reboot.N -> boot.(N-1) in sysinfo; all other changes
should not be user visible

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



git-svn-id: http://test.kernel.org/svn/autotest/trunk@2257 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
25e60e6e63203acc4fcefd8f4c00e8fb6b7c3495 03-Oct-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Enhancement 1240629: Add same tag to series of run_tests by single job.set_test_tag() call.
Facilitates re-running any test or arbitrary existing collection of tests under many
combinations of kernel options such as numa node size, stale page age, sched_idle class,
etc, and keeping those runs distinct without modifying many individual job.run_test calls.
Low risk.

Signed-off-by: Duane Sand <duanes@google.com>




git-svn-id: http://test.kernel.org/svn/autotest/trunk@2239 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
067b26c1f0db3592e788b748ccb7ee5710161fa2 25-Sep-2008 jadmanski <jadmanski@592f7852-d20e-0410-864c-8624ca9c26a4> If ident=False in the kernel.boot methods, we still need to add a
step to the job to finish up the reboot logging. So I changed
kernel_check_ident to end_reboot_and_verify, and added a basic
end_reboot method that just does the reboot end logging without
doing a reboot.verify check.

Risk: Medium
Visibility: ident=False should now work

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



git-svn-id: http://test.kernel.org/svn/autotest/trunk@2196 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
1b3b376d94edee8f235f8669a047dc00751bf97a 25-Sep-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Rename client/common_lib/logging.py to client/common_lib/log.py in order to be able to use the standard python logging module

Python has a standard module used to perform logging operations
(http://docs.python.org/lib/module-logging.html) that could be used
inside autotest, however we have a common_lib module named logging as
well, that makes difficult to import the python logging module in all
other parts of autotest (including tests).

So this patch basically renames logging to log and fixes all references
to it. All the files touched were pylinted and basic sanity testing was
made (running autotest with different control files).

About the risks, in my opinion it's worth the effort, since we gain the
ability to use a powerful logging library, that would help us to
implement a better logging system inside all autotest modules.

Risk: Medium/High - Even though care was taken to ensure all references
to logging were changed, it touches a fair bit of the code and something
might have passed unaudited.

Visibility: Low - Should be invisible for all users, and developers must
just remember that now logging is called log.

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



git-svn-id: http://test.kernel.org/svn/autotest/trunk@2193 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
b96dbe3c79016d4b921612f23a2ad292cc951a77 23-Sep-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Fix a bug where outer containers are never released, when a single
job process created both an inner container and outer container.
This gave container allocation errors on later job steps, or
a fatal rmdir error on parallel job's final release_container.

When releasing a job tasks' current container, step back to the
parent container that the job was executing within before the
current container was created.

Portions of class function cpuset.release() were used to destroy
old orphaned containers. These steps should not modify the
job.container cpuset object. They are now factored out as
non-class function cpuset.release_container().

Risk: low.

Signed-off-by: Duane Sand <duanes@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@2190 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
23afbec41f6275bef4e80c36726916b0be564204 17-Sep-2008 jadmanski <jadmanski@592f7852-d20e-0410-864c-8624ca9c26a4> Add a standard run_cleanup option to test.run_test that can be used
to enable/disable the running of test.cleanup after the test
completes. This also adds some global state on the job objects
that can change to default for tests from enabled to disabled.

Risk: Low
Visbility: Adds ways to disable test cleanup at both the job and test
level.

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



git-svn-id: http://test.kernel.org/svn/autotest/trunk@2167 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
b6eb2f19e1225b14dee3839c2945caf6bc90fa73 12-Sep-2008 jadmanski <jadmanski@592f7852-d20e-0410-864c-8624ca9c26a4> First pass at pulling back test results during a client job, as each
test completes. Definitely needs some testing, cleanup and refactoring
before this can be considered complete, but this is a good, working
start point.

Risk: High
Visbility: Test results should now be pull off of client machines as
the tests finish.

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



git-svn-id: http://test.kernel.org/svn/autotest/trunk@2139 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
52fa69285dbeb9e9a0d49de4b1e12b52cda39fc6 05-Sep-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Parsed output to generate keyvals for specific netperf tests. Additionally
made this test as well as the iperf test use the new scheme for 3 storing
three dimensional data in the keyval files. Which is to use multiple iterations
and to use attributes.

Signed-off-by: Bryce Boe <bboe@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@2113 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
d593345304d4565688470057927779e1d58659e6 04-Sep-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Have the step/state engine print out a message any time a state var
is updated to aid in debugging of complex control files.

Risk: Low
Visibility: Medium

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




git-svn-id: http://test.kernel.org/svn/autotest/trunk@2108 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
c533bd1773ea45b2bfcbab767b620918d5aea368 03-Sep-2008 jadmanski <jadmanski@592f7852-d20e-0410-864c-8624ca9c26a4> Add netconsole support to the console logging, as a backup when
serial console is unavailable.

Risk: Low
Visibility: If serial console support is unavailable, we can at least
pull console logs from netconsole.

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



git-svn-id: http://test.kernel.org/svn/autotest/trunk@2092 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
aee19fc0e6f543920ef5223bf2cf01beb16fb9ea 22-Aug-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Add new_container() kswapd_merge option, for consolidating the active
kswapd and kstaled processes which manage memory nodes of that container.
Option can be used only with kernels 2.6.18-230.0_rc6 and later.
Low risk.

Signed-off-by: Duane Sand <duanes@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@2025 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
d6ae085db471961c1c4783921931943f0e133bf2 18-Aug-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Edited job.py to add toolsdir
Added proc_wrapper.py to the tools directory for my tests.
Updated iperf test to properly write the keyval file.

Signed-off-by: Bryce Boe <bboe@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@1999 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
63291579752394a5cf9d43ebdffefc62e03e97d6 14-Aug-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> strip out carriage returns from status log messages

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



git-svn-id: http://test.kernel.org/svn/autotest/trunk@1990 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
1a43a8cd72c9c572b255e2b316c553a5d5aac19a 14-Aug-2008 jadmanski <jadmanski@592f7852-d20e-0410-864c-8624ca9c26a4> When a kernel identity check fails, the method doing the checking
should log the reboot.verify failure.

Risk: Low
Visibility: Changes how reboot verify failures get logged on the
client side.

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



git-svn-id: http://test.kernel.org/svn/autotest/trunk@1987 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
0c286ac95ff176061c400ebdd144c6b06690fea9 12-Aug-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> The variable exc_info is currently None when test raises any exception
under TestBaseException. But, it (exc_info) should also be assigned
correctly to sys.exc_info(), so run_test() gets the right returned status.

Signed-off-by: Rafael Xavier <rxaviers@br.ibm.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@1972 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
c5ddfd1f71caef9ec0c84c53ef7db42fcdc33e1c 04-Aug-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> I have attached the patch for the packaging system.
The documentation is available at : http://test.kernel.org/autotest/PackagingSystem

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



git-svn-id: http://test.kernel.org/svn/autotest/trunk@1953 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
5c7135935ef16c630df5bab4d137d469145ebcda 30-Jul-2008 jadmanski <jadmanski@592f7852-d20e-0410-864c-8624ca9c26a4> If cpusets are not available on a machine, raise a specific error. Also, change
job.run_test to catch this error and mark the test as an ERROR instead of
just letting the exception through.

This has two advantages:
1) We don't stop running other tests that may not depend on cpusets just
because cpuset tests won't work.
2) When the problem does occur, we now see status logs that indicate the
test that failed due to the lack of cpusets. As things are now, the failure
occurs before starting the test and so the test that actually caused the
problem never even appears in the status logs (or the results).

Risk: High
Visibility: It should now actually be much easier to tell when you get a
"/dev/cpuset is missing" error that the problem was due to running a test that
requires cpusets without actually having them available on the test machine.

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



git-svn-id: http://test.kernel.org/svn/autotest/trunk@1927 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.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/bin/job.py
f3d9b0473505296a4673c83c7babbce4c27a6f00 07-Jul-2008 jadmanski <jadmanski@592f7852-d20e-0410-864c-8624ca9c26a4> Fix some circular dependency issues in the job<->site_job setup in client/bin.
If we have site_job inherit from base_job, then we can run into import issues
due to the circular dependency between site_job and job. Since we never create
an instance of site_job directly, it's better to just have it inherit from
object and then make job multiply inherit from both base_job and site_job,
with site_job overriding base_job.

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



git-svn-id: http://test.kernel.org/svn/autotest/trunk@1773 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
75c0b71a91a741d5ca94db22aead029be335e2f0 03-Jul-2008 jadmanski <jadmanski@592f7852-d20e-0410-864c-8624ca9c26a4> Add support for running tests using some disk I/O containment through cpusets.

Risk: Medium (hooks into some core code, but it shouldn't change
existing behaviour)

Risk: Low
Visibility: Adds more optional parameters to the code for creating cpusets, to
allow you to specify I/O prioritization.

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



git-svn-id: http://test.kernel.org/svn/autotest/trunk@1772 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
9e722984cea169afec7b6515f7178a131a22bb0b 01-Jul-2008 jadmanski <jadmanski@592f7852-d20e-0410-864c-8624ca9c26a4> Add support for running tests using some network containment through cpusets.
This currently relies on a binary tool that I can't mail out right now, but
that should change in the future (and this new code won't impact anyone who
doesn't explicitly use it).

Risk: Medium (hooks into some core code, but it shouldn't change
existing behaviour)

Visibility: Adds some new optional parameters when creating
containers/cpusets for controlling the network containment.

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



git-svn-id: http://test.kernel.org/svn/autotest/trunk@1755 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
ba46b27c2473669a3d36d583298bf50da6831c3b 23-Jun-2008 jadmanski <jadmanski@592f7852-d20e-0410-864c-8624ca9c26a4> Drop some information that was included in a JobError exception since
there's no way for us to actually make use of it, and it just leads
to misleading messages in the status log later on.

Risk: Low
Visibility: Eliminates an error message that isn't useful anyway.

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



git-svn-id: http://test.kernel.org/svn/autotest/trunk@1735 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.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/bin/job.py
a75b90e69047e38b69f9eb75baa37b840fffd850 20-Jun-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Convert subdir_tag to string when concatenating. Fixes a problem when
using integers for subdir_tag. Tested.
Did the same for testname_tag.

Risk: Medium (Very minor change affecting subdir_tag and testname_tag usage)
Visibility: Users who use subdir_tag or tag in control files.

Signed-off-by: Ryan Kubiak <rkubiak@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@1728 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
3aa22dac3d7d81074f1504dc2103fdc3677b2cfa 18-Jun-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Add in from autotest_lib.client.common_lib.utils import * to the job preamble

Signed-off-by: Scott Zawalski <scottz@google.com>




git-svn-id: http://test.kernel.org/svn/autotest/trunk@1718 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.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/bin/job.py
c1f8cedaa425fa57813e4e8ce6db2b84676816ba 13-Jun-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Added a bit more coverage in the client/bin/job unittest.

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



git-svn-id: http://test.kernel.org/svn/autotest/trunk@1705 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
539d876afd496c68aa7771534e2d530bc412682c 12-Jun-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Fixed another woops. The path laid out in the preamble is wrong.

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



git-svn-id: http://test.kernel.org/svn/autotest/trunk@1684 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
4700d94d00de058d6af738d56c300a7458d67c05 11-Jun-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> the line "import common" is used to setup the absolute paths so that after that we can say things like
"from autotest_lib.client.common_lib import error". However we still have some left over imports that
look like "from common import error" that when mixed with the above are breaking our ability to automate
the running of the unittests. This file created a preamble that is inserted into every control file. It is being cleaned up since we are moving towards closing this
error.

In short, currently calling "import common" in an entry point, performs the magic of creating the autotest_lib root, and then goes on to set common as a shortcut for autotest_lib.client.common_lib. This created havoc for our unittest runner. So this change is replacing the common with the full path since we are planning on getting rid of the use of common as a shortcut.

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



git-svn-id: http://test.kernel.org/svn/autotest/trunk@1681 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
6e83b6f6f33845f700de049f5f64fa448b667ed5 10-Jun-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Had to change a few classes to be new style python classes. This is done since
I am having to mock out these classes and they need to be new style for that
to work in our mock framework. The other change was to allow mock_god to
unstub a specific method. The bulk of the new code is in job_unittest.py
which tests job.py. had to make a couple of changes to job.py that involve
changing __ to _.

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



git-svn-id: http://test.kernel.org/svn/autotest/trunk@1668 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
1544080ecbc33092f6e674f6df9831be49f29d3e 07-Jun-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Whitespace changes to job.py



git-svn-id: http://test.kernel.org/svn/autotest/trunk@1661 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.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/bin/job.py
b0605d9c7bb7e60ee7441a5f59bd89039f3c811d 06-Jun-2008 jadmanski <jadmanski@592f7852-d20e-0410-864c-8624ca9c26a4> Fix up a few bits of whitespace silliness, unnecessary/missing newlines, etc.



git-svn-id: http://test.kernel.org/svn/autotest/trunk@1642 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
d660afe45d87270b509e069a44834d0244ae2090 06-Jun-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Add support for tagging subdirs independently of the testname tags.
This allows you to group multiple test runs under the same name
while still storing their results in unique directories.

From: Duane Sand <duanes@google.com>
Signed-off-by: John Admanski <jadmanski@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@1620 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
c61fb369260af3f57084510e02468ebb3953ecae 05-Jun-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Risk: Medium
Visibility: Low
Fix reference from common.test to autotest_lib....
The original reference in test.py has now grown to a lot more files yet again
All are just run of the mill import cleanups

Signed-off-by: Scott Zawalski <scottz@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@1606 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
e829ba5bdd5062038af60dbd35d7c466ba0b834c 03-Jun-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Risk: Medium to high (Touches a lot of code)
Visibility: Under the hood code cleanup
from autotest_utils import * fixes and other import issues throughout the code base

Signed-off-by: Scott Zawalski <scottz@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@1591 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
8f4d043ea111fdd90580b90d30f12839dc3bcdc6 02-Jun-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Creates job.next_step_append whose behavior matches that of the current
job.next_step and then change the semantics of job.next_step so that
the step engine's behavior is more like a depth first search than a
breadth first search.

I believe that it's more intuitive to users to have the steps most
recently added be run first, but be run in the order they were added
within the function. Here's an example of what I mean:

def step_init():
job.next_step('a')
job.next_step('b')
def a():
print "a"
job.next_step('a1')
def a1():
print "a1"
def b():
print "b"

With the old behavior, you'd see "a b a1"
With the new behavior, you'd see "a a1 b"

You'll notice that the old behavior is like a BFS in that it processes
things exactly in the order that they're added (i.e. a queue). The
new behavior processes things as a stack. This could be acomplished
via job.next_step_prepend except for the fact that you have to add
steps in the reverse order you intend for them to run. For example,
to get 1, 2, 3, you'd write the following code:

def step_init():
job.next_step_prepend('c')
job.next_step_prepend('b')
job.next_step_prepend('a')
def a():
print "1"
def b():
print "2"
def c():
print "3"

With the new code, job.next_step will place it after all steps added
in this step already but before any steps added in other steps.


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




git-svn-id: http://test.kernel.org/svn/autotest/trunk@1583 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
b274ef5eedd5b577b2ef63999e338a327975febd 02-Jun-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> This change allows steps (think 'step engine') to be composed with a
tiny bit of magic added. This allows tests that reboot the system
to be composed via the autotest web frontend.

Here's an example of a job with composed steps:

def step_init():
job.next_step(step1)
job.next_step(step2)
def step1():
def step_init():
job.next_step(step1)
# do something that reboots the system
def step1():
# do something that runs after a reboot
return locals() # the only 'magic' required to make it all work
def step2():
job.run_test("sleeptest")


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




git-svn-id: http://test.kernel.org/svn/autotest/trunk@1582 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
cf8c4d68b8c3def2a5ebb00b3ccbf83ce3e8f6f0 28-May-2008 jadmanski <jadmanski@592f7852-d20e-0410-864c-8624ca9c26a4> Risk: Low
Visibility: Changes the error/reason associated with unhandled
exceptions during tests.

This fixes up the error message associated with UnhandledError
exceptions to actually tell you that the failure was due to an
unhandled exception, and what the unhandled exception was. It drops
the testname from the exception, since the status lines that log the
exception already include the testname anyway.

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



git-svn-id: http://test.kernel.org/svn/autotest/trunk@1557 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
c1cbc9948f5ddaf360853afa1994d942ffd5fe09 27-May-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> 1. Enable job tags to be passed from the server side (basically use the -t option available on the client side to be passed in from the server)
2. Add code to help run multiple jobs on the same machine starting at the same time (using jobs tags so that the results don't get clobbered up and barriers for synchronization)
3. Add a sample server side control file to demonstrate the usage of running multiple tests on the same client starting at the same time by running two "sleeptests".

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



git-svn-id: http://test.kernel.org/svn/autotest/trunk@1549 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
87cbc7fe4f0fef49c74c9647cc42c50088622449 13-May-2008 jadmanski <jadmanski@592f7852-d20e-0410-864c-8624ca9c26a4> Nested calls to job.new_container fail. Change default for root arg to be
current process's current container, rather than the superroot container.

Undeleted old containers tie up resources. Add routine
cpuset.release_dead_containers() to clean out all idle test* containers
left over from failed prior jobs. Is not automatically called;
should explicitly add to top of container-specific test scripts.

Bugfix: default mem size and cpu cores should depend on the chosen parent container,
not on the superroot container.

Add cpuset.my_cpus() routine to support N-way container test scripts.

Tested via client/tests/container_twoway/control and via sleeptest.

From: Duane Sand <duanes@google.com>
Signed-off-by: John Admanski <jadmanski@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@1506 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.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/bin/job.py
8415f966acaaa3aa3ca6a651d9a190081edbb0ee 06-May-2008 jadmanski <jadmanski@592f7852-d20e-0410-864c-8624ca9c26a4> Add disk usage monitoring to tests. This triggers a WARN if, during
the running of a test the rate of disk space usage on / exceeds a
fixed threshold.

The monitoring defaults to off, but you can turn it on for
subsequent tests by calling job.monitor_disk_usage.

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



git-svn-id: http://test.kernel.org/svn/autotest/trunk@1487 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
a9c75c46f3b887cf6aff55bf76075c70d3f8c183 02-May-2008 jadmanski <jadmanski@592f7852-d20e-0410-864c-8624ca9c26a4> Run client-side reboots in a test group, and include information
about the kernel booted in the group END logging.

This required enhancing the client-side job code to preserve the
logging indentation across reboots.

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



git-svn-id: http://test.kernel.org/svn/autotest/trunk@1480 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.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/bin/job.py
f1ae0a475b3c6a5190539e9773869af069c9312d 25-Apr-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Rename the step engine's steps variable to __steps so that no one
accidentally overwrites it.

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



git-svn-id: http://test.kernel.org/svn/autotest/trunk@1467 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
366ff1b0d8597d0f646606198be3fe449031e63c 25-Apr-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Make the step engine more powerful and add a soft-reboot test that uses it

This patch abstracts out the state maintained for the step engine. This allows control files and autotest itself can save variables between reboots. This will allow testing that involves reboots to be much more robust and will allow it to still play nicely with the autotest web frontend. Attached is a soft-reboot test that takes advantage of this functionality.

From: jorlow@google.com



git-svn-id: http://test.kernel.org/svn/autotest/trunk@1466 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
12a04cbc9c9812232e1a44ccaae7511d0f2eb063 25-Apr-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Make the step engine more powerful and add a soft-reboot test that uses it

This patch changes the usage of job.next_step while maintaining backwards compatibility. You can now pass named parameters and you no longer need to wrap everything in an array. What used to be job.next_step(['some_function', 'some_param', 'another param']) can now be job.next_step('some_function', 'some_param', 'another_param'). Like before, the function passed in can be the actual function or a string representation of that function. Also like before, the function must be in the global namespace fo the control file. For backward compatibility, if the first parameter is a list, the first item in the list is assumed to be the function and the rest are assumed to be arguments. In other words, this change should not break anything and should make the next step syntax cleaner.

From: jorlow@google.com



git-svn-id: http://test.kernel.org/svn/autotest/trunk@1465 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
337bb763364d5b09140790e1caeb41c3c9c64d46 16-Apr-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Clean up a bunch of cpuset code (e.g. move some methods out into
functions, add some more sensible defaults, fix up some variable
names).

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



git-svn-id: http://test.kernel.org/svn/autotest/trunk@1436 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
caa62c2a72c0300254998f21f4aca4579f251da4 07-Apr-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Implemented hooks for external logging infrastructure for storing both server-side and client-side logs.

Signed-off-by: Svitlana Tumanova <stumanova@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@1408 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
9ea52602ddddfdd3fe83cbd79160bd3173541406 02-Apr-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> If someone calls run_test with a container arg but no root specified,
default to '', not None.

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



git-svn-id: http://test.kernel.org/svn/autotest/trunk@1391 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
1fc7ba1254d07f04e8d02294399bf7a19f3fd105 31-Mar-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Change job.new_container to just use root='' as the default.

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



git-svn-id: http://test.kernel.org/svn/autotest/trunk@1385 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
6e6847467f0c2c9a17cc48f5418df7524410ea5b 26-Mar-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Allow someone to specify a root container of ''.

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



git-svn-id: http://test.kernel.org/svn/autotest/trunk@1368 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
b7fd270f6ff4806468085065aa489c712fd8a9f8 25-Mar-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Add kernel information to reboot.verify logging, and add support to
the parser to use it as a source of kernel version information.

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



git-svn-id: http://test.kernel.org/svn/autotest/trunk@1359 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
38a4a1137cfc66546efcaf2038ecbb427a8ce579 19-Mar-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Remove some Perforce references that in practice we never use, and that
shouldn't be used externally regardless.

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



git-svn-id: http://test.kernel.org/svn/autotest/trunk@1352 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
4bc5f6c766901ea1ab62cf327edb794df871143a 13-Mar-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Remove the check generates a warning if more than 5MB of disk is used
up on / during the job. This check doesn't really enforce what we want,
it pretty much just generates a bunch of false-positive warnings
whenever a kernel is installed. I'll write a more fine-grained warning
based around tests instead of jobs in a separate patch.

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



git-svn-id: http://test.kernel.org/svn/autotest/trunk@1344 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
e9901bd07fb080b93e71df4414b16acc217fc448 08-Mar-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Take out the diskspace warning in job.__init__, it just duplicates
work that should be done by verify.

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



git-svn-id: http://test.kernel.org/svn/autotest/trunk@1318 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
0144e5aacc671764d1cdb6817362e629d78dfeb6 07-Mar-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Move the free-space-on-root check up so that it occurs "inside" the
job, not after the end of the job has already been logged.

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



git-svn-id: http://test.kernel.org/svn/autotest/trunk@1316 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
45fd7c69f7f7378556a3f87f500fd973ff8c846a 05-Mar-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> If we don't use df -P, we can get line breaks on long device names,
which confuses the parser. Thanks to jburke for pointing this out,
and Andy for the solution ;-)

$ df -m /
Filesystem 1M-blocks Used Available Use% Mounted on
/dev/mapper/VGR5X86-LVRootX86
106693 3524 97663 4% /

$ df -mP /
Filesystem 1048576-blocks Used Available Capacity Mounted on
/dev/mapper/VGR5X86-LVRootX86 106693 3524 97663 4% /

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



git-svn-id: http://test.kernel.org/svn/autotest/trunk@1303 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
6ca0d6a3ce219019bfb512aa9c612dd7571374da 03-Mar-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Fix the container check.

From: Jean-Marc Eurin <jmeurin@google.com>
Signed-off-by: John Admanski <jadmanski@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@1290 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
4d349ca0e1a6eee125011aba134b46b6b59d5b87 03-Mar-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> The disk usage warning shouldn't be using a subdir of "Check disk
usage".

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

diff -up a/client/bin/job.py b/client/bin/job.py
--- a/client/bin/job.py 2008-02-28 14:40:58.000000000 -0800
+++ b/client/bin/job.py 2008-03-03 07:50:24.000000000 -0800
@@ -722,5 +722,6 @@ def runjob(control, cont = False, tag =
df_root = system_output('df -m / | tail -1').split()
free_space_mb_root_after = int(df_root[3])
if myjob.free_space_mb_root_before - free_space_mb_root_after > 5:
- myjob.record('WARN', 'Check disk usage', 'disk usage on root is
greater than 5Mb')
+ myjob.record('WARN', None, 'disk_usage',
+ 'disk usage on root is greater than 5Mb')
myjob.complete(0)



git-svn-id: http://test.kernel.org/svn/autotest/trunk@1289 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
c0b10d36b442c8688f7e3ad8735700236d1673b1 03-Mar-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Fix a spelling mistake, remove control.fs regardless of control.state's existenc
e.

From: Jiqing Tang <jiqingtang@google.com>
Signed-off-by: John Admanski <jadmanski@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@1288 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
f4ca14ff114fd92821e374bdf8e30f5ab90f9e24 03-Mar-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Save free_space_root_mb_before in a file and load it in following steps.
This will fix the bug introduced by my previous cl for multi-step jobs.

From: Jiqing Tang <jiqingtang@google.com>
Signed-off-by: John Admanski <jadmanski@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@1287 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
bf79bbabf2575b12872b199aba192efdde2c2ae3 03-Mar-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Check / has at least 10% or 100Mb free space before client tests run.
Make sure the (log) files generated on / during the tests does not exceed 5Mb.

From: Jiqing Tang <jiqingtang@google.com>
Signed-off-by: John Admanski <jadmanski@google.com>




git-svn-id: http://test.kernel.org/svn/autotest/trunk@1286 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
84bafdba08b02b883ab23fcc7e915b2453f26c03 26-Jan-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> As discussed previously regarding support for proprietary/internal
tests, support for a site_tests directory was implemented. Tests
contained on site_tests are executed over eventual versions that are
located on the standard tests dir.

This way, it's possible to separate proprietary/internal tests. I know
that this can possibly be a controversial change, so let me know if
there are any problems.

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



git-svn-id: http://test.kernel.org/svn/autotest/trunk@1203 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
681195896bfcea90a4896e52720005bb5bc51615 25-Jan-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Adapt Autotest for running benchmarks in pairs under separate containers.

From: Duane Sand <duanes@google.com>
Signed-off-by: John Admanski <jadmanski@google.com>




git-svn-id: http://test.kernel.org/svn/autotest/trunk@1202 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
d5a388390e2dfb07c3c742352d57a2e7193f66b4 25-Jan-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Add a libdir to allow tests to share common libraries.

From: Michael Rubin <mrubin@google.com>
Signed-off-by: John Admanski <jadmanski@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@1201 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
adff6ca0cb1fd0eb9d715fb45ec33708a02579ba 22-Jan-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Add a check to see if the temporary results directory exists, if it doesn't
create it. Further up in the code we delete this directory but don't create
it anywhere.

Signed-off-by: Scott Zawalski <scottz@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@1187 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
71ea249d32e5f2a1d5f601a6b6fe286df5f0b54e 15-Jan-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Revert one of the raise changes that was made by r1158 to convert a
large set of raises to the one-argument form. The original code was
deliberately using the three-argument form to re-raise the original
exception instead of wiping out the original traceback by raising a
new exception.

While looking at this, I also noticed a logic bug in the related code
in test.run_group; the code which is supposed to be wrapping
non-TestError exceptions in a TestError is actually doing the
opposite and wrapping TestError exceptions. The patch fixes this as
well.

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



git-svn-id: http://test.kernel.org/svn/autotest/trunk@1163 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
d509b71f612ccfc97dd723f24fa74d3275b73f6f 14-Jan-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> job.parallel should accumulate any exceptions that are thrown during
its calls to fork_waitfor and then raise them in a single JobError
after all the tasks are complete.

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



git-svn-id: http://test.kernel.org/svn/autotest/trunk@1161 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.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/bin/job.py
0fb83977415f02b821f17c89056f37e7179554e0 10-Jan-2008 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Add missing part of sysinfo change

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



git-svn-id: http://test.kernel.org/svn/autotest/trunk@1135 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
d528d30ade9c0ea04777555908053f324f5ca56d 19-Dec-2007 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Extend the status logging mechanism to handled multiple tests in
parallel on a single machine without interleaving the status logs from
each test. This introduces some delay into the processing of these
logs since the status logging has to delay writing out the status
logs until it can impose a serial order on them.

However, it does NOT delay the writing of the logs to stdout; since
stdout is intended for human consumption and not machine processing it
is much more convenient for the logging to be visible in the logs at
the point in time where the event occured.

This implementation tries to avoid introducing a sitation where logs
are dropped on the floor because their being held back from the status
log. In the worst case on the client side the logs if autotest fails
before accumulating the logs in status then the intermediate logs will
still be available in individual status.* files, and on the server side
the server will automatically write out whatever logs it has
accumulated so far in the case of a failure (under the assumption that
it is still possible to write to status.log).

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



git-svn-id: http://test.kernel.org/svn/autotest/trunk@1089 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
6b504ff04e21af766da0cfbcde8e1e352a474dfa 12-Dec-2007 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Fixed the barriers to exit rendevous when there are no members specied.

Signed-off-by: Colby Ranger <cranger@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@1061 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
65938a2747786d9efb5fe8f4ef28bcc2899afcf9 10-Dec-2007 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Create a sample of running parallel tasks on one machine through containers.
Does the necessary modifications to kernbench and sleeptest classes so that they
can run under container.

From: Masoud Asgharifard Sharbiani <masouds@google.com>
Signed-off-by: Martin Bligh <mbligh@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@1049 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
e1417fa0334ac4e2ab6064e42de0bb891e561057 10-Dec-2007 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> * Added support for barriers to the server.
* Allow slaves to run HTTP servers and let the master connect to them.
This is for networks where some connections to machines can only be
initiated in one direction.
* Added a client test that would kick off profilers and run them in sync with th
e server.
* Added a server sample test that uses the client test.

From: Colby Ranger <cranger@google.com>
Signed-off-by: Martin Bligh <mbligh@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@1048 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
8d83cdc678ea7dcfc6780a029d39f841f548d859 03-Dec-2007 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Make autotest interact with manually run jobs properly

Now we use a separate filename for server jobs, we can just restart
any manually run job from the normal initscript method

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



git-svn-id: http://test.kernel.org/svn/autotest/trunk@1021 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
f31b0c0060dd688c80be3bb97ffdfa193e3d924b 29-Nov-2007 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Move error.py'>error.py'>error.py out of the client and server and into common_lib.

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



git-svn-id: http://test.kernel.org/svn/autotest/trunk@1003 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
b832e1b9df377b8debb06dd2ef8d51a19cc0e30c 24-Nov-2007 apw <apw@592f7852-d20e-0410-864c-8624ca9c26a4> job continuation error handling fixes

It seems that asking for a continue of a job which has actually completed
results in the following blammo:
JOB ERROR: 1
Traceback (most recent call last):
File "/usr/local/autobench/autotest/bin/job.py", line 569, in runjob
sys.exit(1)
SystemExit: 1

Traceback (most recent call last):
File "bin/autotest", line 51, in ?
job.runjob(args[0], options.cont, options.tag, options.harness)
File "/usr/local/autobench/autotest/bin/job.py", line 604, in runjob
myjob.group_level = 0
AttributeError: 'NoneType' object has no attribute 'group_level'

This seems to be caused by a couple of bugs. The first is that we can
bail out before we have a job. In this case we will attempt to exit(1)
to indicate completion. This will trip an exit exception and the
surrounding try will trigger. Here we have the following construction
which when we have a job will lead to our exiting '1':

except Exception, e:
[...]
if myjob:
[...]
myjob.complete(1)

However as we have yet to instantiate myjob we will drop through to
the end of the exception handler and as its not re-raising anything we
continue on as if there was no error. We then fall into this code
and all hell breaks loose:

myjob.group_level = 0
myjob.record('END GOOD', None, None)
myjob.complete(0)

This patch sorts that out by adding explicit exits to ensure we do not drop
out. It also makes the job completion exit much more obvious by making
a JobComplete exception object along the lines of the existing JobContinue.

Signed-off-by: Andy Whitcroft <apw@shadowen.org>


git-svn-id: http://test.kernel.org/svn/autotest/trunk@977 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
f91efaf53bf840d9545c3c0ceaa928d8fbb6df3b 24-Nov-2007 apw <apw@592f7852-d20e-0410-864c-8624ca9c26a4> client: job -- job group support broke run start indication

When the job group support went in this broke the run_start harness
indication. The current code only triggers at the start of the job, not
each run within the job. This means that harnesses are only correctly
initialised in the first step of the job.

Signed-off-by: Andy Whitcroft <apw@shadowen.org>


git-svn-id: http://test.kernel.org/svn/autotest/trunk@956 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
51144e0e162d43f2474b48535159b190a09a0d49 20-Nov-2007 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> When logging an exception during a test group failure, include the
exception string in the error message and not just a traceback.

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



git-svn-id: http://test.kernel.org/svn/autotest/trunk@950 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
cfc6dd3f4fa1b68921c785e720574168486e49ff 20-Nov-2007 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> When running a test use the test name as the group name, instead of
prepending "test." to it. The subdir actually contains all the
information we want, instead of stripping off the tag.

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



git-svn-id: http://test.kernel.org/svn/autotest/trunk@945 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
476817118a203079fae43a745b2b7ba3e17c8ee0 16-Nov-2007 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Fixes a typo in a job.py exception handler.

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



git-svn-id: http://test.kernel.org/svn/autotest/trunk@943 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
c343016711f17d8ad4c6bb1239944eee13279f0f 15-Nov-2007 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Move a lot of the ad hoc logging out of harness_simple and into job.py,
and make sure that multi-line logs (e.g. logs with tracebacks) are
not trucated to a single line in the status.log file.

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



git-svn-id: http://test.kernel.org/svn/autotest/trunk@941 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
6ee7ee08943eb274d4e286a1f11f9cbcbe4a41d5 14-Nov-2007 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Pulls the kernel/rpm_kernel autoselection code out of job.py and into a helper
function in kernel.py, and move the site-specific hook that allows
pre-processing of kernel paths out of rpm_kernel and into this new helper
function.

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



git-svn-id: http://test.kernel.org/svn/autotest/trunk@939 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
7dd510c3d11e5e346542907867d839858b0cb7e7 13-Nov-2007 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Rewrite the run_test and run_group code in job so that individual
tests are each run inside of a group. This makes it possible to
determine not only what tests have run, but also what test is
currently running.

The status log parsing in status.py has also been rewritten so that
it can handle the wrapping of jobs in groups.

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



git-svn-id: http://test.kernel.org/svn/autotest/trunk@938 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
f3b7893d4080edbc18c5f55b6905ded0d8745c98 07-Nov-2007 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Fix up the reboot logging so that the starts of hardresets are logged
properly, failed soft reboots are logged properly, and a little extra
detail is attached to failure messages to make it easier to determine
exactly what failed.

This also fixes up "reboot over ssh" commands to make sure that all
the associated file descriptors are closed.

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



git-svn-id: http://test.kernel.org/svn/autotest/trunk@930 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
667a51c0c8138c9264b8d9130b4716c067fa60f4 06-Nov-2007 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Remove blank lines from end of job.py

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



git-svn-id: http://test.kernel.org/svn/autotest/trunk@927 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
30270306182f4feb599278ce8a7412fa8526eb68 05-Nov-2007 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Improved the reboot logging to be consistent between client and server
side reboots. Also, removed the "job starting" log that was produced
every time a job moved into a new phase.

Also, timestamp logging was added on the client and server side. Any
logging done in job.record will have timestamp (time since epoch in
UTC) and localtime (human-readable local time) values added to it.

From: John Admanski <jadmanski@google.com>
Signed-off-by: Martin Bligh <mbligh@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@914 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
83ac9945652a0e140de4d643b99624ffa0a40118 05-Nov-2007 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> - move all sysinfo logging to client/bin/sysinfo.py
- grab SVS output before each job step and after each test

sysinfo.py handles info logged before each job step and info logged
after each test finishes.

there is now a reboot## directory under sysinfo for each boot after
the first one. the first boot's sysinfo goes to the same place.

added a sysinfo directory under test directories.

job.py and test.py use sysinfo.py as a module now, but it is still
executable for testing or whatever.

From: Adrian Bauer <adrianbg@google.com>
Signed-off-by: Martin Bligh <mbligh@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@905 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
669caa195852382f1cb4765e456d0b7c00f1e20e 05-Nov-2007 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Fix logging directory for rpm kernel install so we can see kernel
failures.

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



git-svn-id: http://test.kernel.org/svn/autotest/trunk@894 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
7942d39e39a12340de2b2dd1db33d0459af0c17f 02-Nov-2007 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Move the five second sleep that we perform on the client before
rebooting out of the python code and into the system("reboot") call.
This gives the client a chance to exit cleanly before the reboot
command tells the client process to die.

From: John Admanski <jadmanski@google.com>
Signed-off-by: Martin J. Bligh <mbligh@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@871 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
27113605becea04a2d32c4f4bb919fd7220f66bd 31-Oct-2007 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Ran across this trivial typo: jobtab != jobtag

From: Ryan Harper <ryanh@us.ibm.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@865 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
9c5ac32b5f8ca90f46510540cd6c603c9c770669 31-Oct-2007 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Fix up error handling of aborts. Make sure we print tracebacks for
unknown exceptions.

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



git-svn-id: http://test.kernel.org/svn/autotest/trunk@864 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
da0311eda85e09a031c2aafa6f892e8e8312d797 25-Oct-2007 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Checking if the right kernel has been installed after we reboot.

From: jiqingtang@google.com



git-svn-id: http://test.kernel.org/svn/autotest/trunk@847 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
53c4150efdca30f551a58a5e231688a8d75c306d 23-Oct-2007 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> There's way too many levels of indirection inbetween job.run_test
and actually excuting the test - makes the code very hard to read.

job.run_test
job.__runtest
test.runtest
test.__runtest
test.run
test.__exec
test.execute

Seven levels seems a bit extreme ;-) Now we're refactored some
bits, we should be able to collapse this down some.

job.run_test
job.__runtest
test.runtest
test._exec
test.execute

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



git-svn-id: http://test.kernel.org/svn/autotest/trunk@828 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
afb6390522c189e2a966185141106e40a08278ef 23-Oct-2007 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Ditch errors from dmesg

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



git-svn-id: http://test.kernel.org/svn/autotest/trunk@827 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
736adc930ee15e5bade91e2cf2c996ccf8bbd3eb 18-Oct-2007 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Add kernel rpm installation support to the client side.

From: Shawn Lewis <shawnlewis@google.com>
From: Jiqing Tang <jiqingtang@google.com>
Signed-off-by: Martin J. Bligh <mbligh@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@819 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
11985b7d5a48eec489f48f010d0ca3aba296e84f 04-Oct-2007 apw <apw@592f7852-d20e-0410-864c-8624ca9c26a4> boot: fix up boot_once support and make it optional v2

Currently we offer the option on a kernel.boot() to request boot_once
semantics. However in fact if you ask for once=False you get the default
boot which is boot_once of autotest, if you ask for once=True you get
two boot_once's one for the tag you wanted and a second for autotest.
In all cases you get boot_once semantics for the autotest tag, not the
semantics you asked for nor the tag you asked for.

This patch removes the redundant once= option for kernel.boot(), it ensures
we pass the required tag to job.reboot(), and finally allows the harness
to select boot_once or set_default mode via boot.set_default.

Signed-off-by: Andy Whitcroft <apw@shadowen.org>


git-svn-id: http://test.kernel.org/svn/autotest/trunk@745 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
a730c12bb406067fe11c138e1fa7b69618373572 02-Oct-2007 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Revert accidental changes from last commit. Oops

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



git-svn-id: http://test.kernel.org/svn/autotest/trunk@741 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
c82f24696c6acb3efe618ce63c7de73185af0e14 02-Oct-2007 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> This patch gets rid of the last bits db initialization within db.py.
Everything is now done in create_db.

This fixes a bug I ran into where a script with read-only access to
db.py tried to connect to a new database. Things would remain broken
(returning silly errors) until a script with read-write access ran
(and finished initialization). IMHO, this is a cleaner way to do
things anyway.

From: Jeremy Orlow <jorlow@google.com>
Signed-off-by: Martin J. Bligh <mbligh@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@740 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
1da244b693c3b3d1b2facf2b67e1059f4359639a 27-Sep-2007 apw <apw@592f7852-d20e-0410-864c-8624ca9c26a4> groups: allow the caller to specify the tag for the group

Allow the group tag to be overridden via a tag= argument.
The default remains the name of the group function.

Signed-off-by: Andy Whitcroft <apw@shadowen.org>


git-svn-id: http://test.kernel.org/svn/autotest/trunk@705 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
08403caa1b9fd69b2ccb79b0c9fcb6e7e0b1913c 27-Sep-2007 apw <apw@592f7852-d20e-0410-864c-8624ca9c26a4> groups: allow the run_group function to return a result

If the function called via run_group returns a result return that
to the caller. Note that the 'value' of a void function is None,
so it is valid to not return anything.

Signed-off-by: Andy Whitcroft <apw@shadowen.org>


git-svn-id: http://test.kernel.org/svn/autotest/trunk@704 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
ce73d89d533b822e738c995523fd96818472d369 25-Sep-2007 apw <apw@592f7852-d20e-0410-864c-8624ca9c26a4> boot: report successful boot to the job status

Report a successful boot to the job status reporting the directory
from which the kernel was installed. Also move the reporting into
the job object so that the status record is within scope; this is
also much more logical.

Signed-off-by: Andy Whitcroft <apw@shadowen.org>


git-svn-id: http://test.kernel.org/svn/autotest/trunk@688 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
4b2e4fb2908864de2b29ce1d7e4fcc56990c970b 25-Sep-2007 apw <apw@592f7852-d20e-0410-864c-8624ca9c26a4> harness: add a status with detail hook

We really could do with getting the status in its raw components to
better generate the required format for the server harness. Add a
test_status_detail() hook which passes the code, subdir, operation, and
message separatly. Use this hook within the ABAT harness to reform the
intermediate status messages into acceptable format.

Signed-off-by: Andy Whitcroft <apw@shadowen.org>


git-svn-id: http://test.kernel.org/svn/autotest/trunk@687 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
870988bc6f50c71c8238b6f8957ce460ea3a424a 25-Sep-2007 apw <apw@592f7852-d20e-0410-864c-8624ca9c26a4> job: cleanup path generation to use os.path.join

Convert remaning manual path concatenation in job object over to
os.path.join(...).

Signed-off-by: Andy Whitcroft <apw@shadowen.org>


git-svn-id: http://test.kernel.org/svn/autotest/trunk@684 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
f3d2862106a44635bc9d05778d12aeea8baba720 25-Sep-2007 apw <apw@592f7852-d20e-0410-864c-8624ca9c26a4> create download directory at job start v2

Ensure that the download directory exists in the tests directory when the
job starts. Remove any existing downloads.

Signed-off-by: Andy Whitcroft <apw@shadowen.org>


git-svn-id: http://test.kernel.org/svn/autotest/trunk@683 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
b0570adde56686064201ec5aec941582da6d435d 19-Sep-2007 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Fix up subdirectory level logging so it's consistent with the main job
level logging.




git-svn-id: http://test.kernel.org/svn/autotest/trunk@674 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
09f288a122c511f582b627c30ab3513f56ddb4c7 18-Sep-2007 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Standardize the format in the status file to:

<status code>\t<subdir>\t<operation>\t<status>

everywhere. This makes it a lot saner to parse.

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



git-svn-id: http://test.kernel.org/svn/autotest/trunk@672 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
237bed32e0110ccd0db10823df742534dd7dc50d 05-Sep-2007 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> kernel: add a boot validation step post boot

When requesting a boot via a kernel generate a kernel identifier
for that kernel and a command line validator (the time). These
are then checked in a post boot validation stepper "step" which
is inserted before the users next step.

Signed-off-by: Andy Whitcroft <apw@shadowen.org>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@657 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
1c250caf38290501e305f3683df90e76efb60ec5 30-Aug-2007 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Oops. Have to remove the trailing / during relative_path as well

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



git-svn-id: http://test.kernel.org/svn/autotest/trunk@645 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
0692e47566bac280871e6a0bf122fbf2aa3e094e 30-Aug-2007 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> add a function to return relative paths to the results dir

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



git-svn-id: http://test.kernel.org/svn/autotest/trunk@643 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
362ab3d050b8b52233c0bb7352f68043cc29dfad 30-Aug-2007 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> In standalone mode we want to copy the control file to AUTODIR so
that the standard continuation via init script strategy will work on
reboot. Promote the standalone mode to a full harness which contains
this copy support, allowing other harnesses to not support it.

Signed-off-by: Andy Whitcroft <apw@shadowen.org>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@641 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
88ab90fdf1694ac5616cc52b36fb8460edd534d6 29-Aug-2007 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> We need to be able to group sets of commands together.
Logically, if we want to format a filesystem, test it, then fsck
it afterwards, that's one "grouped" set of commands.

The new run_group function allows us to do this. There's a START
and END marker, and things within the group are indented in the
status file one tab stop.

START test_fs
GOOD mkfs -t ext2 -F /tmp/looped
GOOD mount -t ext2 -o loop /tmp/looped /usr/local/autotest/tmp
GOOD fsx.ext2 completed successfully
GOOD umount /tmp/looped
END test_fs GOOD
START test_fs
FAIL mkfs -t poo -F /tmp/looped
END test_fs FAIL
START test_fs
GOOD mkfs -t ext3 -F /tmp/looped
GOOD mount -t ext3 -o loop /tmp/looped /usr/local/autotest/tmp
GOOD fsx.ext3 completed successfully
GOOD umount /tmp/looped
END test_fs GOOD

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



git-svn-id: http://test.kernel.org/svn/autotest/trunk@637 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
c2359857b5192f1abbb850954737e126436ece7e 28-Aug-2007 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Loopback support for filesystems class

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



git-svn-id: http://test.kernel.org/svn/autotest/trunk@634 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
e21abaf324193f16133822390f09c16335c7088b 26-Jul-2007 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> add ignorestatus=1 to dmesg traps

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



git-svn-id: http://test.kernel.org/svn/autotest/trunk@593 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
b4eef241bfaad677e2455ec61c4b76490fb4329f 23-Jul-2007 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Use full abspath for controlfile

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



git-svn-id: http://test.kernel.org/svn/autotest/trunk@572 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
513d4260800e42a96cd1e19368a929098a99973b 18-Jul-2007 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Track the dmesg output when we start the job, and incremental
changes after each test run to look for errors we caused and
log them.

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



git-svn-id: http://test.kernel.org/svn/autotest/trunk@566 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
5a7335cf124fa231c2b8b82d9b07aebd71c964fa 12-Mar-2007 apw <apw@592f7852-d20e-0410-864c-8624ca9c26a4> job: run_test allow a specified tag of None

It is much simpler to handle optional tags in helpers if we can
always pass in a tag, but that if that tag is None we ignore it.

Signed-off-by: Andy Whitcroft <apw@shadowen.org>


git-svn-id: http://test.kernel.org/svn/autotest/trunk@502 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
510398f754a486b6495557fb72c1ecdd3d926dab 06-Mar-2007 apw <apw@592f7852-d20e-0410-864c-8624ca9c26a4> job: record a job error as an abort on the job

A job error indicates that the whole job is being stopped as a result
of that error. Record this in the status as an ABORT status so we
know that is what occured.

Signed-off-by: Andy Whitcroft <apw@shadowen.org>


git-svn-id: http://test.kernel.org/svn/autotest/trunk@496 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
892d37f0699444063348913675d5428f1886c699 01-Mar-2007 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Be careful not to do a sys.exit() inside a try/except block

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



git-svn-id: http://test.kernel.org/svn/autotest/trunk@492 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
fbfb77df9fe515b5dc9ba93de1f48eceb8e87570 15-Feb-2007 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Fix error handling if results dir does not exist

Make autotest_client check the python version.

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



git-svn-id: http://test.kernel.org/svn/autotest/trunk@481 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
61a6c1adf99442aa52e513d671c15344a335cdd6 25-Dec-2006 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> There was no ABORT function when the job went wrong.
Tried to fix this up.

Also removed the status arg to job_complete, as it was unused.

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



git-svn-id: http://test.kernel.org/svn/autotest/trunk@447 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
8baa2ea4c794349eb217203e2464e5406eaeb355 18-Dec-2006 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> This patch adds a new class derived from the kernel class to build and install
the Xen hypervisor, build a Xen guest kernel, and the user-space tools.

Signed-off-by: Ryan Harper <ryanh@us.ibm.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@429 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
72b88fcd890b50ca93396fc1b65dfa437e43e5d3 16-Dec-2006 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Clean up white-space in files touched by xen build/install.

Signed-off-by: Ryan Harper <ryanh@us.ibm.com>




git-svn-id: http://test.kernel.org/svn/autotest/trunk@428 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
b15f9634163ed5504212bf68ec0a875961e831bb 04-Dec-2006 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Fix filesystem class to log status.



git-svn-id: http://test.kernel.org/svn/autotest/trunk@406 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
90154afdc5c54633689c7759d9626c18aa6cab19 01-Dec-2006 apw <apw@592f7852-d20e-0410-864c-8624ca9c26a4> boottool: allow the specification of the executable through the config

We want to be able to specify a harness specific wrapper. Use the
job configuration to specify the initial executable.

Signed-off-by: Andy Whitcroft <apw@shadowen.org>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@402 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
357f50fbbcf6957fde8c8cb79407cb14d8407b10 01-Dec-2006 apw <apw@592f7852-d20e-0410-864c-8624ca9c26a4> harness: hold off run_start till everything is initialised

Currently harness initialisation and run_start are one and the
same. By moving this to the end of job initialisation we
ensure the harness gets a chance to modify the environment
when the job truly is ready to start.

Signed-off-by: Andy Whitcroft <apw@shadowen.org>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@401 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
d27e55f46743f4310d70db5504f321a987aac6c1 01-Dec-2006 apw <apw@592f7852-d20e-0410-864c-8624ca9c26a4> harness: ensure the configuration is initialised

The harness is very likely to want to modify the job configuration.
It needs a chance to update the configuration before anyone uses it.
We could add a new 'config_ready' style hook, but the configuration
is entirly passive at this time so we can simply initialise it
before the harness.

Signed-off-by: Andy Whitcroft <apw@shadowen.org>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@400 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
e68a713ffe1c1f66b7e28224b0d6985b808651fa 01-Dec-2006 apw <apw@592f7852-d20e-0410-864c-8624ca9c26a4> job: document the harness_type parameter

We now may optionally pass in a server harness name. Document this
in the object description.

Signed-off-by: Andy Whitcroft <apw@shadowen.org>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@399 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
d9223fce1053996b9cba2bb9b1b85e8611cc7969 26-Nov-2006 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> A few small cleanups to job.py

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



git-svn-id: http://test.kernel.org/svn/autotest/trunk@391 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
570e93e712f838aa8044760b8810add7ebaf8ba4 26-Nov-2006 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Add simple server harness support to autotest client

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



git-svn-id: http://test.kernel.org/svn/autotest/trunk@388 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
d016ecce0b5b990569e0ecca6f9f4f399c16e5c1 25-Nov-2006 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Modify runtest to make tag argument optional



git-svn-id: http://test.kernel.org/svn/autotest/trunk@385 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
1e8858e6f825fb9eba4a87b921911c6f398ca727 24-Nov-2006 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Fix up kernel build class

We need to actually store the results of the kernel build in a sensible place,
not just lob everything in a temporary directory. Break out the paramaters
of kernel.build() so we can specify separately where the different parts go.
Fix up all callers.

Also added a new test (kernelbuild) that utilizes the new functionality (and
is the simplest test yet ;-)).

Eliminate requirement to specify the tmpdir to kernel.build(), as most people
won't care, and it's just confusing. This is now an optional parameter.

When we do a kernel.build() from a control file, make sure we create a build
directory to store the results in in the results directory. Locate appropriate
build output in there. I'm not copying patches in there yet, will do that later

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



git-svn-id: http://test.kernel.org/svn/autotest/trunk@383 592f7852-d20e-0410-864c-8624ca9c26a4
/external/autotest/client/bin/job.py
9453ed5b27261ed817617c7da6aa52983a71c6d3 23-Nov-2006 mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> Move bin directory under client/



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