]> git.proxmox.com Git - openvswitch.git/blame - debian/patches/remove-bfd-decay-tests.patch
add debian sid (ovs 2.11) "debian" directory
[openvswitch.git] / debian / patches / remove-bfd-decay-tests.patch
CommitLineData
2cf860ef
AD
1Description: Remove bfd decay
2 This fails on armhf, probably because the platform is too slow.
3Author: Thomas Goirand <zigo@debian.org>
4Forwarded: no
5Last-Update: 2018-01-24
6
7--- openvswitch-2.8.1+dfsg1.orig/tests/bfd.at
8+++ openvswitch-2.8.1+dfsg1/tests/bfd.at
9@@ -264,149 +264,6 @@ This flow is handled by the userspace sl
10 OVS_VSWITCHD_STOP
11 AT_CLEANUP
12
13-# Tests below are for bfd decay features.
14-AT_SETUP([bfd - bfd decay])
15-OVS_VSWITCHD_START([add-br br1 -- set bridge br1 datapath-type=dummy -- \
16- add-port br1 p1 -- set Interface p1 type=patch \
17- options:peer=p0 ofport_request=2 -- \
18- add-port br0 p0 -- set Interface p0 type=patch \
19- options:peer=p1 ofport_request=1 -- \
20- set Interface p0 bfd:enable=true bfd:min_tx=300 bfd:min_rx=300 -- \
21- set Interface p1 bfd:enable=true bfd:min_tx=500 bfd:min_rx=500])
22-
23-ovs-appctl time/stop
24-
25-# wait for a while to stablize everything.
26-ovs-appctl time/warp 10000 500
27-BFD_CHECK([p0], [true], [false], [none], [up], [No Diagnostic], [none], [up], [No Diagnostic])
28-BFD_CHECK([p1], [true], [false], [none], [up], [No Diagnostic], [none], [up], [No Diagnostic])
29-BFD_CHECK_TX([p0], [500ms], [300ms], [500ms])
30-BFD_CHECK_RX([p0], [500ms], [300ms], [500ms])
31-
32-# Test-1 BFD decay: decay to decay_min_rx
33-AT_CHECK([ovs-vsctl set interface p0 bfd:decay_min_rx=3000])
34-# bfd:decay_min_rx is set to 3000ms after the local state of p0 goes up,
35-# so for the first 2000ms, there should be no change.
36-ovs-appctl time/warp 2000 500
37-BFD_CHECK_TX([p0], [500ms], [300ms], [500ms])
38-BFD_CHECK_RX([p0], [500ms], [300ms], [500ms])
39-
40-# advance the clock by 5000ms.
41-ovs-appctl time/warp 5000 500
42-# now, min_rx should decay to 3000ms.
43-BFD_CHECK_TX([p0], [500ms], [300ms], [500ms])
44-BFD_CHECK_RX([p0], [3000ms], [3000ms], [500ms])
45-
46-# advance clock by 5000ms and check the flags are all 'none'.
47-ovs-appctl time/warp 5000 500
48-BFD_CHECK([p0], [true], [false], [none], [up], [No Diagnostic], [none], [up], [No Diagnostic])
49-BFD_CHECK([p1], [true], [false], [none], [up], [No Diagnostic], [none], [up], [No Diagnostic])
50-BFD_CHECK_TX([p0], [500ms], [300ms], [500ms])
51-BFD_CHECK_RX([p0], [3000ms], [3000ms], [500ms])
52-# End of Test-1 ###############################################################
53-
54-
55-# Test-2 BFD decay: go back to min_rx when there is traffic
56-# receive packet at 1/100ms rate for 5000ms.
57-for i in `seq 0 49`
58-do
59- ovs-appctl time/warp 100
60- AT_CHECK([ovs-ofctl packet-out br1 "in_port=3 packet=90e2ba01475000101856b2e80806000108000604000100101856b2e80202020300000000000002020202 actions=2"],
61- [0], [stdout], [])
62-done
63-# after a decay interval (3000ms), the p0 min_rx will go back to
64-# min_rx.
65-BFD_CHECK_TX([p0], [500ms], [300ms], [500ms])
66-BFD_CHECK_RX([p0], [500ms], [300ms], [500ms])
67-# End of Test-2 ###############################################################
68-
69-
70-# Test-3 BFD decay: set decay_min_rx to 1000ms.
71-# this should firstly reset the min_rx and then re-decay to 1000ms.
72-AT_CHECK([ovs-vsctl set Interface p0 bfd:decay_min_rx=1000])
73-# advance the clock by 10000ms, decay should have happened.
74-ovs-appctl time/warp 10000 500
75-BFD_CHECK([p0], [true], [false], [none], [up], [No Diagnostic], [none], [up], [No Diagnostic])
76-BFD_CHECK([p1], [true], [false], [none], [up], [No Diagnostic], [none], [up], [No Diagnostic])
77-BFD_CHECK_TX([p0], [500ms], [300ms], [500ms])
78-BFD_CHECK_RX([p0], [1000ms], [1000ms], [500ms])
79-# End of Test-3 ###############################################################
80-
81-
82-# Test-4 BFD decay: set decay_min_rx to 0 to disable bfd decay.
83-AT_CHECK([ovs-vsctl set Interface p0 bfd:decay_min_rx=0])
84-# advance the clock by 5000ms.
85-ovs-appctl time/warp 10000 500
86-# min_rx is reset.
87-BFD_CHECK_TX([p0], [500ms], [300ms], [500ms])
88-BFD_CHECK_RX([p0], [500ms], [300ms], [500ms])
89-
90-for i in `seq 0 20`
91-do
92- ovs-appctl time/warp 500
93- BFD_CHECK([p0], [true], [false], [none], [up], [No Diagnostic], [none], [up], [No Diagnostic])
94- BFD_CHECK([p1], [true], [false], [none], [up], [No Diagnostic], [none], [up], [No Diagnostic])
95- BFD_CHECK_TX([p0], [500ms], [300ms], [500ms])
96- BFD_CHECK_RX([p0], [500ms], [300ms], [500ms])
97-done
98-# End of Test-4 ################################################################
99-
100-
101-# Test-5 BFD decay: rmt_min_tx is greater than decay_min_rx
102-AT_CHECK([ovs-vsctl set Interface p0 bfd:decay_min_rx=3000 -- set interface p1 bfd:min_tx=5000])
103-# advance the clock by 10000ms to stable everything.
104-ovs-appctl time/warp 10000 500
105-BFD_CHECK([p0], [true], [false], [none], [up], [No Diagnostic], [none], [up], [No Diagnostic])
106-BFD_CHECK([p1], [true], [false], [none], [up], [No Diagnostic], [none], [up], [No Diagnostic])
107-# p0 rx should show 5000ms even if it is in decay.
108-BFD_CHECK_TX([p0], [500ms], [300ms], [5000ms])
109-BFD_CHECK_RX([p0], [5000ms], [3000ms], [500ms])
110-# then, there should be no change of status,
111-for i in `seq 0 19`
112-do
113- ovs-appctl time/warp 500
114- BFD_CHECK([p0], [true], [false], [none], [up], [No Diagnostic], [none], [up], [No Diagnostic])
115- BFD_CHECK([p1], [true], [false], [none], [up], [No Diagnostic], [none], [up], [No Diagnostic])
116- BFD_CHECK_TX([p0], [500ms], [300ms], [5000ms])
117- BFD_CHECK_RX([p0], [5000ms], [3000ms], [500ms])
118-done
119-# reset the p1's min_tx to 500ms.
120-AT_CHECK([ovs-vsctl set Interface p1 bfd:min_tx=500])
121-# advance the clock by 20000ms to stable everything.
122-# since p0 has been in decay, now the RX will show 3000ms.
123-ovs-appctl time/warp 20000 500
124-BFD_CHECK_TX([p0], [500ms], [300ms], [500ms])
125-BFD_CHECK_RX([p0], [3000ms], [3000ms], [500ms])
126-# End of Test-5 ###############################################################
127-
128-
129-# Test-6 BFD decay: state up->down->up.
130-# turn bfd off on p1
131-AT_CHECK([ovs-vsctl set Interface p1 bfd:enable=false])
132-
133-# advance the clock by 15000ms to stable everything.
134-ovs-appctl time/warp 15000 1000
135-BFD_CHECK([p0], [false], [false], [none], [down], [Control Detection Time Expired], [none], [down], [No Diagnostic])
136-BFD_CHECK_TX([p0], [1000ms], [1000ms], [0ms])
137-BFD_CHECK_RX([p0], [300ms], [300ms], [1ms])
138-
139-# resume the bfd on p1. the bfd should not go to decay mode direclty.
140-AT_CHECK([ovs-vsctl set Interface p1 bfd:enable=true])
141-ovs-appctl time/warp 1500 500
142-BFD_CHECK_TX([p0], [500ms], [300ms], [500ms])
143-BFD_CHECK_RX([p0], [500ms], [300ms], [500ms])
144-
145-# since the decay_min_rx is still 3000ms, so after 5000ms, p0 should have decayed.
146-ovs-appctl time/warp 5000 500
147-BFD_CHECK_TX([p0], [500ms], [300ms], [500ms])
148-BFD_CHECK_RX([p0], [3000ms], [3000ms], [500ms])
149-# End of Test-6 ################################################################
150-
151-OVS_VSWITCHD_STOP
152-AT_CLEANUP
153-
154-# Tests below are for bfd forwarding_if_rx feature.
155-
156 # forwarding_if_rx Test1
157 # Test1 tests the case when bfd is only enabled on one end of the link.
158 # Under this situation, the forwarding flag should always be false, even