def test_bp_sim_client_cfg(self):
        cmd = './bp-sim-64 --pcap -f cap2/dns.yaml --client_cfg automation/regression/cfg/client_cfg_vlan_mac.yaml -o generated/bp_sim_dns_vlans_gen.pcap'
        ret, out = run_command(os.path.join(CTRexScenario.scripts_path, cmd), cwd = CTRexScenario.scripts_path)
        if ret:
            print('\nOutput:\n%s' % out)
            raise Exception('Non zero return status of Valgrind gtests (%s)' % ret)

        compare_caps(output = os.path.join(CTRexScenario.scripts_path, 'generated/bp_sim_dns_vlans_gen.pcap'),
                     golden = 'functional_tests/golden/bp_sim_dns_vlans.pcap')
示例#2
0
    def run_astf_gold(self,valgrind):
        files = [
                 "astf/param_ipv6.py",
                 "astf/tcp_param_change.py",
                 "astf/param_tcp_rxbufsize.py",
                 "astf/param_tcp_no_timestamp.py",
                 "astf/param_tcp_keepalive.py",
                 "astf/param_tcp_delay_ack.py",
                 "astf/param_tcp_rxbufsize_8k.py",
                 "astf/param_mss_initwnd.py",
                 "astf/http_manual_commands_delay.py",
                 "astf/http_manual_commands_rst.py",
                 "astf/http_manual_commands_fin_ack.py",
                 "astf/http_manual_commands_delay_client.py",
                 "astf/http_manual_commands_delay_client2.py",
                 "astf/http_manual_commands_delay_rand.py",
                 "astf/http_manual_commands_loop.py",
                 "astf/http_manual_commands_pipeline.py",
                 "astf/http_manual_commands_pipeline2.py",
                 "astf/http_manual_commands_rst.py",
                 "astf/http_simple_limit.py",
                 "astf/param_tcp_rxbufsize_pt.py",
                 "astf/param_sch_rampup.py",
                 "astf/http_manual_commands_pipeline4.py",
                 "astf/udp_pcap.py",
                 "astf/udp_sip.py",
                 "astf/udp1.py",
                 "astf/udp2.py",
                 "astf/long_keepalive.py",
                 "astf/param_no_delay_counter.py",
        ]

        _files = [
                #"astf/param_sch_rampup.py",
                #"astf/param_tcp_rxbufsize_pt.py",
                #"astf/http_manual_commands_delay.py"
                #"astf/http_simple_limit.py",
                #"astf/http_manual_commands_rst.py"
                #"astf/http_manual_commands_pipeline2.py"
                #"astf/http_manual_commands_pipeline4.py"
                #"astf/param_sch_rampup.py",
                #"astf/udp_pcap.py",
                #"astf/udp2.py",
        ]
        print('')
        for file in files:
            file="../../"+file;
            base_name = file.split("/")[-1].split(".")[0]
            output = "../../generated/sim_astf-"+base_name + ".pcap"
            golden = "functional_tests/golden/sim_astf-" + base_name + ".pcap"
            print ("checking {0}".format(file))
            options=None;
            if valgrind:
                options=["--valgrind"]
            self.run_sim(file, output,options)
            compare_caps(golden = golden, output = output, max_diff_sec = 1)
示例#3
0
    def run_astf_gold(self,valgrind):
        files = [
                  "astf/param_ipv6.py",
                 "astf/tcp_param_change.py",
                 "astf/param_tcp_rxbufsize.py",
                 "astf/param_tcp_no_timestamp.py",
                 "astf/param_tcp_keepalive.py",
                 "astf/param_tcp_delay_ack.py",
                 "astf/param_tcp_rxbufsize_8k.py",
                 "astf/param_mss_initwnd.py",
                 "astf/http_manual_commands_delay.py",
                 "astf/http_manual_commands_rst.py",
                 "astf/http_manual_commands_fin_ack.py",
                 "astf/http_manual_commands_delay_client.py",
                 "astf/http_manual_commands_delay_client2.py",
                 "astf/http_manual_commands_delay_rand.py",
                 "astf/http_manual_commands_loop.py",
                 "astf/http_manual_commands_pipeline.py",
                 "astf/http_manual_commands_pipeline2.py",
                 "astf/http_manual_commands_rst.py",
                 "astf/http_simple_limit.py",
        ]

        _files = [

                "astf/http_manual_commands_delay.py"
                #"astf/http_simple_limit.py",
                #"astf/http_manual_commands_rst.py"
                #"astf/http_manual_commands_pipeline2.py"
            
                
                 
        ]

        for file in files:
            base_name = file.split("/")[-1].split(".")[0]
            output = "../../generated/"+base_name + ".generated.pcap"
            golden = "functional_tests/golden/" + base_name + ".cap"
            print ("checking {0}".format(file))
            options=None;
            if valgrind:
                options=["--valgrind"]
            self.run_sim(file, output,options)
            compare_caps(golden, output, 1)
示例#4
0
    def run_client_config(self, valgrind):

        cc = [
            "../../astf/cc_http_simple.yaml", "../../astf/cc_http_simple2.yaml"
        ]

        file = "astf/http_simple.py"

        for cc_obj in cc:
            base_name = file.split("/")[-1].split(".")[0]
            cc_base_name = cc_obj.split("/")[-1].split(".")[0]
            output = "../../generated/" + base_name + "_" + cc_base_name + ".generated.pcap"
            golden = "functional_tests/golden/" + base_name + "_" + cc_base_name + ".pcap"
            print("checking {0} --cc {0}".format(file, cc_obj))
            options = None
            if valgrind:
                options = ["--valgrind"]
            self.run_sim(file, output, options, cc_obj)
            compare_caps(golden, output, 1)
示例#5
0
    def run_astf_gold(self, valgrind):
        files = [
            "astf/tcp_param_change.py",
            "astf/param_ipv6.py",
            "astf/param_tcp_rxbufsize.py",
            "astf/param_tcp_no_timestamp.py",
            "astf/param_tcp_keepalive.py",
            "astf/param_tcp_delay_ack.py",
            "astf/param_tcp_rxbufsize_8k.py",
            "astf/param_mss_initwnd.py",
        ]

        for file in files:
            base_name = file.split("/")[-1].split(".")[0]
            output = "../../generated/" + base_name + ".generated.pcap"
            golden = "functional_tests/golden/" + base_name + ".cap"
            print("checking {0}".format(file))
            options = None
            if valgrind:
                options = ["--valgrind"]
            self.run_sim(file, output, options)
            compare_caps(golden, output, 1)