2
0
mirror of https://github.com/openvswitch/ovs synced 2025-10-25 15:07:05 +00:00

tests: Use the 'LARGE_MSECS' variation of time/warp at more places.

commit 8661af798(timeval: Provide a variation for time/warp command)
provided a variation of time/warp command to prevent multiple
invocations of time/warp. That commit changed only the users in bfd.at
and cfm.at as they used it the most. Since we haven't had any negative
confequences because of the change, add the remaining users.

Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
This commit is contained in:
Gurucharan Shetty
2014-07-15 08:16:52 -07:00
parent 9a8b5cc1a3
commit bdba1947ed
5 changed files with 18 additions and 31 deletions

View File

@@ -12,9 +12,7 @@ OVS_VSWITCHD_START([\
set Interface p1 type=dummy ])
ovs-appctl time/stop
ovs-appctl time/warp 100
ovs-appctl time/warp 100
ovs-appctl time/warp 100
ovs-appctl time/warp 300 100
AT_CHECK([ovs-appctl lacp/show], [0], [dnl
---- p1 ----
@@ -64,9 +62,7 @@ OVS_VSWITCHD_START([dnl
other_config:lacp-aggregation-key=3333 ])
ovs-appctl time/stop
ovs-appctl time/warp 100
ovs-appctl time/warp 100
ovs-appctl time/warp 100
ovs-appctl time/warp 300 100
AT_CHECK([ovs-appctl lacp/show], [0], [stdout])
AT_CHECK([sed -e 's/aggregation key:.*/aggregation key: <omitted>/' < stdout], [0], [dnl
@@ -320,7 +316,7 @@ AT_CHECK([ovs-vsctl \
-- add-port br0 null0 -- set int null0 type=patch options:peer=p2 -- set int p2 options:peer=null0 \
-- add-port br1 null1 -- set int null1 type=patch options:peer=p0 -- set int p0 options:peer=null1])
for i in `seq 0 40`; do ovs-appctl time/warp 100; done
ovs-appctl time/warp 4100 100
AT_CHECK(
[ovs-appctl lacp/show bond0
ovs-appctl lacp/show bond1
@@ -448,7 +444,7 @@ slave p3: enabled
# Wait 4 more simulated seconds. The LACP state should become
# "defaulted" for p0 and p2.
for i in `seq 0 40`; do ovs-appctl time/warp 100; done
ovs-appctl time/warp 4100 100
AT_CHECK(
[ovs-appctl lacp/show bond0
ovs-appctl lacp/show bond1

View File

@@ -219,9 +219,7 @@ NXST_FLOW reply:
done
# Make sure that 15 seconds without refreshing makes the flow time out.
ovs-appctl time/warp 5000
ovs-appctl time/warp 5000
ovs-appctl time/warp 5000
ovs-appctl time/warp 15000 5000
sleep 1
AT_CHECK([ovs-ofctl dump-flows br0 table=1 | ofctl_strip | sort], [0], [dnl
table=1, priority=0 actions=FLOOD

View File

@@ -40,8 +40,7 @@ ovs-appctl netdev-dummy/set-admin-state p1 down
ovs-appctl time/warp 100
AT_CHECK([ovs-appctl netdev-dummy/receive p7 'in_port(7),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0d),eth_type(0x0800),ipv4(src=10.0.0.5,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
AT_CHECK([ovs-appctl netdev-dummy/receive p7 'in_port(7),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0e),eth_type(0x0800),ipv4(src=10.0.0.6,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
ovs-appctl time/warp 100
ovs-appctl time/warp 100
ovs-appctl time/warp 200 100
sleep 1
AT_CHECK([cat ovs-vswitchd.log | grep 'in_port([[348]])' | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
skb_priority(0),skb_mark(0/0),recirc_id(0),dp_hash(0/0),in_port(3),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2/0.0.0.0,dst=10.0.0.1/0.0.0.0,proto=1/0,tos=0/0,ttl=64/0,frag=no/0xff),icmp(type=8/0,code=0/0), actions: <del>
@@ -137,9 +136,7 @@ for i in `seq 0 255` ;
AT_CHECK([ovs-appctl netdev-dummy/receive p7 $pkt])
done
)
ovs-appctl time/warp 100
ovs-appctl time/warp 100
ovs-appctl time/warp 100
ovs-appctl time/warp 300 100
AT_CHECK([ovs-appctl dpif/dump-flows br0 |grep tcp > br0_flows.txt])
AT_CHECK([ovs-appctl dpif/dump-flows br1 |grep tcp > br1_flows.txt])
# Make sure there is resonable distribution to all three ports.
@@ -3967,9 +3964,7 @@ m4_define([CHECK_SFLOW_SAMPLING_PACKET],
dnl sleep long enough to get more than one counter sample
dnl from each datasource so we can check sequence numbers
for i in `seq 1 30`; do
ovs-appctl time/warp 100
done
ovs-appctl time/warp 3000 100
OVS_VSWITCHD_STOP
ovs-appctl -t test-sflow exit
@@ -4456,9 +4451,7 @@ get_ages duration3 hard3 idle3
# occasionally.
ovs-appctl time/warp 10000
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),tcp(src=80,dst=1234)'
ovs-appctl time/warp 1000
ovs-appctl time/warp 1000
ovs-appctl time/warp 1000
ovs-appctl time/warp 3000 1000
sleep 1
get_ages duration4 hard4 idle4
@@ -5316,7 +5309,7 @@ OVS_VSWITCHD_START([add-br br1 -- set bridge br1 datapath-type=dummy -- \
ovs-appctl time/stop
# advance the clock to stablize everything.
for i in `seq 0 49`; do ovs-appctl time/warp 100; done
ovs-appctl time/warp 5000 100
# cfm/show should show 'recv' fault.
AT_CHECK([ovs-appctl cfm/show | sed -n '/^.*fault:.*/p'], [0], [dnl
fault: recv
@@ -5339,7 +5332,7 @@ AT_CHECK([ovs-appctl bond/show | sed -n '/^.*may_enable:.*/p'], [0], [dnl
# now disable the bfd on p1.
AT_CHECK([ovs-vsctl set Interface p1 bfd:enable=false])
# advance the clock to stablize everything.
for i in `seq 0 49`; do ovs-appctl time/warp 100; done
ovs-appctl time/warp 5000 100
# cfm/show should show 'recv' fault.
AT_CHECK([ovs-appctl cfm/show | sed -n '/^.*fault:.*/p'], [0], [dnl
fault: recv
@@ -5359,7 +5352,7 @@ AT_CHECK([ovs-appctl bond/show br0bond | sed -n '/^.*may_enable:.*/p'], [0], [dn
AT_CHECK([ovs-vsctl set Interface p1 bfd:enable=true])
AT_CHECK([ovs-vsctl set Interface p0 bfd:enable=false])
# advance the clock to stablize everything.
for i in `seq 0 49`; do ovs-appctl time/warp 100; done
ovs-appctl time/warp 5000 100
# cfm/show should show 'recv' fault.
AT_CHECK([ovs-appctl cfm/show | sed -n '/^.*fault:.*/p'], [0], [dnl
fault: recv

View File

@@ -40,28 +40,28 @@ OVS_VSWITCHD_START([add-port br0 p1 -- set int p1 type=internal])
ovs-appctl time/stop
dnl at the beginning, the update of rx_packets should happen every 5 seconds.
for i in `seq 0 10`; do ovs-appctl time/warp 1000; done
ovs-appctl time/warp 11000 1000
OVS_VSCTL_CHECK_RX_PKT([p1], [0])
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)'])
for i in `seq 0 10`; do ovs-appctl time/warp 1000; done
ovs-appctl time/warp 11000 1000
OVS_VSCTL_CHECK_RX_PKT([p1], [1])
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
ovs-appctl time/warp 51000 1000
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
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 99`; do ovs-appctl time/warp 1000; done
ovs-appctl time/warp 100000 1000
OVS_VSCTL_CHECK_RX_PKT([p1], [6])
dnl now remove the configuration. 'recv' one packet. there should be an update after 5000 ms.
AT_CHECK([ovs-vsctl clear O . other_config])
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)'])
for i in `seq 0 10`; do ovs-appctl time/warp 1000; done
ovs-appctl time/warp 11000 1000
OVS_VSCTL_CHECK_RX_PKT([p1], [7])
OVS_VSWITCHD_STOP

View File

@@ -361,7 +361,7 @@ AT_CHECK(
"row": {"target": "punix:socket2"}}]']], [0], [ignore], [ignore])
ON_EXIT([kill `cat ovsdb-server.pid`])
AT_CHECK([ovsdb-server --enable-dummy --detach --no-chdir --pidfile --remote=db:mydb,Root,managers --remote=db:mydb,Root,manager_options --log-file db], [0], [ignore], [ignore])
for i in 1 2 3 4 5 6; do ovs-appctl -t ovsdb-server time/warp 1000; done
ovs-appctl -t ovsdb-server time/warp 6000 1000
AT_CHECK(
[[ovsdb-client transact unix:socket1 \
'["mydb",