[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>
3 files changed