def test_network_util_enable_ip_local_loopback(self): msg = "echo '0' > /proc/sys/net/ipv4/route/no_local_loopback" utils.system.expect_call(msg, ignore_status=False) msg = 'echo 1 > /proc/sys/net/ipv4/route/flush' utils.system.expect_call(msg, ignore_status=False) net_utils.network_utils().enable_ip_local_loopback() self.god.check_playback()
def initialize(self): self.install_required_pkgs() self.SERVER_PORT = '5001' self.results = [] self.actual_times = [] self.netif = '' self.network_utils = net_utils.network_utils()
def initialize(self): self.server_prog = "%s&" % os.path.join(self.srcdir, "src/netserver") self.client_prog = "%s" % os.path.join(self.srcdir, "src/netperf") self.valid_tests = ["TCP_STREAM", "TCP_MAERTS", "TCP_RR", "TCP_CRR", "TCP_SENDFILE", "UDP_STREAM", "UDP_RR"] self.results = [] self.actual_times = [] self.netif = "" self.network = net_utils.network() self.network_utils = net_utils.network_utils()
def initialize(self): self.server_prog = '%s&' % os.path.join(self.srcdir, 'src/netserver') self.client_prog = '%s' % os.path.join(self.srcdir, 'src/netperf') self.valid_tests = ['TCP_STREAM', 'TCP_MAERTS', 'TCP_RR', 'TCP_CRR', 'TCP_SENDFILE', 'UDP_STREAM', 'UDP_RR'] self.results = [] self.actual_times = [] self.netif = '' self.network = net_utils.network() self.network_utils = net_utils.network_utils()
def initialize(self): self.SERVER_PORT = '5001' # The %%s is to add extra args later # We cannot use daemon mode because it is unreliable with # UDP transfers. self.server_path = "%s %%s&" % os.path.join(self.srcdir, 'src/iperf -s') # Add the servername and arguments later self.client_path = "%s %%s %%s" % os.path.join(self.srcdir, 'src/iperf -y c -c') self.results = [] self.actual_times = [] self.netif = '' self.network_utils = net_utils.network_utils()
def test_network_util_stop(self): utils.system.expect_call('service network stop', ignore_status=False) net_utils.network_utils().stop() self.god.check_playback()
def test_network_util_reset(self): utils.system.expect_call('service network restart', ignore_status=False) net_utils.network_utils().reset() self.god.check_playback()