Пример #1
0
def do_pings(warmup=False):
    if warmup:
        ping_opts = {"count": 1}
    else:
        ping_opts = {"count": 10, "interval": 0.2}

    if ipv in ['ipv4', 'both']:
        ping((guest1, g1_nic, 0, {
            "scope": 0
        }), (host2, h2_nic, 0, {
            "scope": 0
        }),
             options=ping_opts,
             expect="pass")
        if not skip_tc_verify:
            verify_tc_rules('ipv4')

    if ipv in ['ipv6', 'both']:
        ping6((guest1, g1_nic, 1, {
            "scope": 0
        }), (host2, h2_nic, 1, {
            "scope": 0
        }),
              options=ping_opts,
              expect="pass")
        if not skip_tc_verify:
            verify_tc_rules('ipv6')
Пример #2
0
def do_pings():
    ping_opts = {"count": 100, "interval": 0.2}
    if ipv in ['ipv4', 'both']:
        ping((guest1, g1_nic, 0, {"scope": 0}),
             (host2, h2_nic, 0, {"scope": 0}),
             options=ping_opts, expect="pass")
        verify_tc_rules('ip')

    if ipv in ['ipv6', 'both']:
        ping6((guest1, g1_nic, 1, {"scope": 0}),
              (host2, h2_nic, 1, {"scope": 0}),
              options=ping_opts, expect="pass")
        verify_tc_rules('ipv6')
Пример #3
0
def do_test():
    ping_opts = {"count": 200}
    if ipv in ['ipv4', 'both']:
        ping_proc = ping((guest1, g1_nic, 0, {
            "scope": 0
        }), (host2, h2_nic, 0, {
            "scope": 0
        }),
                         options=ping_opts,
                         expect="pass",
                         bg=True)
        ctl.wait(2)
        turn_off_sriov()
        ctl.wait(2)
        ping_proc.intr()
        verify_tc_rules('ipv4')

    if ipv in ['ipv6', 'both']:
        ping_proc = ping6((guest1, g1_nic, 1, {
            "scope": 0
        }), (host2, h2_nic, 1, {
            "scope": 0
        }),
                          options=ping_opts,
                          expect="pass",
                          bg=True)
        ctl.wait(2)
        turn_off_sriov()
        ctl.wait(2)
        ping_proc.intr()
        verify_tc_rules('ipv6')
Пример #4
0
def do_pings():
    ping_opts = {"count": 100, "interval": 0.2}
    if ipv in ['ipv4', 'both']:
        ping((guest1, g1_nic, 0, {
            "scope": 0
        }), (host2, h2_nic, 0, {
            "scope": 0
        }),
             options=ping_opts,
             expect="pass")
        verify_tc_rules('ip')

    if ipv in ['ipv6', 'both']:
        ping6((guest1, g1_nic, 1, {
            "scope": 0
        }), (host2, h2_nic, 1, {
            "scope": 0
        }),
              options=ping_opts,
              expect="pass")
        verify_tc_rules('ipv6')
Пример #5
0
                                        "num_parallel" : nperf_num_parallel,
                                        "cpu_util" : nperf_cpu_util,
                                        "runs": nperf_max_runs,
                                        "debug": nperf_debug,
                                        "max_deviation": nperf_max_dev,
                                        "netperf_opts": nperf_opts},
                           baseline = baseline,
                           timeout = (netperf_duration + nperf_reserve)*nperf_max_runs)

    netperf_result_template(result_udp, udp_res_data)
    result_udp.set_comment(pr_comment)
    perf_api.save_result(result_udp)

if ipv in [ 'ipv6', 'both' ]:
    ping6((m1, test_if1, 1, {"scope": 0}),
          (m2, test_if2, 1, {"scope": 0}),
          options=ping_opts)

    # prepare PerfRepo result for tcp ipv6
    result_tcp = perf_api.new_result("tcp_ipv6_id",
                                     "tcp_ipv6_result",
                                     hash_ignore=[
                                         r'kernel_release',
                                         r'redhat_release',
                                         r'test_if\.hwaddr'])
    result_tcp.add_tag(product_name)
    if nperf_num_parallel > 1:
        result_tcp.add_tag("multithreaded")
        result_tcp.set_parameter('num_parallel', nperf_num_parallel)

    baseline = perf_api.get_baseline_of_result(result_tcp)
Пример #6
0
    }),
         options=ping_opts)

    ping((guest3, g3_nic, 0, {
        "scope": 0
    }), (guest4, g4_nic, 0, {
        "scope": 0
    }),
         options=ping_opts,
         expect="fail")

