OLD | NEW |
1 from autotest_lib.server import autotest, hosts, subcommand, test | 1 from autotest_lib.server import autotest, hosts, subcommand, test |
2 from autotest_lib.server import utils | 2 from autotest_lib.server import utils |
3 | 3 |
4 class netpipe(test.test): | 4 class netpipe(test.test): |
5 version = 2 | 5 version = 2 |
6 | 6 |
7 def run_once(self, pair, buffer, upper_bound, variance): | 7 def run_once(self, pair, buffer, upper_bound, variance): |
8 print "running on %s and %s\n" % (pair[0], pair[1]) | 8 print "running on %s and %s\n" % (pair[0], pair[1]) |
9 | 9 |
10 # Designate a platform label for the server side of tests. | 10 # Designate a platform label for the server side of tests. |
(...skipping 20 matching lines...) Expand all Loading... |
31 "client_ip='%s', role='%s', bidirectional=True, ", | 31 "client_ip='%s', role='%s', bidirectional=True, ", |
32 "buffer_size=%d, upper_bound=%d," | 32 "buffer_size=%d, upper_bound=%d," |
33 "perturbation_size=%d)"]) | 33 "perturbation_size=%d)"]) |
34 | 34 |
35 server_control_file = template % (server.ip, client.ip, 'server', | 35 server_control_file = template % (server.ip, client.ip, 'server', |
36 buffer, upper_bound, variance) | 36 buffer, upper_bound, variance) |
37 client_control_file = template % (server.ip, client.ip, 'client', | 37 client_control_file = template % (server.ip, client.ip, 'client', |
38 buffer, upper_bound, variance) | 38 buffer, upper_bound, variance) |
39 | 39 |
40 server_command = subcommand.subcommand(server_at.run, | 40 server_command = subcommand.subcommand(server_at.run, |
41 [server_control_file, server.hostname]) | 41 [server_control_file, server.hostname], |
| 42 subdir='server') |
42 client_command = subcommand.subcommand(client_at.run, | 43 client_command = subcommand.subcommand(client_at.run, |
43 [client_control_file, client.hostname]) | 44 [client_control_file, client.hostname], |
| 45 subdir='client') |
44 | 46 |
45 subcommand.parallel([server_command, client_command]) | 47 subcommand.parallel([server_command, client_command]) |
46 | 48 |
47 for m in [client, server]: | 49 for m in [client, server]: |
48 status = m.run('iptables -L') | 50 status = m.run('iptables -L') |
49 if not status.exit_status: | 51 if not status.exit_status: |
50 m.enable_ipfilters() | 52 m.enable_ipfilters() |
OLD | NEW |