blob: 17b3f3e9aab5e8bfd7418be2f73ae6f141590bd9 [file] [log] [blame]
AUTHOR = "Kelly Lucas <>"
NAME = "Iperf Multi-machine"
TEST_CLASS = "Network"
TEST_TYPE = "Server"
DOC = """
Iperf is a 2 machine test (server/client) that measures maximum TCP and UDP
bandwidth performance.
Arguments to run_test:
server_ip - the ip of the server (automatically filled in)
client_ip - the ip of the client (automatically filled in)
role - specifies either client or server (automatically filled in)
udp - [False/True] specifies if a UDP test should be run. Defaults to
TCP if unspecified.
bidirectional - [False/True] specifies if a bidirectional test should be run.
Defaults to False
test_time - Specifies test duration of each iteration in seconds.
stream_list - A list containing the number of streams to run the test for. If
the list is [1,10,100] then the test will run 3 times. If
bidirectional is set then there will be the specified number of
bidirectional streams.
from autotest_lib.server import utils
def run(pair):
job.run_test('iperf', pair=pair, udp=True, bidirectional=True, time=10,
# grab the pairs (and failures)
(pairs, failures) = utils.form_ntuples_from_machines(machines, 2)
# log the failures
for failure in failures:
job.record("FAIL", failure[0], "iperf", failure[1])
# now run through each pair and run
job.parallel_simple(run, pairs, log=False)