X-Git-Url: http://git.cascardo.eti.br/?a=blobdiff_plain;f=tests%2Fodp.at;h=3d699e12be15456f06d6a2839e79d646f1b9b3a9;hb=9ac0aadab9f99c5f9cbe8b30cc095ce9be4be4e9;hp=63bbe69fdb84792dfe16449e3633d34dca6d421e;hpb=8e4c1621e939cd29df79b526920e5c243a48bdaa;p=cascardo%2Fovs.git diff --git a/tests/odp.at b/tests/odp.at index 63bbe69fd..3d699e12b 100644 --- a/tests/odp.at +++ b/tests/odp.at @@ -69,6 +69,10 @@ s/$/)/' odp-base.txt s/\(eth([[^)]]*)\),*/\1,eth_type(0x8100),vlan(vid=99,pcp=7),encap(/ s/$/)/' odp-base.txt + echo + echo '# Valid forms with conntrack fields.' + sed 's/^/skb_priority(0),skb_mark(0),ct_mark(0x12345678),ct_label(0x1234567890abcdef1234567890abcdef),recirc_id(0),dp_hash(0),/' odp-base.txt + echo echo '# Valid forms with IP first fragment.' sed 's/^/skb_priority(0),skb_mark(0),recirc_id(0),dp_hash(0),/' odp-base.txt | sed -n 's/,frag=no),/,frag=first),/p' @@ -86,6 +90,11 @@ sed '/bos=0/{ s/^/ODP_FIT_TOO_LITTLE: / }' < odp-in.txt > odp-out.txt +dnl Some fields are always printed for this test, because wildcards aren't +dnl specified. We can skip these. +sed -i 's/\(skb_mark(0)\),\(ct\)/\1,ct_state(0),ct_zone(0),\2/' odp-out.txt +sed -i 's/\(skb_mark([[^)]]*)\),\(recirc\)/\1,ct_state(0),ct_zone(0),ct_mark(0),ct_label(0),\2/' odp-out.txt + AT_CHECK_UNQUOTED([ovstest test-odp parse-keys < odp-in.txt], [0], [`cat odp-out.txt` ]) AT_CLEANUP @@ -117,7 +126,7 @@ skb_mark(0x1234/0xfff0),in_port(1),eth(src=00:01:02:03:04:05,dst=10:11:12:13:14: echo echo '# Valid forms with tunnel header.' - sed 's/^/tunnel(tun_id=0x7f10354\/0xff,src=10.10.10.10\/255.255.255.0,dst=20.20.20.20\/255.255.255.0,ttl=64,vxlan(gbp(id=10\/0xff,flags=0xb)),flags(csum|key)),/' odp-base.txt + sed 's/^/tunnel(tun_id=0x7f10354\/0xff,src=10.10.10.10\/255.255.255.0,dst=20.20.20.20\/255.255.255.0,ttl=64,vxlan(gbp(id=10\/0xff,flags=0xb)),flags(oam|csum|key)),/' odp-base.txt echo echo '# Valid forms with tunnel header (wildcard flag).' @@ -152,6 +161,10 @@ s/$/)/' odp-base.txt s/\(eth([[^)]]*)\),*/\1,eth_type(0x8100),vlan(vid=99,pcp=7),encap(/ s/$/)/' odp-base.txt + echo + echo '# Valid forms with conntrack fields.' + sed 's/\(eth([[^)]]*)\),/\1,ct_state(+trk),ct_zone(0x5\/0xff),ct_mark(0x10305070\/0xf0f0f0f0),ct_label(0x1234567890abcdef1234567890abcdef\/0x102030405060708090a0b0c0d0e0f0),/' odp-base.txt + echo echo '# Valid forms with IP first fragment.' sed -n 's/,frag=no),/,frag=first),/p' odp-base.txt @@ -234,13 +247,13 @@ AT_DATA([actions.txt], [dnl 1,2,3 userspace(pid=555666777) userspace(pid=555666777,tunnel_out_port=10) -userspace(pid=6633,sFlow(vid=9,pcp=7,output=10)) -userspace(pid=6633,sFlow(vid=9,pcp=7,output=10),tunnel_out_port=10) +userspace(pid=6633,sFlow(vid=9,pcp=7,output=10),actions) +userspace(pid=6633,sFlow(vid=9,pcp=7,output=10),actions,tunnel_out_port=10) userspace(pid=9765,slow_path(0)) userspace(pid=9765,slow_path(0),tunnel_out_port=10) userspace(pid=9765,slow_path(cfm)) userspace(pid=9765,slow_path(cfm),tunnel_out_port=10) -userspace(pid=1234567,userdata(0102030405060708090a0b0c0d0e0f)) +userspace(pid=1234567,userdata(0102030405060708090a0b0c0d0e0f),actions) userspace(pid=1234567,userdata(0102030405060708090a0b0c0d0e0f),tunnel_out_port=10) userspace(pid=6633,flow_sample(probability=123,collector_set_id=1234,obs_domain_id=2345,obs_point_id=3456)) userspace(pid=6633,flow_sample(probability=123,collector_set_id=1234,obs_domain_id=2345,obs_point_id=3456),tunnel_out_port=10) @@ -293,6 +306,23 @@ tnl_push(tnl_port(6),header(size=50,type=4,eth(dst=f8:bc:12:44:34:b6,src=f8:bc:1 tnl_push(tnl_port(6),header(size=50,type=5,eth(dst=f8:bc:12:44:34:b6,src=f8:bc:12:46:58:e0,dl_type=0x0800),ipv4(src=1.1.2.88,dst=1.1.2.92,proto=17,tos=0,ttl=64,frag=0x40),udp(src=0,dst=6081,csum=0x0),geneve(oam,vni=0x1c7)),out_port(1)) tnl_push(tnl_port(6),header(size=58,type=5,eth(dst=f8:bc:12:44:34:b6,src=f8:bc:12:46:58:e0,dl_type=0x0800),ipv4(src=1.1.2.88,dst=1.1.2.92,proto=17,tos=0,ttl=64,frag=0x40),udp(src=0,dst=6081,csum=0x0),geneve(crit,vni=0x1c7,options({class=0xffff,type=0x80,len=4,0xa}))),out_port(1)) tnl_push(tnl_port(6),header(size=50,type=5,eth(dst=f8:bc:12:44:34:b6,src=f8:bc:12:46:58:e0,dl_type=0x0800),ipv4(src=1.1.2.88,dst=1.1.2.92,proto=17,tos=0,ttl=64,frag=0x40),udp(src=0,dst=6081,csum=0xffff),geneve(vni=0x1c7)),out_port(1)) +ct +ct(commit) +ct(commit,zone=5) +ct(commit,mark=0xa0a0a0a0/0xfefefefe) +ct(commit,label=0x1234567890abcdef1234567890abcdef/0xf1f2f3f4f5f6f7f8f9f0fafbfcfdfeff) +ct(commit,helper=ftp) +ct(nat) +ct(commit,nat(src)) +ct(commit,nat(dst)) +ct(commit,nat(src=10.0.0.240,random)) +ct(commit,nat(src=10.0.0.240:32768-65535,random)) +ct(commit,nat(dst=10.0.0.128-10.0.0.254,hash)) +ct(commit,nat(src=10.0.0.240-10.0.0.254:32768-65535,persistent)) +ct(commit,nat(src=fe80::20c:29ff:fe88:a18b,random)) +ct(commit,nat(src=fe80::20c:29ff:fe88:1-fe80::20c:29ff:fe88:a18b,random)) +ct(commit,nat(src=[[fe80::20c:29ff:fe88:1]]-[[fe80::20c:29ff:fe88:a18b]]:255-4096,random)) +ct(commit,helper=ftp,nat(src=10.1.1.240-10.1.1.255)) ]) AT_CHECK_UNQUOTED([ovstest test-odp parse-actions < actions.txt], [0], [`cat actions.txt`