X-Git-Url: http://git.cascardo.eti.br/?a=blobdiff_plain;f=tests%2Fofproto-dpif.at;h=ff9ead147330f5ec5cade275712ab9c1304ce260;hb=af40f5b908d69686beef9ddf16da94e5a79a8742;hp=400fc31d711507abd45c381d6774c5037a6215bd;hpb=086129e1845b5a50ad174676036e46cbcdf93216;p=cascardo%2Fovs.git diff --git a/tests/ofproto-dpif.at b/tests/ofproto-dpif.at index 400fc31d7..ff9ead147 100644 --- a/tests/ofproto-dpif.at +++ b/tests/ofproto-dpif.at @@ -2191,6 +2191,27 @@ AT_CHECK([echo $n_learn $n_in $n_out $n_other], [0], [1 59 60 0 AT_CLEANUP +AT_SETUP([ofproto-dpif - flow stats]) +OVS_VSWITCHD_START +AT_CHECK([ovs-ofctl add-flow br0 "ip,actions=NORMAL"]) +AT_CHECK([ovs-ofctl add-flow br0 "icmp,actions=NORMAL"]) + +ovs-appctl time/stop + +for i in `seq 1 10`; do + ovs-appctl netdev-dummy/receive br0 'in_port(0),eth(src=50:54:00:00:00:07,dst=50:54:00:00:00:05),eth_type(0x0800),ipv4(src=192.168.0.2,dst=192.168.0.1,proto=6,tos=0,ttl=64,frag=no)' +done + +ovs-appctl time/warp 1000 + +AT_CHECK([ovs-ofctl dump-flows br0], [0], [stdout]) +AT_CHECK([STRIP_XIDS stdout | sed -n 's/duration=[[0-9]]*\.[[0-9]]*s/duration=0.0s/p' | sort], [0], [dnl + cookie=0x0, duration=0.0s, table=0, n_packets=0, n_bytes=0, idle_age=1, icmp actions=NORMAL + cookie=0x0, duration=0.0s, table=0, n_packets=10, n_bytes=600, idle_age=1, ip actions=NORMAL +]) +OVS_VSWITCHD_STOP +AT_CLEANUP + AT_SETUP([idle_age and hard_age increase over time]) OVS_VSWITCHD_START