1 AT_BANNER([OVSDB -- interface description language (IDL)])
3 OVS_RUNDIR=`pwd`; export OVS_RUNDIR
4 # OVSDB_CHECK_IDL_C(TITLE, [PRE-IDL-TXN], TRANSACTIONS, OUTPUT, [KEYWORDS],
7 # Creates a database with a schema derived from idltest.ovsidl, runs
8 # each PRE-IDL-TXN (if any), starts an ovsdb-server on that database,
9 # and runs "test-ovsdb idl" passing each of the TRANSACTIONS along.
11 # Checks that the overall output is OUTPUT. Before comparison, the
12 # output is sorted (using "sort") and UUIDs in the output are replaced
13 # by markers of the form <N> where N is a number. The first unique
14 # UUID is replaced by <0>, the next by <1>, and so on. If a given
15 # UUID appears more than once it is always replaced by the same
16 # marker. If FILTER is supplied then the output is also filtered
17 # through the specified program.
19 # TITLE is provided to AT_SETUP and KEYWORDS to AT_KEYWORDS.
20 m4_define([OVSDB_CHECK_IDL_C],
22 AT_KEYWORDS([ovsdb server idl positive $5])
23 OVS_RUNDIR=`pwd`; export OVS_RUNDIR
24 AT_CHECK([ovsdb-tool create db $abs_srcdir/idltest.ovsschema],
25 [0], [stdout], [ignore])
26 AT_CHECK([ovsdb-server '-vPATTERN:console:ovsdb-server|%c|%m' --detach --no-chdir --pidfile="`pwd`"/pid --remote=punix:socket --unixctl="`pwd`"/unixctl db], [0], [ignore], [ignore])
28 [AT_CHECK([ovsdb-client transact unix:socket $2], [0], [ignore], [ignore], [kill `cat pid`])])
29 AT_CHECK([test-ovsdb '-vPATTERN:console:test-ovsdb|%c|%m' -vjsonrpc -t10 idl unix:socket $3],
30 [0], [stdout], [ignore], [kill `cat pid`])
31 AT_CHECK([sort stdout | ${PERL} $srcdir/uuidfilt.pl]m4_if([$6],,, [[| $6]]),
32 [0], [$4], [], [kill `cat pid`])
36 # same as OVSDB_CHECK_IDL but uses the Python IDL implementation.
37 m4_define([OVSDB_CHECK_IDL_PY],
38 [AT_SETUP([$1 - Python])
39 AT_SKIP_IF([test $HAVE_PYTHON = no])
40 AT_KEYWORDS([ovsdb server idl positive Python $5])
41 OVS_RUNDIR=`pwd`; export OVS_RUNDIR
42 AT_CHECK([ovsdb-tool create db $abs_srcdir/idltest.ovsschema],
43 [0], [stdout], [ignore])
44 AT_CHECK([ovsdb-server '-vPATTERN:console:ovsdb-server|%c|%m' --detach --no-chdir --pidfile="`pwd`"/pid --remote=punix:socket --unixctl="`pwd`"/unixctl db], [0], [ignore], [ignore])
46 [AT_CHECK([ovsdb-client transact unix:socket $2], [0], [ignore], [ignore], [kill `cat pid`])])
47 AT_CHECK([$PYTHON $srcdir/test-ovsdb.py -t10 idl $srcdir/idltest.ovsschema unix:socket $3],
48 [0], [stdout], [ignore], [kill `cat pid`])
49 AT_CHECK([sort stdout | ${PERL} $srcdir/uuidfilt.pl]m4_if([$6],,, [[| $6]]),
50 [0], [$4], [], [kill `cat pid`])
54 # same as OVSDB_CHECK_IDL but uses the Python IDL implementation with tcp
55 m4_define([OVSDB_CHECK_IDL_TCP_PY],
56 [AT_SETUP([$1 - Python tcp])
57 AT_SKIP_IF([test $HAVE_PYTHON = no])
58 AT_KEYWORDS([ovsdb server idl positive Python with tcp socket $5])
59 OVS_RUNDIR=`pwd`; export OVS_RUNDIR
60 OVS_LOGDIR=`pwd`; export OVS_LOGDIR
61 AT_CHECK([ovsdb-tool create db $abs_srcdir/idltest.ovsschema],
62 [0], [stdout], [ignore])
63 AT_CHECK([ovsdb-server --log-file '-vPATTERN:console:ovsdb-server|%c|%m' --detach --no-chdir --pidfile="`pwd`"/pid --remote=punix:socket --remote=ptcp:0:127.0.0.1 --unixctl="`pwd`"/unixctl db], [0], [ignore], [ignore])
64 TCP_PORT=`parse_listening_port < ovsdb-server.log`
67 [AT_CHECK([ovsdb-client transact tcp:127.0.0.1:$TCP_PORT $2], [0], [ignore], [ignore], [kill `cat pid`])])
68 AT_CHECK([$PYTHON $srcdir/test-ovsdb.py -t10 idl $srcdir/idltest.ovsschema tcp:127.0.0.1:$TCP_PORT $3],
69 [0], [stdout], [ignore], [kill `cat pid`])
70 AT_CHECK([sort stdout | ${PERL} $srcdir/uuidfilt.pl]m4_if([$6],,, [[| $6]]),
71 [0], [$4], [], [kill `cat pid`])
75 # same as OVSDB_CHECK_IDL but uses the Python IDL implementation with tcp6
76 m4_define([OVSDB_CHECK_IDL_TCP6_PY],
77 [AT_SETUP([$1 - Python tcp6])
78 AT_SKIP_IF([test $HAVE_PYTHON = no])
79 AT_SKIP_IF([test $HAVE_IPV6 = no])
80 AT_KEYWORDS([ovsdb server idl positive Python with tcp6 socket $5])
81 OVS_RUNDIR=`pwd`; export OVS_RUNDIR
82 OVS_LOGDIR=`pwd`; export OVS_LOGDIR
83 AT_CHECK([ovsdb-tool create db $abs_srcdir/idltest.ovsschema],
84 [0], [stdout], [ignore])
85 AT_CHECK([ovsdb-server --log-file '-vPATTERN:console:ovsdb-server|%c|%m' --detach --no-chdir --pidfile="`pwd`"/pid --remote=ptcp:0:[[::1]] --unixctl="`pwd`"/unixctl db], [0], [ignore], [ignore])
86 TCP_PORT=`parse_listening_port < ovsdb-server.log`
87 echo "TCP_PORT=$TCP_PORT"
90 [AT_CHECK([ovsdb-client transact "tcp:[[::1]]:$TCP_PORT" $2], [0], [ignore], [ignore], [kill `cat pid`])])
91 AT_CHECK([$PYTHON $srcdir/test-ovsdb.py -t10 idl $srcdir/idltest.ovsschema tcp:[[::1]]:$TCP_PORT $3],
92 [0], [stdout], [ignore], [kill `cat pid`])
93 AT_CHECK([sort stdout | ${PERL} $srcdir/uuidfilt.pl]m4_if([$6],,, [[| $6]]),
94 [0], [$4], [], [kill `cat pid`])
98 m4_define([OVSDB_CHECK_IDL],
99 [OVSDB_CHECK_IDL_C($@)
100 OVSDB_CHECK_IDL_PY($@)
101 OVSDB_CHECK_IDL_TCP_PY($@)
102 OVSDB_CHECK_IDL_TCP6_PY($@)])
104 OVSDB_CHECK_IDL([simple idl, initially empty, no ops],
111 OVSDB_CHECK_IDL([simple idl, initially empty, various ops],
120 "u": ["uuid", "84f5c8f5-ac76-4dbc-a24f-8860eb407fc1"],
121 "ia": ["set", [1, 2, 3]],
122 "ra": ["set", [-0.5]],
123 "ba": ["set", [true]],
124 "sa": ["set", ["abc", "def"]],
125 "ua": ["set", [["uuid", "69443985-7806-45e2-b35f-574a04e720f9"],
126 ["uuid", "aad11ef0-816a-4b01-93e6-03b8b4256b98"]]]}},
134 "row": {"b": true}}]' \
139 "row": {"r": 123.5}}]' \
148 "ra": ["set", [1.5]],
149 "ba": ["set", [false]],
151 "ua": ["set", []]}}]' \
155 "where": [["i", "<", 1]],
156 "row": {"s": "newstring"}}]' \
160 "where": [["i", "==", 0]]}]' \
163 001: {"error":null,"result":[{"uuid":["uuid","<0>"]},{"uuid":["uuid","<1>"]}]}
164 002: i=0 r=0 b=false s= u=<2> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<1>
165 002: i=1 r=2 b=true s=mystring u=<3> ia=[1 2 3] ra=[-0.5] ba=[true] sa=[abc def] ua=[<4> <5>] uuid=<0>
166 003: {"error":null,"result":[{"count":2}]}
167 004: i=0 r=0 b=true s= u=<2> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<1>
168 004: i=1 r=2 b=true s=mystring u=<3> ia=[1 2 3] ra=[-0.5] ba=[true] sa=[abc def] ua=[<4> <5>] uuid=<0>
169 005: {"error":null,"result":[{"count":2}]}
170 006: i=0 r=123.5 b=true s= u=<2> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<1>
171 006: i=1 r=123.5 b=true s=mystring u=<3> ia=[1 2 3] ra=[-0.5] ba=[true] sa=[abc def] ua=[<4> <5>] uuid=<0>
172 007: {"error":null,"result":[{"uuid":["uuid","<6>"]}]}
173 008: i=-1 r=125 b=false s= u=<2> ia=[1] ra=[1.5] ba=[false] sa=[] ua=[] uuid=<6>
174 008: i=0 r=123.5 b=true s= u=<2> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<1>
175 008: i=1 r=123.5 b=true s=mystring u=<3> ia=[1 2 3] ra=[-0.5] ba=[true] sa=[abc def] ua=[<4> <5>] uuid=<0>
176 009: {"error":null,"result":[{"count":2}]}
177 010: i=-1 r=125 b=false s=newstring u=<2> ia=[1] ra=[1.5] ba=[false] sa=[] ua=[] uuid=<6>
178 010: i=0 r=123.5 b=true s=newstring u=<2> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<1>
179 010: i=1 r=123.5 b=true s=mystring u=<3> ia=[1 2 3] ra=[-0.5] ba=[true] sa=[abc def] ua=[<4> <5>] uuid=<0>
180 011: {"error":null,"result":[{"count":1}]}
181 012: i=-1 r=125 b=false s=newstring u=<2> ia=[1] ra=[1.5] ba=[false] sa=[] ua=[] uuid=<6>
182 012: i=1 r=123.5 b=true s=mystring u=<3> ia=[1 2 3] ra=[-0.5] ba=[true] sa=[abc def] ua=[<4> <5>] uuid=<0>
184 014: i=-1 r=125 b=false s=newstring u=<2> ia=[1] ra=[1.5] ba=[false] sa=[] ua=[] uuid=<6>
185 014: i=1 r=123.5 b=true s=mystring u=<3> ia=[1 2 3] ra=[-0.5] ba=[true] sa=[abc def] ua=[<4> <5>] uuid=<0>
189 OVSDB_CHECK_IDL([simple idl, initially populated],
197 "u": ["uuid", "84f5c8f5-ac76-4dbc-a24f-8860eb407fc1"],
198 "ia": ["set", [1, 2, 3]],
199 "ra": ["set", [-0.5]],
200 "ba": ["set", [true]],
201 "sa": ["set", ["abc", "def"]],
202 "ua": ["set", [["uuid", "69443985-7806-45e2-b35f-574a04e720f9"],
203 ["uuid", "aad11ef0-816a-4b01-93e6-03b8b4256b98"]]]}},
211 "row": {"b": true}}]']],
212 [[000: i=0 r=0 b=false s= u=<0> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<1>
213 000: i=1 r=2 b=true s=mystring u=<2> ia=[1 2 3] ra=[-0.5] ba=[true] sa=[abc def] ua=[<3> <4>] uuid=<5>
214 001: {"error":null,"result":[{"count":2}]}
215 002: i=0 r=0 b=true s= u=<0> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<1>
216 002: i=1 r=2 b=true s=mystring u=<2> ia=[1 2 3] ra=[-0.5] ba=[true] sa=[abc def] ua=[<3> <4>] uuid=<5>
220 OVSDB_CHECK_IDL([simple idl, writing via IDL],
228 "u": ["uuid", "84f5c8f5-ac76-4dbc-a24f-8860eb407fc1"],
229 "ia": ["set", [1, 2, 3]],
230 "ra": ["set", [-0.5]],
231 "ba": ["set", [true]],
232 "sa": ["set", ["abc", "def"]],
233 "ua": ["set", [["uuid", "69443985-7806-45e2-b35f-574a04e720f9"],
234 ["uuid", "aad11ef0-816a-4b01-93e6-03b8b4256b98"]]]}},
238 [['verify 0 b, verify 1 r, set 0 b 1, set 1 r 3.5' \
239 'insert 2, verify 2 i, verify 1 b, delete 1']],
240 [[000: i=0 r=0 b=false s= u=<0> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<1>
241 000: i=1 r=2 b=true s=mystring u=<2> ia=[1 2 3] ra=[-0.5] ba=[true] sa=[abc def] ua=[<3> <4>] uuid=<5>
242 001: commit, status=success
243 002: i=0 r=0 b=true s= u=<0> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<1>
244 002: i=1 r=3.5 b=true s=mystring u=<2> ia=[1 2 3] ra=[-0.5] ba=[true] sa=[abc def] ua=[<3> <4>] uuid=<5>
245 003: commit, status=success
246 004: i=0 r=0 b=true s= u=<0> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<1>
247 004: i=2 r=0 b=false s= u=<0> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<6>
251 OVSDB_CHECK_IDL([simple idl, handling verification failure],
264 "where": [["i", "==", 1]],
265 "row": {"r": 5.0}}]' \
266 '+verify 1 r, set 1 r 3' \
267 'verify 1 r, set 1 r 3' \
269 [[000: i=0 r=0 b=false s= u=<0> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<1>
270 000: i=1 r=2 b=false s= u=<0> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<2>
271 001: commit, status=success
272 002: {"error":null,"result":[{"count":1}]}
273 003: commit, status=try again
274 004: i=0 r=0 b=true s= u=<0> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<1>
275 004: i=1 r=5 b=false s= u=<0> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<2>
276 005: commit, status=success
277 006: i=0 r=0 b=true s= u=<0> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<1>
278 006: i=1 r=3 b=false s= u=<0> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<2>
282 OVSDB_CHECK_IDL([simple idl, increment operation],
287 [['set 0 r 2.0, increment 0']],
288 [[000: i=0 r=0 b=false s= u=<0> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<1>
289 001: commit, status=success, increment=1
290 002: i=1 r=2 b=false s= u=<0> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<1>
294 OVSDB_CHECK_IDL([simple idl, aborting],
299 [['set 0 r 2.0, abort' \
301 [[000: i=0 r=0 b=false s= u=<0> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<1>
302 001: commit, status=aborted
303 002: commit, status=success
304 003: i=0 r=0 b=true s= u=<0> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<1>
308 OVSDB_CHECK_IDL([simple idl, destroy without commit or abort],
313 [['set 0 r 2.0, destroy' \
315 [[000: i=0 r=0 b=false s= u=<0> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<1>
317 002: commit, status=success
318 003: i=0 r=0 b=true s= u=<0> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<1>
322 OVSDB_CHECK_IDL([self-linking idl, consistent ops],
327 "row": {"i": 0, "k": ["named-uuid", "self"]},
328 "uuid-name": "self"}]' \
332 "row": {"i": 1, "k": ["named-uuid", "row2"]},
333 "uuid-name": "row1"},
336 "row": {"i": 2, "k": ["named-uuid", "row1"]},
337 "uuid-name": "row2"}]' \
341 "where": [["i", "==", 1]],
342 "row": {"k": ["uuid", "#1#"]}}]' \
347 "row": {"k": ["uuid", "#0#"]}}]']],
349 001: {"error":null,"result":[{"uuid":["uuid","<0>"]}]}
350 002: i=0 k=0 ka=[] l2= uuid=<0>
351 003: {"error":null,"result":[{"uuid":["uuid","<1>"]},{"uuid":["uuid","<2>"]}]}
352 004: i=0 k=0 ka=[] l2= uuid=<0>
353 004: i=1 k=2 ka=[] l2= uuid=<1>
354 004: i=2 k=1 ka=[] l2= uuid=<2>
355 005: {"error":null,"result":[{"count":1}]}
356 006: i=0 k=0 ka=[] l2= uuid=<0>
357 006: i=1 k=1 ka=[] l2= uuid=<1>
358 006: i=2 k=1 ka=[] l2= uuid=<2>
359 007: {"error":null,"result":[{"count":3}]}
360 008: i=0 k=0 ka=[] l2= uuid=<0>
361 008: i=1 k=0 ka=[] l2= uuid=<1>
362 008: i=2 k=0 ka=[] l2= uuid=<2>
366 OVSDB_CHECK_IDL([self-linking idl, inconsistent ops],
371 "row": {"i": 0, "k": ["uuid", "cf197cc5-c8c9-42f5-82d5-c71a9f2cb96b"]}}]' \
376 "row": {"i": 1, "k": ["named-uuid", "one"]}},
379 "row": {"i": 2, "k": ["named-uuid", "one"]}}]' \
384 "row": {"k": ["uuid", "c2fca39a-e69a-42a4-9c56-5eca85839ce9"]}}]' \
388 "where": [["_uuid", "==", ["uuid", "#1#"]]]}]' \
392 "where": [["_uuid", "==", ["uuid", "#2#"]]]}]' \
399 001: {"error":null,"result":[{"uuid":["uuid","<0>"]},{"details":"Table link1 column k row <0> references nonexistent row <1> in table link1.","error":"referential integrity violation"}]}
400 002: {"error":null,"result":[{"uuid":["uuid","<2>"]},{"uuid":["uuid","<3>"]}]}
401 003: i=1 k=1 ka=[] l2= uuid=<2>
402 003: i=2 k=1 ka=[] l2= uuid=<3>
403 004: {"error":null,"result":[{"count":2},{"details":"Table link1 column k row <x> references nonexistent row <4> in table link1.","error":"referential integrity violation"}]}
404 005: {"error":null,"result":[{"count":1},{"details":"cannot delete link1 row <2> because of 1 remaining reference(s)","error":"referential integrity violation"}]}
405 006: {"error":null,"result":[{"count":1}]}
406 007: i=1 k=1 ka=[] l2= uuid=<2>
407 008: {"error":null,"result":[{"count":1}]}
412 [[sed -e '/004:/s/row <[23]> references/row <x> references/']])
414 OVSDB_CHECK_IDL([self-linking idl, sets],
419 "row": {"i": 0, "k": ["named-uuid", "i0"], "ka": ["set", [["named-uuid", "i0"]]]},
423 "row": {"i": 1, "k": ["named-uuid", "i0"], "ka": ["set", [["named-uuid", "i1"]]]},
427 "row": {"i": 2, "k": ["named-uuid", "i0"], "ka": ["set", [["named-uuid", "i2"]]]},
431 "row": {"i": 3, "k": ["named-uuid", "i0"], "ka": ["set", [["named-uuid", "i3"]]]},
432 "uuid-name": "i3"}]' \
437 "row": {"ka": ["set", [["uuid", "#0#"], ["uuid", "#1#"], ["uuid", "#2#"], ["uuid", "#3#"]]]}}]' \
441 "where": [["i", "==", 2]],
442 "row": {"ka": ["set", [["uuid", "#0#"], ["uuid", "88702e78-845b-4a6e-ad08-cf68922ae84a"], ["uuid", "#2#"]]]}}]' \
448 001: {"error":null,"result":[{"uuid":["uuid","<0>"]},{"uuid":["uuid","<1>"]},{"uuid":["uuid","<2>"]},{"uuid":["uuid","<3>"]}]}
449 002: i=0 k=0 ka=[0] l2= uuid=<0>
450 002: i=1 k=0 ka=[1] l2= uuid=<1>
451 002: i=2 k=0 ka=[2] l2= uuid=<2>
452 002: i=3 k=0 ka=[3] l2= uuid=<3>
453 003: {"error":null,"result":[{"count":4}]}
454 004: i=0 k=0 ka=[0 1 2 3] l2= uuid=<0>
455 004: i=1 k=0 ka=[0 1 2 3] l2= uuid=<1>
456 004: i=2 k=0 ka=[0 1 2 3] l2= uuid=<2>
457 004: i=3 k=0 ka=[0 1 2 3] l2= uuid=<3>
458 005: {"error":null,"result":[{"count":1},{"details":"Table link1 column ka row <2> references nonexistent row <4> in table link1.","error":"referential integrity violation"}]}
459 006: {"error":null,"result":[{"count":4}]}
464 OVSDB_CHECK_IDL([external-linking idl, consistent ops],
470 "uuid-name": "row0"},
473 "row": {"i": 1, "k": ["named-uuid", "row1"], "l2": ["set", [["named-uuid", "row0"]]]},
474 "uuid-name": "row1"}]']],
476 001: {"error":null,"result":[{"uuid":["uuid","<0>"]},{"uuid":["uuid","<1>"]}]}
477 002: i=0 l1= uuid=<0>
478 002: i=1 k=1 ka=[] l2=0 uuid=<1>
482 OVSDB_CHECK_IDL_PY([external-linking idl, insert ops],
486 001: commit, status=success
487 002: i=1 k=1 ka=[1] l2= uuid=<0>
488 002: i=2 k=1 ka=[1 2] l2= uuid=<1>
492 OVSDB_CHECK_IDL_PY([getattr idl, insert ops],
496 001: commit, status=success
497 002: i=2 k=2 ka=[] l2= uuid=<0>
501 OVSDB_CHECK_IDL_PY([row-from-json idl, whats this],
509 [['notifytest insert 2, notifytest set 1 b 1, notifytest delete 0']],
510 [[000: i=0 r=0 b=false s= u=<0> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<1>
511 000: i=1 r=0 b=false s= u=<0> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<2>
512 001: commit, status=success, events=create|2|None, delete|0|None, update|1|b
513 002: i=1 r=0 b=true s= u=<0> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<2>
514 002: i=2 r=0 b=false s= u=<0> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<3>
518 AT_SETUP([idl handling of missing tables and columns - C])
519 AT_KEYWORDS([ovsdb server idl positive])
520 OVS_RUNDIR=`pwd`; export OVS_RUNDIR
522 # idltest2.ovsschema is the same as idltest.ovsschema, except that
523 # table link2 and column l2 have been deleted. But the IDL still
524 # expects them to be there, so this test checks that it properly
525 # tolerates them being missing.
526 AT_CHECK([ovsdb-tool create db $abs_srcdir/idltest2.ovsschema],
527 [0], [stdout], [ignore])
528 AT_CHECK([ovsdb-server '-vPATTERN:console:ovsdb-server|%c|%m' --detach --no-chdir --pidfile="`pwd`"/pid --remote=punix:socket --unixctl="`pwd`"/unixctl db], [0], [ignore], [ignore])
529 AT_CHECK([test-ovsdb '-vPATTERN:console:test-ovsdb|%c|%m' -vjsonrpc -t10 idl unix:socket ['["idltest",
532 "row": {"i": 0, "k": ["named-uuid", "self"]},
533 "uuid-name": "self"}]' \
537 "row": {"i": 1, "k": ["named-uuid", "row2"]},
538 "uuid-name": "row1"},
541 "row": {"i": 2, "k": ["named-uuid", "row1"]},
542 "uuid-name": "row2"}]' \
546 "where": [["i", "==", 1]],
547 "row": {"k": ["uuid", "#1#"]}}]' \
552 "row": {"k": ["uuid", "#0#"]}}]']],
553 [0], [stdout], [stderr], [kill `cat pid`])
554 AT_CHECK([sort stdout | ${PERL} $srcdir/uuidfilt.pl], [0],
556 001: {"error":null,"result":[{"uuid":["uuid","<0>"]}]}
557 002: i=0 k=0 ka=[] l2= uuid=<0>
558 003: {"error":null,"result":[{"uuid":["uuid","<1>"]},{"uuid":["uuid","<2>"]}]}
559 004: i=0 k=0 ka=[] l2= uuid=<0>
560 004: i=1 k=2 ka=[] l2= uuid=<1>
561 004: i=2 k=1 ka=[] l2= uuid=<2>
562 005: {"error":null,"result":[{"count":1}]}
563 006: i=0 k=0 ka=[] l2= uuid=<0>
564 006: i=1 k=1 ka=[] l2= uuid=<1>
565 006: i=2 k=1 ka=[] l2= uuid=<2>
566 007: {"error":null,"result":[{"count":3}]}
567 008: i=0 k=0 ka=[] l2= uuid=<0>
568 008: i=1 k=0 ka=[] l2= uuid=<1>
569 008: i=2 k=0 ka=[] l2= uuid=<2>
571 ]], [], [kill `cat pid`])
573 # Check that ovsdb-idl figured out that table link2 and column l2 are missing.
574 AT_CHECK([grep ovsdb_idl stderr | sort], [0], [dnl
575 test-ovsdb|ovsdb_idl|idltest database lacks link2 table (database needs upgrade?)
576 test-ovsdb|ovsdb_idl|link1 table in idltest database lacks l2 column (database needs upgrade?)
579 # Check that ovsdb-idl sent on "monitor" request and that it didn't
580 # mention that table or column, and (for paranoia) that it did mention another
582 AT_CHECK([grep -c '"monitor"' stderr], [0], [1
584 AT_CHECK([grep '"monitor"' stderr | grep link2], [1])
585 AT_CHECK([grep '"monitor"' stderr | grep l2], [1])
586 AT_CHECK([grep '"monitor"' stderr | grep -c '"link1"'], [0], [1
588 AT_CHECK([grep '"monitor"' stderr | grep -c '"ua"'], [0], [1
590 OVSDB_SERVER_SHUTDOWN