if ipv in ['ipv6', 'both']:
    ping6((guest1, g1_nic, 1, {
        "scope": 0
    }), (guest2, g2_nic, 1, {
        "scope": 0
    }),
          options=ping_opts,
          expect="fail")
    ping6((guest1, g1_nic, 1, {
        "scope": 0
    }), (guest3, g3_nic, 1, {
        "scope": 0
    }),
          options=ping_opts)
    ping6((guest1, g1_nic, 1, {
        "scope": 0
    }), (guest4, g4_nic, 1, {
        "scope": 0
    }),
          options=ping_opts,
Пример #7
0
nperf_opts = ""
if nperf_cpupin and nperf_num_parallel == 1:
    nperf_opts = " -T%s,%s" % (nperf_cpupin, nperf_cpupin)

ctl.wait(15)

#pings
ping_opts = {"count": 100, "interval": 0.1}
if ipv in [ 'ipv4', 'both' ]:
    ping((h1, h1_nic, 0, {"scope": 0}),
         (h2, h2_nic, 0, {"scope": 0}),
         options=ping_opts)

if ipv in [ 'ipv6', 'both' ]:
    ping6((h1, h1_nic, 1, {"scope": 0}),
          (h2, h2_nic, 1, {"scope": 0}),
          options=ping_opts)

client_opts = {"duration" : netperf_duration,
               "testname" : "TCP_STREAM",
               "confidence" : nperf_confidence,
               "num_parallel" : nperf_num_parallel,
               "cpu_util" : nperf_cpu_util,
               "runs": nperf_max_runs,
               "netperf_opts": nperf_opts,
               "debug": nperf_debug,
               "max_deviation": nperf_max_dev}

if nperf_msg_size is not None:
    client_opts["msg_size"] = nperf_msg_size
Пример #8
0
ctl.wait(15)

#pings
ping_opts = {"count": 100, "interval": 0.1}
if ipv in ['ipv4', 'both']:
    ping((h1, h1_nic, 0, {
        "scope": 0
    }), (h2, h2_nic, 0, {
        "scope": 0
    }),
         options=ping_opts)

if ipv in ['ipv6', 'both']:
    ping6((h1, h1_nic, 1, {
        "scope": 0
    }), (h2, h2_nic, 1, {
        "scope": 0
    }),
          options=ping_opts)

#netperfs
if ipv in ['ipv4', 'both']:
    ctl.wait(2)

    # prepare PerfRepo result for tcp
    result_tcp = perf_api.new_result("tcp_ipv4_id",
                                     "tcp_ipv4_result",
                                     hash_ignore=[
                                         r'kernel_release', r'redhat_release',
                                         r'interface_ovs\d+\.hwaddr'
                                     ])
    result_tcp.add_tag(product_name)
Пример #9
0
})]

ipv4_pings = []
for x in ipv4_endpoints:
    for y in ipv4_endpoints:
        if not x == y:
            ipv4_pings.append(ping(x, y, options=ping_opts, bg=True))

for i in ipv4_pings:
    i.wait()

ipv6_pings = []
for x in ipv6_endpoints:
    for y in ipv6_endpoints:
        if not x == y:
            ipv6_pings.append(ping6(x, y, options=ping_opts, bg=True))

for i in ipv6_pings:
    i.wait()

client_opts = {
    "duration": netperf_duration,
    "testname": "TCP_STREAM",
    "confidence": nperf_confidence,
    "num_parallel": nperf_num_parallel,
    "cpu_util": nperf_cpu_util,
    "runs": nperf_max_runs,
    "netperf_opts": nperf_opts,
    "debug": nperf_debug,
    "max_deviation": nperf_max_dev
}
Пример #10
0
                    "scope": 0
                }), (m2, m2_tif, 0, {
                    "scope": 0
                }),
                client_opts=client_opts,
                baseline=baseline,
                timeout=(netperf_duration + nperf_reserve) * nperf_max_runs)

            netperf_result_template(result_udp, udp_res_data)
            result_udp.set_comment(pr_comment)
            perf_api.save_result(result_udp, official_result)

    if ipv in ['ipv6', 'both']:
        ping6((m1, m1_tif, 1, {
            "scope": 0
        }), (m2, m2_tif, 1, {
            "scope": 0
        }),
              options=ping_opts)

        ctl.wait(2)

        if nperf_protocols.find("tcp") > -1:
            # prepare PerfRepo result for tcp ipv6
            result_tcp = perf_api.new_result(
                "tcp_ipv6_id",
                "tcp_ipv6_result",
                hash_ignore=[r'kernel_release', r'redhat_release'])
            result_tcp.add_tag(product_name)
            if nperf_num_parallel > 1:
                result_tcp.add_tag("multithreaded")
                result_tcp.set_parameter('num_parallel', nperf_num_parallel)
