On Fri, May 2, 2014 at 1:14 PM, Alex Wang <al...@nicira.com> wrote: > > > > On Thu, May 1, 2014 at 7:21 PM, Joe Stringer <joestrin...@nicira.com>wrote: > >> On 30 April 2014 12:46, Alex Wang <al...@nicira.com> wrote: >>> >>> +dnl set the stats update interval to 100K ms, the following 'recv' >>> should not be updated. >>> +AT_CHECK([ovs-vsctl set O . other_config:stats-update-interval=100000]) >>> +for i in `seq 0 50`; do ovs-appctl time/warp 1000; done >>> +for i in `seq 1 5`; do >>> + AT_CHECK([ovs-appctl netdev-dummy/receive p1 >>> 'eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)']) >>> +done >>> + >>> +dnl advance the clock by 100K ms, the previous 'recv' should be updated. >>> +for i in `seq 0 100`; do ovs-appctl time/warp 1000; done >>> +OVS_VSCTL_CHECK_RX_PKT([p1], [6]) >>> >> >> Does there need to be an OVS_VSCTL_CHECK_RX_PKT() command in between >> these two snippets? I don't see a check to show that it's not updated >> during the time 5000ms -> 100000ms after the setting changed. (only a >> check to make sure it is updated after 100000ms). >> > > > I think it is not necessary to check in every iteration for the change. > Also, it may introduce race if we check the timing too closely. > > So, I'm more inclined to add an additional check in the middle. like > below: > > diff --git a/tests/ovs-vswitchd.at b/tests/ovs-vswitchd.at > index 17db549..5cbdf07 100644 > --- a/tests/ovs-vswitchd.at > +++ b/tests/ovs-vswitchd.at > @@ -54,7 +54,9 @@ for i in `seq 1 5`; do > done > > dnl advance the clock by 100K ms, the previous 'recv' should be updated. > -for i in `seq 0 100`; do ovs-appctl time/warp 1000; done > +for i in `seq 0 49`; do ovs-appctl time/warp 1000; done > +OVS_VSCTL_CHECK_RX_PKT([p1], [1]) > +for i in `seq 0 49`; do ovs-appctl time/warp 1000; done > OVS_VSCTL_CHECK_RX_PKT([p1], [6]) >
Sorry, this was wrong. I mean this (as you suggested): +OVS_VSCTL_CHECK_RX_PKT([p1], [1]) dnl advance the clock by 100K ms, the previous 'recv' should be updated. -for i in `seq 0 100`; do ovs-appctl time/warp 1000; done +for i in `seq 0 99`; do ovs-appctl time/warp 1000; done OVS_VSCTL_CHECK_RX_PKT([p1], [6])
_______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev