mbligh | cf8e0b7 | 2008-09-12 02:14:29 +0000 | [diff] [blame] | 1 | AUTHOR = "bboe@google.com (Bryce Boe)" |
| 2 | TIME = "SHORT" |
| 3 | NAME = "Netpipe Multi-machine" |
| 4 | TEST_CATEGORY = "Stress" |
| 5 | TEST_CLASS = 'Hardware' |
| 6 | TEST_TYPE = "Server" |
| 7 | SYNC_COUNT = 2 |
| 8 | DOC = """ |
| 9 | netpipe_test is a test which produces bandwidth and latency values for |
| 10 | incrementing buffer sizes. |
| 11 | |
| 12 | Arguments to run_test: |
| 13 | server_ip - the ip of the server (automatically filled in) |
| 14 | client_ip - the ip of the client (automatically filled in) |
| 15 | role - specifies either client or server (automatically filled in) |
| 16 | bidirectional - indicates whether the test should run simultaneously in both |
| 17 | directions |
| 18 | buffer_size - Sets the send and receive TCP buffer sizes (from man NPtcp) |
| 19 | upper_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) |
| 22 | perturbation_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 | |
| 31 | from autotest_lib.server import utils |
| 32 | |
| 33 | |
| 34 | def 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 |
| 62 | for failure in failures: |
| 63 | job.record("FAIL", failure[0], "netpipe", failure[1]) |
| 64 | |
| 65 | # now run through each pair and run |
mbligh | 5d69ff0 | 2008-09-12 17:45:46 +0000 | [diff] [blame] | 66 | job.parallel_simple(run, pairs, log=False) |