Пример #11
0
            "runs": nperf_max_runs,
            "debug": nperf_debug,
            "max_deviation": nperf_max_dev,
            "netperf_opts": nperf_opts
        },
        baseline=baseline,
        timeout=(netperf_duration + nperf_reserve) * nperf_max_runs)

    netperf_result_template(result_udp, udp_res_data)
    result_udp.set_comment(pr_comment)
    perf_api.save_result(result_udp)

if ipv in ['ipv6', 'both']:
    ping6((m1, test_if1, 1, {
        "scope": 0
    }), (m2, test_if2, 1, {
        "scope": 0
    }),
          options=ping_opts)

    # prepare PerfRepo result for tcp ipv6
    result_tcp = perf_api.new_result(
        "tcp_ipv6_id",
        "tcp_ipv6_result",
        hash_ignore=[r'kernel_release', r'redhat_release', r'test_if\.hwaddr'])
    result_tcp.add_tag(product_name)
    if nperf_num_parallel > 1:
        result_tcp.add_tag("multithreaded")
        result_tcp.set_parameter('num_parallel', nperf_num_parallel)

    baseline = perf_api.get_baseline_of_result(result_tcp)
    baseline = perfrepo_baseline_to_dict(baseline)
Пример #12
0
                  (g1, test_if3, 1, {"scope": 0})]

ipv4_pings = []
for x in ipv4_endpoints:
    for y in ipv4_endpoints:
        if not x == y:
            ipv4_pings.append(ping(x, y, options=ping_opts, bg=True))

for i in ipv4_pings:
    i.wait()

ipv6_pings = []
for x in ipv6_endpoints:
    for y in ipv6_endpoints:
        if not x == y:
            ipv6_pings.append(ping6(x, y, options=ping_opts, bg=True))

for i in ipv6_pings:
    i.wait()

client_opts = {"duration" : netperf_duration,
               "testname" : "TCP_STREAM",
               "confidence" : nperf_confidence,
               "num_parallel" : nperf_num_parallel,
               "cpu_util" : nperf_cpu_util,
               "runs": nperf_max_runs,
               "netperf_opts": nperf_opts,
               "debug": nperf_debug,
               "max_deviation": nperf_max_dev}

if nperf_msg_size is not None:
Пример #13
0
         options=ping_opts, expect="fail")

    ping((guest2, g2_nic, 0, {"scope": 0}),
         (guest3, g3_nic, 0, {"scope": 0}),
         options=ping_opts, expect="fail")
    ping((guest2, g2_nic, 0, {"scope": 0}),
         (guest4, g4_nic, 0, {"scope": 0}),
         options=ping_opts)

    ping((guest3, g3_nic, 0, {"scope": 0}),
         (guest4, g4_nic, 0, {"scope": 0}),
         options=ping_opts, expect="fail")

if ipv in ['ipv6', 'both']:
    ping6((guest1, g1_nic, 1, {"scope": 0}),
          (guest2, g2_nic, 1, {"scope": 0}),
          options=ping_opts, expect="fail")
    ping6((guest1, g1_nic, 1, {"scope": 0}),
          (guest3, g3_nic, 1, {"scope": 0}),
          options=ping_opts)
    ping6((guest1, g1_nic, 1, {"scope": 0}),
          (guest4, g4_nic, 1, {"scope": 0}),
          options=ping_opts, expect="fail")

    ping6((guest2, g2_nic, 1, {"scope": 0}),
          (guest3, g3_nic, 1, {"scope": 0}),
          options=ping_opts, expect="fail")
    ping6((guest2, g2_nic, 1, {"scope": 0}),
          (guest4, g4_nic, 1, {"scope": 0}),
          options=ping_opts)
Пример #14
0
                                            "cpu_util" : nperf_cpu_util,
                                            "runs": nperf_max_runs,
                                            "debug": nperf_debug,
                                            "max_deviation": nperf_max_dev,
                                            "netperf_opts": nperf_opts},
                               baseline = baseline,
                               timeout = (netperf_duration + nperf_reserve)*nperf_max_runs)

        netperf_result_template(result_udp, udp_res_data)
        result_udp.set_comment(pr_comment)
        perf_api.save_result(result_udp)


    if ipv in [ 'ipv6', 'both' ]:
        ping6((m1, m1_tif, 1, {"scope": 0}),
              (m2, m2_tif, 1, {"scope": 0}),
              options=ping_opts)

        ctl.wait(2)

        # prepare PerfRepo result for tcp ipv6
        result_tcp = perf_api.new_result("tcp_ipv6_id",
                                         "tcp_ipv6_result",
                                         hash_ignore=[
                                             r'kernel_release',
                                             r'redhat_release'])
        result_tcp.add_tag(product_name)
        if nperf_num_parallel > 1:
            result_tcp.add_tag("multithreaded")
            result_tcp.set_parameter('num_parallel', nperf_num_parallel)