diff options
author | 2016-02-14 11:34:03 +0200 | |
---|---|---|
committer | 2016-02-14 11:34:03 +0200 | |
commit | d509902917dd1bf13c0ababa7c83fdba6060c6d9 (patch) | |
tree | 050954fbc87db5c13c0d2894470d71055359d6ee /scripts/automation/regression | |
parent | ffbf4967fd10055686b60c7279f3bf86e29749bd (diff) |
test add teredo example, fix scapy ipv6 header
Diffstat (limited to 'scripts/automation/regression')
-rw-r--r-- | scripts/automation/regression/unit_tests/functional_tests/scapy_pkt_builder_test.py | 15 | ||||
-rw-r--r-- | scripts/automation/regression/unit_tests/functional_tests/stl_basic_tests.py | 7 |
2 files changed, 19 insertions, 3 deletions
diff --git a/scripts/automation/regression/unit_tests/functional_tests/scapy_pkt_builder_test.py b/scripts/automation/regression/unit_tests/functional_tests/scapy_pkt_builder_test.py index dcebecdb..147b3ad8 100644 --- a/scripts/automation/regression/unit_tests/functional_tests/scapy_pkt_builder_test.py +++ b/scripts/automation/regression/unit_tests/functional_tests/scapy_pkt_builder_test.py @@ -72,6 +72,21 @@ class CTRexPktBuilderSanitySCapy_Test(pkt_bld_general_test.CGeneralPktBld_Test): 'split_by_var': ''} ) + + + def test_simple_teredo(self): + + pkt = Ether()/IP(src="16.0.0.1",dst="48.0.0.1")/UDP(dport=3797,sport=3544)/IPv6(src="2001:0:4137:9350:8000:f12a:b9c8:2815",dst="2001:4860:0:2001::68")/UDP(dport=12,sport=1025)/ICMPv6Unknown() + + pkt.build(); + p_utl=CTRexScapyPktUtl(pkt); + + assert_equal( p_utl.get_field_offet_by_str("IPv6.src"), (50,16) ) + assert_equal( p_utl.get_field_offet_by_str("IPv6.dst"), (66,16) ) + + + + def test_simple_scapy_vlan(self): py='5'*(9) diff --git a/scripts/automation/regression/unit_tests/functional_tests/stl_basic_tests.py b/scripts/automation/regression/unit_tests/functional_tests/stl_basic_tests.py index 1aec4173..fd372aea 100644 --- a/scripts/automation/regression/unit_tests/functional_tests/stl_basic_tests.py +++ b/scripts/automation/regression/unit_tests/functional_tests/stl_basic_tests.py @@ -148,7 +148,7 @@ class CStlBasic_Test(functional_general_test.CGeneralFunctional_Test): def test_stl_profiles (self): - p0 = [ + p = [ ["udp_1pkt_1mac_override.py","-m 1 -l 50",True], ["syn_attack.py","-m 1 -l 50",False], # can't compare random now ["udp_1pkt_1mac.py","-m 1 -l 50",True], @@ -177,11 +177,12 @@ class CStlBasic_Test(functional_general_test.CGeneralFunctional_Test): ["udp_1pkt_pcap_relative_path.py","-m 1 -l 3",True], ["udp_1pkt_tuple_gen_split.py","-m 1 -c 2 -l 100",True], ["udp_1pkt_range_clients_split.py","-m 1 -c 2 -l 100",True], - ["udp_1pkt_vxlan.py","-m 1 -c 1 -l 17",True] + ["udp_1pkt_vxlan.py","-m 1 -c 1 -l 17",True], + ["udp_1pkt_ipv6_in_ipv4.py","-m 1 -c 1 -l 17",True] ]; - p1 = [ ["udp_1pkt_vxlan.py","-m 1 -c 1 -l 17",True] ] + p1 = [ ["udp_1pkt_ipv6_in_ipv4.py","-m 1 -c 1 -l 17",True] ] for obj in p: |