3 dnl Creates an empty database in the current directory and then starts
4 dnl an ovsdb-server on it for ovs-vsctl to connect to.
5 m4_define([OVS_VSCTL_SETUP],
7 AT_CHECK([ovsdb-server --detach --pidfile=$PWD/pid --remote=punix:socket --unixctl=$PWD/unixctl db >/dev/null 2>&1], [0], [ignore], [ignore])])
11 dnl Kills off the database server.
12 m4_define([OVS_VSCTL_CLEANUP], [OVSDB_SERVER_SHUTDOWN])
14 dnl RUN_OVS_VSCTL(COMMAND, ...)
16 dnl Executes each ovs-vsctl COMMAND.
17 m4_define([RUN_OVS_VSCTL],
18 [m4_foreach([command], [$@], [ovs-vsctl --no-wait -vreconnect:ANY:emer --db=unix:socket -- command
20 m4_define([RUN_OVS_VSCTL_ONELINE],
21 [m4_foreach([command], [$@], [ovs-vsctl --no-wait -vreconnect:ANY:emer --db=unix:socket --oneline -- command
24 dnl RUN_OVS_VSCTL_TOGETHER(COMMAND, ...)
26 dnl Executes each ovs-vsctl COMMAND in a single run of ovs-vsctl.
27 m4_define([RUN_OVS_VSCTL_TOGETHER],
28 [ovs-vsctl --no-wait -vreconnect:ANY:emer --db=unix:socket --oneline dnl
29 m4_foreach([command], [$@], [ -- command])])
31 dnl CHECK_BRIDGES([BRIDGE, PARENT, VLAN], ...)
33 dnl Verifies that "ovs-vsctl list-br" prints the specified list of bridges,
34 dnl which must be in alphabetical order. Also checks that each BRIDGE has the
35 dnl specified PARENT and is on the given VLAN.
36 m4_define([_CHECK_BRIDGE],
37 [AT_CHECK([RUN_OVS_VSCTL([br-to-parent $1])], [0], [$2
38 ], [], [OVS_VSCTL_CLEANUP])
40 # Check br-to-vlan, without --oneline.
41 AT_CHECK([RUN_OVS_VSCTL([br-to-vlan $1])], [0], [$3
42 ], [], [OVS_VSCTL_CLEANUP])
43 # Check br-to-vlan, with --oneline.
44 # (This particular test is interesting with --oneline because it returns
45 # an integer instead of a string and that can cause type mismatches inside
46 # python if not done carefully.)
47 AT_CHECK([RUN_OVS_VSCTL_ONELINE([br-to-vlan $1])], [0], [$3
48 ], [], [OVS_VSCTL_CLEANUP])
50 # Check multiple queries in a single run.
51 AT_CHECK([RUN_OVS_VSCTL_TOGETHER([br-to-parent $1], [br-to-vlan $1])], [0],
54 ], [], [OVS_VSCTL_CLEANUP])])
55 m4_define([CHECK_BRIDGES],
56 [dnl Check that the bridges appear on list-br, without --oneline.
58 [RUN_OVS_VSCTL([list-br])],
60 [m4_foreach([brinfo], [$@], [m4_car(brinfo)
65 dnl Check that the bridges appear on list-br, with --oneline.
67 [RUN_OVS_VSCTL_ONELINE([list-br])],
69 [m4_join([\n], m4_foreach([brinfo], [$@], [m4_car(brinfo),]))
74 dnl Check that each bridge exists according to br-exists and that
75 dnl a bridge that should not exist does not.
76 m4_foreach([brinfo], [$@],
77 [AT_CHECK([RUN_OVS_VSCTL([br-exists m4_car(brinfo)])], [0], [],
78 [], [OVS_VSCTL_CLEANUP])])
79 AT_CHECK([RUN_OVS_VSCTL([br-exists nonexistent])], [2], [], [],
82 dnl Check that each bridge has the expected parent and VLAN.
83 m4_map([_CHECK_BRIDGE], [$@])])
85 dnl CHECK_PORTS(BRIDGE, PORT[, PORT...])
87 dnl Verifies that "ovs-vsctl list-ports BRIDGE" prints the specified
88 dnl list of ports, which must be in alphabetical order. Also checks
89 dnl that "ovs-vsctl port-to-br" reports that each port is
91 m4_define([CHECK_PORTS],
92 [dnl Check ports without --oneline.
94 [RUN_OVS_VSCTL([list-ports $1])],
96 [m4_foreach([port], m4_cdr($@), [port
101 dnl Check ports with --oneline.
103 [RUN_OVS_VSCTL_ONELINE([list-ports $1])],
105 [m4_join([\n], m4_shift($@))
109 AT_CHECK([RUN_OVS_VSCTL([port-to-br $1])], [1], [],
110 [ovs-vsctl: no port named $1
115 [AT_CHECK([RUN_OVS_VSCTL([[port-to-br] port])], [0], [$1
116 ], [], [OVS_VSCTL_CLEANUP])])])
118 dnl CHECK_IFACES(BRIDGE, IFACE[, IFACE...])
120 dnl Verifies that "ovs-vsctl list-ifaces BRIDGE" prints the specified
121 dnl list of ifaces, which must be in alphabetical order. Also checks
122 dnl that "ovs-vsctl iface-to-br" reports that each interface is
124 m4_define([CHECK_IFACES],
126 [RUN_OVS_VSCTL([list-ifaces $1])],
128 [m4_foreach([iface], m4_cdr($@), [iface
132 AT_CHECK([RUN_OVS_VSCTL([iface-to-br $1])], [1], [],
133 [ovs-vsctl: no interface named $1
138 [AT_CHECK([RUN_OVS_VSCTL([[iface-to-br] iface])], [0], [$1
140 [], [OVS_VSCTL_CLEANUP])])])
142 dnl ----------------------------------------------------------------------
143 AT_BANNER([ovs-vsctl unit tests -- real bridges])
146 AT_KEYWORDS([ovs-vsctl])
148 AT_CHECK([RUN_OVS_VSCTL([add-br a])], [0], [], [], [OVS_VSCTL_CLEANUP])
149 CHECK_BRIDGES([a, a, 0])
155 AT_SETUP([add-br a, add-br a])
156 AT_KEYWORDS([ovs-vsctl])
158 AT_CHECK([RUN_OVS_VSCTL([add-br a])], [0], [], [], [OVS_VSCTL_CLEANUP])
159 AT_CHECK([RUN_OVS_VSCTL([add-br a])], [1], [],
160 [ovs-vsctl: cannot create a bridge named a because a bridge named a already exists
161 ], [OVS_VSCTL_CLEANUP])
165 AT_SETUP([add-br a, add-br b])
166 AT_KEYWORDS([ovs-vsctl])
168 AT_CHECK([RUN_OVS_VSCTL([add-br a], [add-br b])], [0], [], [],
170 AT_CHECK([RUN_OVS_VSCTL([--may-exist add-br a b 9])], [1], [],
171 [ovs-vsctl: "--may-exist add-br a b 9" but a is not a VLAN bridge
174 CHECK_BRIDGES([a, a, 0], [b, b, 0])
182 AT_SETUP([add-br a, add-br b, del-br a])
183 AT_KEYWORDS([ovs-vsctl])
185 AT_CHECK([RUN_OVS_VSCTL([add-br a], [add-br b], [del-br a])], [0], [], [],
187 CHECK_BRIDGES([b, b, 0])
193 AT_SETUP([add-br a, add-port a a1, add-port a a2])
194 AT_KEYWORDS([ovs-vsctl])
196 AT_CHECK([RUN_OVS_VSCTL(
198 [--if-exists del-br b],
200 [add-port a a2])], [0], [], [], [OVS_VSCTL_CLEANUP])
201 CHECK_BRIDGES([a, a, 0])
202 CHECK_PORTS([a], [a1], [a2])
203 CHECK_IFACES([a], [a1], [a2])
207 AT_SETUP([add-br a, add-port a a1, add-port a a1])
208 AT_KEYWORDS([ovs-vsctl])
210 AT_CHECK([RUN_OVS_VSCTL(
212 [add-port a a1])], [0], [], [], [OVS_VSCTL_CLEANUP])
213 AT_CHECK([RUN_OVS_VSCTL([add-port a a1])], [1], [],
214 [ovs-vsctl: cannot create a port named a1 because a port named a1 already exists on bridge a
215 ], [OVS_VSCTL_CLEANUP])
219 AT_SETUP([add-br a b, add-port a a1, add-port b b1, del-br a])
220 AT_KEYWORDS([ovs-vsctl])
222 AT_CHECK([RUN_OVS_VSCTL_TOGETHER(
227 [--if-exists del-port b b2],
234 ], [], [OVS_VSCTL_CLEANUP])
235 CHECK_BRIDGES([b, b, 0])
236 CHECK_PORTS([b], [b1])
237 CHECK_IFACES([b], [b1])
241 AT_SETUP([add-br a, add-bond a bond0 a1 a2 a3])
242 AT_KEYWORDS([ovs-vsctl])
244 AT_CHECK([RUN_OVS_VSCTL(
246 [add-bond a bond0 a1 a2 a3])], [0], [], [], [OVS_VSCTL_CLEANUP])
247 AT_CHECK([RUN_OVS_VSCTL([--may-exist add-bond a bond0 a3 a1 a2])], [0], [], [],
249 AT_CHECK([RUN_OVS_VSCTL([--may-exist add-bond a bond0 a2 a1])], [1], [],
250 [ovs-vsctl: "--may-exist add-bond a bond0 a2 a1" but bond0 actually has interface(s) a1, a2, a3
253 CHECK_BRIDGES([a, a, 0])
254 CHECK_PORTS([a], [bond0])
255 CHECK_IFACES([a], [a1], [a2], [a3])
259 AT_SETUP([add-br a b, add-port a a1, add-port b b1, del-port a a1])
260 AT_KEYWORDS([ovs-vsctl])
262 AT_CHECK([RUN_OVS_VSCTL(
266 [--may-exist add-port b b1],
267 [del-port a a1])], [0], [], [], [OVS_VSCTL_CLEANUP])
268 AT_CHECK([RUN_OVS_VSCTL([--may-exist add-port b b1])], [0], [], [],
270 AT_CHECK([RUN_OVS_VSCTL([--may-exist add-port a b1])], [1], [],
271 [ovs-vsctl: "--may-exist add-port a b1" but b1 is actually attached to bridge b
274 CHECK_BRIDGES([a, a, 0], [b, b, 0])
277 CHECK_PORTS([b], [b1])
278 CHECK_IFACES([b], [b1])
282 AT_SETUP([add-br a, add-bond a bond0 a1 a2 a3, del-port bond0])
283 AT_KEYWORDS([ovs-vsctl])
285 AT_CHECK([RUN_OVS_VSCTL_TOGETHER(
287 [add-bond a bond0 a1 a2 a3],
288 [del-port bond0])], [0], [
291 ], [], [OVS_VSCTL_CLEANUP])
292 CHECK_BRIDGES([a, a, 0])
297 AT_SETUP([external IDs])
298 AT_KEYWORDS([ovs-vsctl])
300 AT_CHECK([RUN_OVS_VSCTL_TOGETHER(
303 [add-bond a bond0 a2 a3],
304 [br-set-external-id a key0 value0],
305 [set port a1 external-ids:key1=value1],
306 [set interface a2 external-ids:key2=value2],
307 [set interface a2 external-ids:key3=value3],
308 [set interface a3 external-ids:key4=value4],
309 [br-get-external-id a],
310 [br-get-external-id a key0],
311 [br-get-external-id a key1],
312 [br-set-external-id a key0 othervalue],
313 [br-get-external-id a],
314 [br-set-external-id a key0],
315 [br-get-external-id a],
316 [get port a1 external-ids],
317 [get interface a2 external-ids],
318 [get interface a3 external-ids])], [0], [
334 {"key2"="value2", "key3"="value3"}
336 ], [], [OVS_VSCTL_CLEANUP])
337 AT_CHECK([RUN_OVS_VSCTL_TOGETHER(
338 [br-get-external-id a],
339 [get port a1 external-ids],
340 [get interface a2 external-ids],
341 [get interface a3 external-ids])], [0],
344 {"key2"="value2", "key3"="value3"}
346 ], [], [OVS_VSCTL_CLEANUP])
347 CHECK_BRIDGES([a, a, 0])
348 CHECK_PORTS([a], [a1], [bond0])
349 CHECK_IFACES([a], [a1], [a2], [a3])
353 dnl ----------------------------------------------------------------------
354 AT_BANNER([ovs-vsctl unit tests -- fake bridges])
356 m4_define([OVS_VSCTL_SETUP_SIMPLE_FAKE_CONF],
360 [--may-exist add-br xenbr0],
361 [add-port xenbr0 eth0],
362 [--may-exist add-port xenbr0 eth0],
363 [add-br xapi1 xenbr0 9],
364 [--may-exist add-br xapi1 xenbr0 9],
365 [add-port xapi1 eth0.9])],
366 [0], [], [], [OVS_VSCTL_CLEANUP])])
368 AT_SETUP([simple fake bridge])
369 AT_KEYWORDS([ovs-vsctl fake-bridge])
371 OVS_VSCTL_SETUP_SIMPLE_FAKE_CONF
372 AT_CHECK([RUN_OVS_VSCTL([--may-exist add-br xapi1])], [1], [],
373 [ovs-vsctl: "--may-exist add-br xapi1" but xapi1 is a VLAN bridge for VLAN 9
374 ], [OVS_VSCTL_CLEANUP])
375 AT_CHECK([RUN_OVS_VSCTL([--may-exist add-br xapi1 xxx 9])], [1], [],
376 [ovs-vsctl: "--may-exist add-br xapi1 xxx 9" but xapi1 has the wrong parent xenbr0
377 ], [OVS_VSCTL_CLEANUP])
378 AT_CHECK([RUN_OVS_VSCTL([--may-exist add-br xapi1 xenbr0 10])], [1], [],
379 [ovs-vsctl: "--may-exist add-br xapi1 xenbr0 10" but xapi1 is a VLAN bridge for the wrong VLAN 9
380 ], [OVS_VSCTL_CLEANUP])
381 CHECK_BRIDGES([xapi1, xenbr0, 9], [xenbr0, xenbr0, 0])
382 CHECK_PORTS([xenbr0], [eth0])
383 CHECK_IFACES([xenbr0], [eth0])
384 CHECK_PORTS([xapi1], [eth0.9])
385 CHECK_IFACES([xapi1], [eth0.9])
389 AT_SETUP([simple fake bridge + del-br fake bridge])
390 AT_KEYWORDS([ovs-vsctl fake-bridge])
392 OVS_VSCTL_SETUP_SIMPLE_FAKE_CONF
393 AT_CHECK([RUN_OVS_VSCTL([del-br xapi1])], [0], [], [], [OVS_VSCTL_CLEANUP])
394 CHECK_BRIDGES([xenbr0, xenbr0, 0])
395 CHECK_PORTS([xenbr0], [eth0])
396 CHECK_IFACES([xenbr0], [eth0])
400 AT_SETUP([simple fake bridge + del-br real bridge])
401 AT_KEYWORDS([ovs-vsctl fake-bridge])
403 OVS_VSCTL_SETUP_SIMPLE_FAKE_CONF
404 AT_CHECK([RUN_OVS_VSCTL([del-br xenbr0])], [0], [], [], [OVS_VSCTL_CLEANUP])
409 AT_SETUP([simple fake bridge + external IDs])
410 AT_KEYWORDS([ovs-vsctl fake-bridge])
412 OVS_VSCTL_SETUP_SIMPLE_FAKE_CONF
413 AT_CHECK([RUN_OVS_VSCTL_TOGETHER(
414 [br-set-external-id xenbr0 key0 value0],
415 [br-set-external-id xapi1 key1 value1],
416 [br-get-external-id xenbr0],
417 [br-get-external-id xenbr0 key0],
418 [br-get-external-id xapi1],
419 [br-get-external-id xapi1 key1])], [0], [
425 ], [], [OVS_VSCTL_CLEANUP])
426 CHECK_BRIDGES([xapi1, xenbr0, 9], [xenbr0, xenbr0, 0])
427 CHECK_PORTS([xenbr0], [eth0])
428 CHECK_IFACES([xenbr0], [eth0])
429 CHECK_PORTS([xapi1], [eth0.9])
430 CHECK_IFACES([xapi1], [eth0.9])
434 m4_define([OVS_VSCTL_SETUP_BOND_FAKE_CONF],
438 [add-bond xapi1 bond0 eth0 eth1],
439 [add-br xapi2 xapi1 11],
440 [add-port xapi2 bond0.11])],
441 [0], [], [], [OVS_VSCTL_CLEANUP])])
443 AT_SETUP([fake bridge on bond])
444 AT_KEYWORDS([ovs-vsctl fake-bridge])
446 OVS_VSCTL_SETUP_BOND_FAKE_CONF
447 CHECK_BRIDGES([xapi1, xapi1, 0], [xapi2, xapi1, 11])
448 CHECK_PORTS([xapi1], [bond0])
449 CHECK_IFACES([xapi1], [eth0], [eth1])
450 CHECK_PORTS([xapi2], [bond0.11])
451 CHECK_IFACES([xapi2], [bond0.11])
455 AT_SETUP([fake bridge on bond + del-br fake bridge])
456 AT_KEYWORDS([ovs-vsctl fake-bridge])
458 OVS_VSCTL_SETUP_BOND_FAKE_CONF
459 AT_CHECK([RUN_OVS_VSCTL_ONELINE([del-br xapi2])], [0], [
460 ], [], [OVS_VSCTL_CLEANUP])
461 CHECK_BRIDGES([xapi1, xapi1, 0])
462 CHECK_PORTS([xapi1], [bond0])
463 CHECK_IFACES([xapi1], [eth0], [eth1])
467 AT_SETUP([fake bridge on bond + del-br real bridge])
468 AT_KEYWORDS([ovs-vsctl fake-bridge])
470 OVS_VSCTL_SETUP_BOND_FAKE_CONF
471 AT_CHECK([RUN_OVS_VSCTL([del-br xapi1])])
476 dnl ----------------------------------------------------------------------
477 AT_BANNER([ovs-vsctl unit tests -- database commands])
479 AT_SETUP([database commands -- positive checks])
480 AT_KEYWORDS([ovs-vsctl])
482 AT_CHECK([RUN_OVS_VSCTL([create b name=br0])],
483 [0], [stdout], [], [OVS_VSCTL_CLEANUP])
485 AT_CHECK([RUN_OVS_VSCTL([list b])],
486 [0], [stdout], [], [OVS_VSCTL_CLEANUP])
488 AT_CHECK([perl $srcdir/uuidfilt.pl out1 out2], [0],
502 ]], [ignore], [test ! -e pid || kill `cat pid`])
506 'other_config:datapath_id="0123456789ab"' \
507 'other_config:hwaddr="00:11:22:33:44:55"' \
508 'external-ids={"xs-network-uuids"="9c45f225-a7cf-439d-976d-83db6271fda1"}' -- \
509 add bridge br0 external_ids '"xs-network-names"="local; remote; cloud"'])],
510 [0], [], [], [OVS_VSCTL_CLEANUP])
511 AT_CHECK([RUN_OVS_VSCTL_ONELINE([get bridge br0 other_config external-ids])],
512 [0], [{datapath_id="0123456789ab", hwaddr="00:11:22:33:44:55"}\n{xs-network-names="local; remote; cloud", xs-network-uuids="9c45f225-a7cf-439d-976d-83db6271fda1"}
513 ], [], [OVS_VSCTL_CLEANUP])
514 AT_CHECK([RUN_OVS_VSCTL([get bridge br0 other_config:hwaddr -- --if-exists get bridge br0 other-config:nonexistent])],
515 [0], ["00:11:22:33:44:55"
517 ], [], [OVS_VSCTL_CLEANUP])
518 AT_CHECK([RUN_OVS_VSCTL([remove br br0 other_config hwaddr 'datapath_id=""' -- get br br0 other_config])],
519 [0], [{datapath_id="0123456789ab"}
520 ], [], [OVS_VSCTL_CLEANUP])
521 AT_CHECK([RUN_OVS_VSCTL([remove br br0 other_config 'datapath_id="0123456789ab"' -- get br br0 other_config])],
523 ], [], [OVS_VSCTL_CLEANUP])
524 AT_CHECK([RUN_OVS_VSCTL([clear br br0 external-ids -- get br br0 external_ids])],
526 ], [], [OVS_VSCTL_CLEANUP])
527 AT_CHECK([RUN_OVS_VSCTL([destroy b br0])],
528 [0], [stdout], [], [OVS_VSCTL_CLEANUP])
529 AT_CHECK([RUN_OVS_VSCTL([list b])],
530 [0], [], [], [OVS_VSCTL_CLEANUP])
534 AT_SETUP([database commands -- negative checks])
535 AT_KEYWORDS([ovs-vsctl])
537 AT_CHECK([RUN_OVS_VSCTL([create b name=br0])],
538 [0], [ignore], [], [OVS_VSCTL_CLEANUP])
539 AT_CHECK([RUN_OVS_VSCTL([add-br br1])],
540 [0], [ignore], [], [OVS_VSCTL_CLEANUP])
541 AT_CHECK([RUN_OVS_VSCTL([set-controller br1 tcp:127.0.0.1])],
542 [0], [ignore], [], [OVS_VSCTL_CLEANUP])
543 AT_CHECK([RUN_OVS_VSCTL([create n targets='"1.2.3.4:567"'])],
544 [0], [stdout], [], [OVS_VSCTL_CLEANUP])
545 cp stdout netflow-uuid
546 AT_CHECK([RUN_OVS_VSCTL([list n `cat netflow-uuid`])],
547 [0], [stdout], [], [OVS_VSCTL_CLEANUP])
548 AT_CHECK([perl $srcdir/uuidfilt.pl netflow-uuid stdout], [0],
552 add_id_to_interface : false
555 targets : ["1.2.3.4:567"]
556 ]], [ignore], [test ! -e pid || kill `cat pid`])
557 AT_CHECK([RUN_OVS_VSCTL([list interx x])],
558 [1], [], [ovs-vsctl: unknown table "interx"
559 ], [OVS_VSCTL_CLEANUP])
560 AT_CHECK([RUN_OVS_VSCTL([list b x])],
561 [1], [], [ovs-vsctl: no row "x" in table Bridge
562 ], [OVS_VSCTL_CLEANUP])
563 AT_CHECK([RUN_OVS_VSCTL([list b br])],
564 [1], [], [ovs-vsctl: multiple rows in Bridge match "br"
565 ], [OVS_VSCTL_CLEANUP])
566 AT_CHECK([RUN_OVS_VSCTL([get b br0 d])],
567 [1], [], [ovs-vsctl: Bridge contains more than one column whose name matches "d"
568 ], [OVS_VSCTL_CLEANUP])
569 AT_CHECK([RUN_OVS_VSCTL([get b br0 x])],
570 [1], [], [ovs-vsctl: Bridge does not contain a column whose name matches "x"
571 ], [OVS_VSCTL_CLEANUP])
572 AT_CHECK([RUN_OVS_VSCTL([get b br0 :y=z])],
573 [1], [], [ovs-vsctl: :y=z: missing column name
574 ], [OVS_VSCTL_CLEANUP])
575 AT_CHECK([RUN_OVS_VSCTL([get b br0 datapath_id:y=z])],
576 [1], [], [ovs-vsctl: datapath_id:y=z: value not accepted here
577 ], [OVS_VSCTL_CLEANUP])
578 AT_CHECK([RUN_OVS_VSCTL([get b br0 datapath_id::])],
579 [1], [], [ovs-vsctl: datapath_id::: trailing garbage ":" in argument
580 ], [OVS_VSCTL_CLEANUP])
581 AT_CHECK([RUN_OVS_VSCTL([get b br0 datapath_id:x])],
582 [1], [], [ovs-vsctl: cannot specify key to get for non-map column datapath_id
583 ], [OVS_VSCTL_CLEANUP])
584 AT_CHECK([RUN_OVS_VSCTL([get b br0 external_ids:x])],
585 [1], [], [ovs-vsctl: no key "x" in Bridge record "br0" column external_ids
586 ], [OVS_VSCTL_CLEANUP])
587 AT_CHECK([RUN_OVS_VSCTL([set b br0 flood_vlans=-1])],
588 [1], [], [ovs-vsctl: constraint violation: -1 is not in the valid range 0 to 4095 (inclusive)
589 ], [OVS_VSCTL_CLEANUP])
590 AT_CHECK([RUN_OVS_VSCTL([set b br0 flood_vlans=4096])],
591 [1], [], [ovs-vsctl: constraint violation: 4096 is not in the valid range 0 to 4095 (inclusive)
592 ], [OVS_VSCTL_CLEANUP])
593 if test "$HAVE_PCRE" = yes; then
594 AT_CHECK([RUN_OVS_VSCTL([set c br1 'connection-mode=xyz'])],
595 [1], [], [ovs-vsctl: constraint violation: "xyz" is not a either "in-band" or "out-of-band"
596 ], [OVS_VSCTL_CLEANUP])
598 AT_CHECK([RUN_OVS_VSCTL([set c br1 'connection-mode=xyz'])],
599 [0], [], [], [OVS_VSCTL_CLEANUP])
601 AT_CHECK([RUN_OVS_VSCTL([set c br1 connection-mode:x=y])],
602 [1], [], [ovs-vsctl: cannot specify key to set for non-map column connection_mode
603 ], [OVS_VSCTL_CLEANUP])
604 AT_CHECK([RUN_OVS_VSCTL([add b br1 datapath_id x y])],
605 [1], [], [ovs-vsctl: "add" operation would put 2 values in column datapath_id of table Bridge but the maximum number is 1
606 ], [OVS_VSCTL_CLEANUP])
607 AT_CHECK([RUN_OVS_VSCTL([remove n `cat netflow-uuid` targets '"1.2.3.4:567"'])],
608 [1], [], [ovs-vsctl: "remove" operation would put 0 values in column targets of table NetFlow but the minimun number is 1
609 ], [OVS_VSCTL_CLEANUP])
610 AT_CHECK([RUN_OVS_VSCTL([clear n `cat netflow-uuid` targets])],
611 [1], [], [ovs-vsctl: "clear" operation cannot be applied to column targets of table NetFlow, which is not allowed to be empty
612 ], [OVS_VSCTL_CLEANUP])
613 AT_CHECK([RUN_OVS_VSCTL([destroy b br2])],
614 [1], [], [ovs-vsctl: no row "br2" in table Bridge
615 ], [OVS_VSCTL_CLEANUP])
619 dnl This test really shows a bug -- "create" followed by "list" in
620 dnl the same execution shows the wrong UUID on the "list" command.
621 dnl The bug is documented in ovs-vsctl.8.
622 AT_SETUP([created row UUID is wrong in same execution])
623 AT_KEYWORDS([ovs-vsctl])
625 AT_CHECK([RUN_OVS_VSCTL([create Bridge name=br0 -- list b])],
626 [0], [stdout], [], [OVS_VSCTL_CLEANUP])
627 AT_CHECK([perl $srcdir/uuidfilt.pl stdout], [0],
641 ]], [ignore], [test ! -e pid || kill `cat pid`])