AU P2P: Add new EndToEnd test.

This patch includes a new server side test to test the end-to-end
funtionality of the new peer-to-peer (p2p) file sharing mechanism.

The test runs over a set of N machines generating a random file
in one of them (called the "master") and sharing it with the rest
of the machines. The success condition of this test occurs when
all the N machines have the same generated file in at most a
certain timeout (currently 10 minutes).

To achieve certain inter-process communication a simplified
Barrier class is included as part of the cros library. This
Barrier class is based on the multiprocessing.Queue class and
assumes a scenario where a given process is a master, like the
one presented here, to simplify the implementation.

BUG=chromium:244502
TEST=./autoserv site_tests/p2p_EndToEndTest/control --ssh-user=root --ssh-pass=test0000 -m IP1,IP2,...,IPn

Change-Id: I69cba1227e6b123b9f89d389f6972c29dac59342
Reviewed-on: https://gerrit.chromium.org/gerrit/62972
Reviewed-by: Chris Sosa <sosa@chromium.org>
Commit-Queue: Alex Deymo <deymo@chromium.org>
Tested-by: Alex Deymo <deymo@chromium.org>
3 files changed