| 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 iperf(test.test): | 4 class iperf(test.test): |
| 5 version = 1 | 5 version = 1 |
| 6 | 6 |
| 7 def run_once(self, pair, udp, bidirectional, time, stream_list): | 7 def run_once(self, pair, udp, bidirectional, time, stream_list): |
| 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 lable for the server side tests. | 10 # Designate a lable for the server side tests. |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 "test_time=%d, stream_list=%s, tag='%s')"]) | 33 "test_time=%d, stream_list=%s, tag='%s')"]) |
| 34 | 34 |
| 35 server_control_file = template % (server.ip, client.ip, 'server', udp, | 35 server_control_file = template % (server.ip, client.ip, 'server', udp, |
| 36 bidirectional, time, stream_list, | 36 bidirectional, time, stream_list, |
| 37 tagname) | 37 tagname) |
| 38 client_control_file = template % (server.ip, client.ip, 'client', udp, | 38 client_control_file = template % (server.ip, client.ip, 'client', udp, |
| 39 bidirectional, time, stream_list, | 39 bidirectional, time, stream_list, |
| 40 tagname) | 40 tagname) |
| 41 | 41 |
| 42 server_command = subcommand.subcommand(server_at.run, | 42 server_command = subcommand.subcommand(server_at.run, |
| 43 [server_control_file, server.hostname]) | 43 [server_control_file, server.hostname], |
| 44 subdir='server') |
| 44 client_command = subcommand.subcommand(client_at.run, | 45 client_command = subcommand.subcommand(client_at.run, |
| 45 [client_control_file, client.hostname]) | 46 [client_control_file, client.hostname], |
| 47 subdir='client') |
| 46 | 48 |
| 47 subcommand.parallel([server_command, client_command]) | 49 subcommand.parallel([server_command, client_command]) |
| 48 | 50 |
| 49 for m in [client, server]: | 51 for m in [client, server]: |
| 50 status = m.run('iptables -L') | 52 status = m.run('iptables -L') |
| 51 if not status.exit_status: | 53 if not status.exit_status: |
| 52 m.enable_ipfilters() | 54 m.enable_ipfilters() |
| OLD | NEW |