Ejemplo n.º 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()
Ejemplo n.º 2
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()
Ejemplo n.º 3
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()
Ejemplo n.º 4
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()
Ejemplo n.º 5
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()
Ejemplo n.º 6
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()