示例#1
0
    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()
示例#2
0
    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()
示例#3
0
    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()
示例#4
0
文件: netperf2.py 项目: nacc/autotest
 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()
示例#5
0
 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()
示例#6
0
 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()
示例#7
0
    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()
示例#8
0
    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()
示例#9
0
    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()
示例#10
0
 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()
示例#11
0
    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()
示例#12
0
 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()