blob: 83af70d28d07e50f84553b195dd64e57a4ab5241 [file] [log] [blame]
mblighcf8e0b72008-09-12 02:14:29 +00001AUTHOR = "bboe@google.com (Bryce Boe)"
2TIME = "SHORT"
3NAME = "Netpipe Multi-machine"
4TEST_CATEGORY = "Stress"
5TEST_CLASS = 'Hardware'
6TEST_TYPE = "Server"
7SYNC_COUNT = 2
8DOC = """
9netpipe_test is a test which produces bandwidth and latency values for
10incrementing buffer sizes.
11
12Arguments to run_test:
13server_ip - the ip of the server (automatically filled in)
14client_ip - the ip of the client (automatically filled in)
15role - specifies either client or server (automatically filled in)
16bidirectional - indicates whether the test should run simultaneously in both
17 directions
18buffer_size - Sets the send and receive TCP buffer sizes (from man NPtcp)
19upper_bound - Specify the upper boundary to the size of message being tested.
20 By default, NetPIPE will stop when the time to transmit a block
21 exceeds one second. (from man NPtcp)
22perturbation_size - NetPIPE chooses the message sizes at regular intervals,
23 increasing them exponentially from the lower boundary to the
24 upper boundary. At each point, it also tests perturbations of 3
25 bytes above and 3 bytes below (default) each test point to find
26 idiosyncrasies in the system. This perturbation value can be
27 changed using using this option or turned off by setting
28 perturbation_size to 0. (from man NPtcp)
29"""
30
31from autotest_lib.server import utils
32
33
34def run(pair):
35 print "running on %s and %s\n" % (pair[0], pair[1])
36 server = hosts.create_host(pair[0])
37 client = hosts.create_host(pair[1])
38
39 server_at = autotest.Autotest(server)
40 client_at = autotest.Autotest(client)
41
42 template = ''.join(["job.run_test('netpipe', server_ip='%s', client_ip=",
43 "'%s', role='%s', bidirectional=True,",
44 "buffer_size=1048576, upper_bound=1048576,"
45 "perturbation_size=17)"])
46
47 server_control_file = template % (server.ip, client.ip, 'server')
48 client_control_file = template % (server.ip, client.ip, 'client')
49
50 server_command = subcommand(server_at.run,
51 [server_control_file, server.hostname])
52 client_command = subcommand(client_at.run,
53 [client_control_file, client.hostname])
54
55 parallel([server_command, client_command])
56
57
58# grab the pairs (and failures)
59(pairs, failures) = utils.form_ntuples_from_machines(machines, 2)
60
61# log the failures
62for failure in failures:
63 job.record("FAIL", failure[0], "netpipe", failure[1])
64
65# now run through each pair and run
mbligh5d69ff02008-09-12 17:45:46 +000066job.parallel_simple(run, pairs, log=False)