[autotest] add a no_pipes argument to BgJob constructor
This CL introduces an alternative type of BgJob, to match the master-ssh
connection use case. The new type of BgJob is created by specifying
no_pipes=True when calling BgJob's constructor. BgJobs constructed in
this way do not expect to ever be joined with a join_bg_jobs call, and
do not interact via their stdout/stderr with other BgJobs.
This CL also causes the master ssh connection BgJob to be created with
this flag.
This CL only addresses flaw #2 in the "Problems with current semantics"
section of the referenced bug.
BUG=chromium:279312
TEST=Unit tests pass. Running an autoserv tests with ssh verbosity
turned up to 3 no longer causes a deadlock.
Change-Id: I1a6861501eb4fc8439add213c79eaa3777978df0
Reviewed-on: https://chromium-review.googlesource.com/167173
Reviewed-by: Aviv Keshet <akeshet@chromium.org>
Tested-by: Aviv Keshet <akeshet@chromium.org>
Commit-Queue: Aviv Keshet <akeshet@chromium.org>
diff --git a/client/common_lib/error.py b/client/common_lib/error.py
index e86a131..03e806f 100644
--- a/client/common_lib/error.py
+++ b/client/common_lib/error.py
@@ -627,6 +627,11 @@
pass
+class InvalidBgJobCall(Exception):
+ """Raised when an invalid call is made to a BgJob object."""
+ pass
+
+
# This MUST remain at the end of the file.
# Limit 'from error import *' to only import the exception instances.
for _name, _thing in locals().items():