tests: Invoke daemons with --no-chdir so core files appear in test dir.
[sliver-openvswitch.git] / tests / ovsdb-server.at
1 AT_BANNER([OVSDB -- ovsdb-server transactions (Unix sockets)])
2
3 m4_define([OVSDB_SERVER_SHUTDOWN], 
4   [cp pid savepid
5    AT_CHECK([ovs-appctl -t "`pwd`"/unixctl -e exit], [0], [ignore], [ignore])
6    OVS_WAIT_WHILE([kill -0 `cat savepid`], [kill `cat savepid`])])
7
8 # OVSDB_CHECK_EXECUTION(TITLE, SCHEMA, TRANSACTIONS, OUTPUT, [KEYWORDS])
9 #
10 # Creates a database with the given SCHEMA, starts an ovsdb-server on
11 # that database, and runs each of the TRANSACTIONS (which should be a
12 # quoted list of quoted strings) against it with ovsdb-client one at a
13 # time.
14 #
15 # Checks that the overall output is OUTPUT, but UUIDs in the output
16 # are replaced by markers of the form <N> where N is a number.  The
17 # first unique UUID is replaced by <0>, the next by <1>, and so on.
18 # If a given UUID appears more than once it is always replaced by the
19 # same marker.
20 #
21 # TITLE is provided to AT_SETUP and KEYWORDS to AT_KEYWORDS.
22 m4_define([OVSDB_CHECK_EXECUTION], 
23   [AT_SETUP([$1])
24    AT_KEYWORDS([ovsdb server positive unix $5])
25    $2 > schema
26    AT_CHECK([ovsdb-tool create db schema], [0], [stdout], [ignore])
27    AT_CHECK([ovsdb-server --detach --no-chdir --pidfile="`pwd`"/pid --remote=punix:socket --unixctl="`pwd`"/unixctl db], [0], [ignore], [ignore])
28    m4_foreach([txn], [$3], 
29      [AT_CHECK([ovsdb-client transact unix:socket 'txn'], [0], [stdout], [ignore],
30      [test ! -e pid || kill `cat pid`])
31 cat stdout >> output
32 ])
33    AT_CHECK([perl $srcdir/uuidfilt.pl output], [0], [$4], [ignore],
34             [test ! -e pid || kill `cat pid`])
35    OVSDB_SERVER_SHUTDOWN
36    AT_CLEANUP])
37
38 EXECUTION_EXAMPLES
39 \f
40 AT_SETUP([truncating corrupted database log])
41 AT_KEYWORDS([ovsdb server positive unix])
42 ordinal_schema > schema
43 AT_CHECK([ovsdb-tool create db schema], [0], [stdout], [ignore])
44 dnl Do one transaction and save the output.
45 AT_DATA([txnfile], [[ovsdb-client transact unix:socket \
46 '["ordinals",
47   {"op": "insert",
48    "table": "ordinals",
49    "row": {"number": 0, "name": "zero"}}]'
50 ]])
51 AT_CHECK([ovsdb-server --remote=punix:socket --unixctl="`pwd`"/unixctl db --run="sh txnfile"], [0], [stdout], [])
52 cat stdout >> output
53 dnl Add some crap to the database log and run another transaction, which should
54 dnl ignore the crap and truncate it out of the log.
55 echo 'xxx' >> db
56 AT_DATA([txnfile], [[ovsdb-client transact unix:socket \
57 '["ordinals",
58   {"op": "insert",
59    "table": "ordinals",
60    "row": {"number": 1, "name": "one"}}]'
61 ]])
62 AT_CHECK([ovsdb-server --remote=punix:socket --unixctl="`pwd`"/unixctl db --run="sh txnfile"], [0], [stdout], [stderr])
63 AT_CHECK([grep 'syntax error: db: parse error.* in header line "xxx"' stderr],
64   [0], [ignore])
65 cat stdout >> output
66 dnl Run a final transaction to verify that both transactions succeeeded.
67 dnl The crap that we added should have been truncated by the previous run,
68 dnl so ovsdb-server shouldn't log a warning this time.
69 AT_DATA([txnfile], [[ovsdb-client transact unix:socket \
70 '["ordinals",
71   {"op": "select",
72    "table": "ordinals",
73    "where": [],
74    "sort": ["number"]}]'
75 ]])
76 AT_CHECK([ovsdb-server --remote=punix:socket --unixctl="`pwd`"/unixctl db --run="sh txnfile"], [0], [stdout], [])
77 cat stdout >> output
78 AT_CHECK([perl $srcdir/uuidfilt.pl output], [0],
79   [[[{"uuid":["uuid","<0>"]}]
80 [{"uuid":["uuid","<1>"]}]
81 [{"rows":[{"_uuid":["uuid","<0>"],"_version":["uuid","<2>"],"name":"zero","number":0},{"_uuid":["uuid","<1>"],"_version":["uuid","<3>"],"name":"one","number":1}]}]
82 ]], [],
83          [test ! -e pid || kill `cat pid`])
84 AT_CLEANUP
85
86 AT_SETUP([truncating database log with bad transaction])
87 AT_KEYWORDS([ovsdb server positive unix])
88 ordinal_schema > schema
89 AT_CHECK([ovsdb-tool create db schema], [0], [stdout], [ignore])
90 dnl Do one transaction and save the output.
91 AT_DATA([txnfile], [[ovsdb-client transact unix:socket \
92 '["ordinals",
93   {"op": "insert",
94    "table": "ordinals",
95    "row": {"number": 0, "name": "zero"}}]'
96 ]])
97 AT_CHECK([ovsdb-server --remote=punix:socket --unixctl="`pwd`"/unixctl db --run="sh txnfile"], [0], [stdout], [])
98 cat stdout >> output
99 dnl Add some crap to the database log and run another transaction, which should
100 dnl ignore the crap and truncate it out of the log.
101 echo 'OVSDB JSON 15 ffbcdae4b0386265f9ea3280dd7c8f0b72a20e56
102 {"invalid":{}}' >> db
103 AT_DATA([txnfile], [[ovsdb-client transact unix:socket \
104 '["ordinals",
105   {"op": "insert",
106    "table": "ordinals",
107    "row": {"number": 1, "name": "one"}}]'
108 ]])
109 AT_CHECK([ovsdb-server --remote=punix:socket --unixctl="`pwd`"/unixctl db --run="sh txnfile"], [0], [stdout], [stderr])
110 AT_CHECK([grep 'syntax "{"invalid":{}}": unknown table: No table named invalid.' stderr],
111   [0], [ignore])
112 cat stdout >> output
113 dnl Run a final transaction to verify that both transactions succeeeded.
114 dnl The crap that we added should have been truncated by the previous run,
115 dnl so ovsdb-server shouldn't log a warning this time.
116 AT_DATA([txnfile], [[ovsdb-client transact unix:socket \
117 '["ordinals",
118   {"op": "select",
119    "table": "ordinals",
120    "where": [],
121    "sort": ["number"]}]'
122 ]])
123 AT_CHECK([ovsdb-server --remote=punix:socket --unixctl="`pwd`"/unixctl db --run="sh txnfile"], [0], [stdout], [])
124 cat stdout >> output
125 AT_CHECK([perl $srcdir/uuidfilt.pl output], [0],
126   [[[{"uuid":["uuid","<0>"]}]
127 [{"uuid":["uuid","<1>"]}]
128 [{"rows":[{"_uuid":["uuid","<0>"],"_version":["uuid","<2>"],"name":"zero","number":0},{"_uuid":["uuid","<1>"],"_version":["uuid","<3>"],"name":"one","number":1}]}]
129 ]], [],
130          [test ! -e pid || kill `cat pid`])
131 AT_CLEANUP
132
133 AT_SETUP([ovsdb-client get-schema-version])
134 AT_KEYWORDS([ovsdb server positive])
135 ordinal_schema > schema
136 AT_CHECK([ovsdb-tool create db schema], [0], [ignore], [ignore])
137 AT_CHECK([ovsdb-server --detach --no-chdir --pidfile="`pwd`"/pid --unixctl="`pwd`"/unixctl --remote=punix:socket db], [0], [ignore], [ignore])
138 AT_CHECK([ovsdb-client get-schema-version unix:socket ordinals], [0], [5.1.3
139 ])
140 OVSDB_SERVER_SHUTDOWN
141 AT_CLEANUP
142
143 AT_SETUP([database multiplexing implementation])
144 AT_KEYWORDS([ovsdb server positive])
145 ordinal_schema > schema
146 AT_CHECK([ovsdb-tool create db schema], [0], [ignore], [ignore])
147 AT_CHECK([ovsdb-server --detach --no-chdir --pidfile="`pwd`"/pid --unixctl="`pwd`"/unixctl --remote=punix:socket db], [0], [ignore], [ignore])
148 AT_CHECK(
149   [[ovsdb-client list-dbs unix:socket]], 
150   [0], [ordinals
151 ], [ignore], [test ! -e pid || kill `cat pid`])
152 AT_CHECK(
153   [[test-jsonrpc request unix:socket get_schema [\"nonexistent\"]]], [0],
154   [[{"error":null,"id":0,"result":{"details":"get_schema request specifies unknown database nonexistent","error":"unknown database","syntax":"[\"nonexistent\"]"}}
155 ]], [], [test ! -e pid || kill `cat pid`])
156 OVSDB_SERVER_SHUTDOWN
157 AT_CLEANUP
158
159 AT_SETUP([--remote=db: implementation])
160 AT_KEYWORDS([ovsdb server positive])
161 AT_DATA([schema],
162   [[{"name": "mydb",
163      "tables": {
164        "Manager": {
165          "columns": {
166            "manager": {"type": "string"}}}}}
167 ]])
168 AT_CHECK([ovsdb-tool create db schema], [0], [ignore], [ignore])
169 AT_CHECK(
170   [[ovsdb-tool transact db \
171      '["mydb",
172        {"op": "insert",
173         "table": "Manager",
174         "row": {"manager": "punix:socket"}}]']], [0], [ignore], [ignore])
175 AT_CHECK([ovsdb-server --detach --no-chdir --pidfile="`pwd`"/pid --remote=db:Manager,manager --unixctl="`pwd`"/unixctl db], [0], [ignore], [ignore])
176 AT_CHECK(
177   [[ovsdb-client transact unix:socket \
178      '["mydb",
179        {"op": "select",
180         "table": "Manager",
181         "where": [],
182         "columns": ["manager"]}]']], 
183   [0], [stdout], [ignore], [test ! -e pid || kill `cat pid`])
184 AT_CHECK(
185   [perl $srcdir/uuidfilt.pl stdout], 
186   [0], 
187   [[[{"rows":[{"manager":"punix:socket"}]}]
188 ]], 
189   [ignore], 
190   [test ! -e pid || kill `cat pid`])
191 OVSDB_SERVER_SHUTDOWN
192 AT_CLEANUP
193
194 AT_SETUP([SSL db: implementation])
195 AT_KEYWORDS([ovsdb server positive ssl $5])
196 AT_SKIP_IF([test "$HAVE_OPENSSL" = no])
197 PKIDIR=$abs_top_builddir/tests
198 AT_SKIP_IF([expr "$PKIDIR" : ".*[       '\"
199 \r\\]"])
200 AT_DATA([schema],
201   [[{"name": "mydb",
202      "tables": {
203        "SSL": {
204          "columns": {
205            "private_key": {"type": "string"},
206            "certificate": {"type": "string"},
207            "ca_cert": {"type": "string"}}}}}
208 ]])
209 AT_CHECK([ovsdb-tool create db schema], [0], [stdout], [ignore])
210 AT_CHECK(
211   [[ovsdb-tool transact db \
212      '["mydb",
213        {"op": "insert",
214         "table": "SSL",
215         "row": {"private_key": "'"$PKIDIR/testpki-privkey2.pem"'",
216                 "certificate": "'"$PKIDIR/testpki-cert2.pem"'",
217                 "ca_cert": "'"$PKIDIR/testpki-cacert.pem"'"}}]']],
218   [0], [ignore], [ignore])
219 AT_CHECK([perl $srcdir/choose-port.pl], [0], [stdout])
220 SSL_PORT=`cat stdout`
221 AT_CHECK(
222   [ovsdb-server --detach --no-chdir --pidfile="`pwd`"/pid \
223         --private-key=db:SSL,private_key \
224         --certificate=db:SSL,certificate \
225         --ca-cert=db:SSL,ca_cert \
226          --remote=pssl:$SSL_PORT:127.0.0.1 --unixctl="`pwd`"/unixctl db],
227   [0], [ignore], [ignore])
228 AT_CHECK(
229   [[ovsdb-client \
230         --private-key=$PKIDIR/testpki-privkey.pem \
231         --certificate=$PKIDIR/testpki-cert.pem \
232         --ca-cert=$PKIDIR/testpki-cacert.pem \
233         transact ssl:127.0.0.1:$SSL_PORT \
234         '["mydb",
235           {"op": "select",
236            "table": "SSL",
237            "where": [],
238            "columns": ["private_key"]}]']], 
239   [0], [stdout], [ignore], [test ! -e pid || kill `cat pid`])
240 cat stdout >> output
241 AT_CHECK_UNQUOTED(
242   [perl $srcdir/uuidfilt.pl output], [0], 
243   [[[{"rows":[{"private_key":"$PKIDIR/testpki-privkey2.pem"}]}]
244 ]], [ignore], [test ! -e pid || kill `cat pid`])
245 OVSDB_SERVER_SHUTDOWN
246 AT_CLEANUP
247
248 AT_SETUP([compacting online])
249 AT_KEYWORDS([ovsdb server compact])
250 ordinal_schema > schema
251 dnl Make sure that "ovsdb-tool create" works with a dangling symlink for
252 dnl the database and the lockfile, creating the target of each symlink rather
253 dnl than replacing the symlinks with regular files.
254 mkdir dir
255 ln -s dir/db db
256 ln -s dir/.db.~lock~ .db.~lock~
257 AT_SKIP_IF([test ! -h db || test ! -h .db.~lock~])
258 AT_CHECK([ovsdb-tool create db schema], [0], [ignore], [ignore])
259 dnl Start ovsdb-server.
260 AT_CHECK([ovsdb-server --detach --no-chdir --pidfile="`pwd`"/pid --unixctl="`pwd`"/unixctl --remote=punix:socket --log-file="`pwd`"/ovsdb-server.log db], [0], [ignore], [ignore])
261 AT_CAPTURE_FILE([ovsdb-server.log])
262 dnl Do a bunch of random transactions that put crap in the database log.
263 AT_CHECK(
264   [[for pair in 'zero 0' 'one 1' 'two 2' 'three 3' 'four 4' 'five 5'; do
265       set -- $pair
266       ovsdb-client transact unix:socket '
267         ["ordinals",
268          {"op": "insert",
269           "table": "ordinals",
270           "row": {"name": "'$1'", "number": '$2'}},
271          {"op": "comment",
272           "comment": "add row for '"$pair"'"}]'
273       ovsdb-client transact unix:socket '
274         ["ordinals",
275          {"op": "delete",
276           "table": "ordinals",
277           "where": [["number", "==", '$2']]},
278          {"op": "comment",
279           "comment": "delete row for '"$2"'"}]'
280       ovsdb-client transact unix:socket '
281         ["ordinals",
282          {"op": "insert",
283           "table": "ordinals",
284           "row": {"name": "'$1'", "number": '$2'}},
285          {"op": "comment",
286           "comment": "add back row for '"$pair"'"}]'
287     done]],
288   [0], [stdout], [ignore], [test ! -e pid || kill `cat pid`])
289 dnl Check that all the crap is in fact in the database log.
290 AT_CHECK([[perl $srcdir/uuidfilt.pl db | grep -v ^OVSDB | sed 's/"_date":[0-9]*/"_date":0/' | test-json --multiple -]], [0],
291   [[{"cksum":"12345678 9","name":"ordinals","tables":{"ordinals":{"columns":{"name":{"type":"string"},"number":{"type":"integer"}},"indexes":[["number"]]}},"version":"5.1.3"}
292 {"_comment":"add row for zero 0","_date":0,"ordinals":{"<0>":{"name":"zero"}}}
293 {"_comment":"delete row for 0","_date":0,"ordinals":{"<0>":null}}
294 {"_comment":"add back row for zero 0","_date":0,"ordinals":{"<1>":{"name":"zero"}}}
295 {"_comment":"add row for one 1","_date":0,"ordinals":{"<2>":{"name":"one","number":1}}}
296 {"_comment":"delete row for 1","_date":0,"ordinals":{"<2>":null}}
297 {"_comment":"add back row for one 1","_date":0,"ordinals":{"<3>":{"name":"one","number":1}}}
298 {"_comment":"add row for two 2","_date":0,"ordinals":{"<4>":{"name":"two","number":2}}}
299 {"_comment":"delete row for 2","_date":0,"ordinals":{"<4>":null}}
300 {"_comment":"add back row for two 2","_date":0,"ordinals":{"<5>":{"name":"two","number":2}}}
301 {"_comment":"add row for three 3","_date":0,"ordinals":{"<6>":{"name":"three","number":3}}}
302 {"_comment":"delete row for 3","_date":0,"ordinals":{"<6>":null}}
303 {"_comment":"add back row for three 3","_date":0,"ordinals":{"<7>":{"name":"three","number":3}}}
304 {"_comment":"add row for four 4","_date":0,"ordinals":{"<8>":{"name":"four","number":4}}}
305 {"_comment":"delete row for 4","_date":0,"ordinals":{"<8>":null}}
306 {"_comment":"add back row for four 4","_date":0,"ordinals":{"<9>":{"name":"four","number":4}}}
307 {"_comment":"add row for five 5","_date":0,"ordinals":{"<10>":{"name":"five","number":5}}}
308 {"_comment":"delete row for 5","_date":0,"ordinals":{"<10>":null}}
309 {"_comment":"add back row for five 5","_date":0,"ordinals":{"<11>":{"name":"five","number":5}}}
310 ]], [], [test ! -e pid || kill `cat pid`])
311 dnl Dump out and check the actual database contents.
312 AT_CHECK([[ovsdb-client dump unix:socket ordinals]],
313   [0], [stdout], [ignore])
314 AT_CHECK([perl $srcdir/uuidfilt.pl stdout], [0], [dnl
315 ordinals table
316 _uuid                                name  number
317 ------------------------------------ ----- ------
318 <0> five  5     @&t@
319 <1> four  4     @&t@
320 <2> one   1     @&t@
321 <3> three 3     @&t@
322 <4> two   2     @&t@
323 <5> zero  0     @&t@
324 ], [], [test ! -e pid || kill `cat pid`])
325 dnl Now compact the database in-place.
326 AT_CHECK([[ovs-appctl -t "`pwd`"/unixctl ovsdb-server/compact]],
327   [0], [], [ignore], [test ! -e pid || kill `cat pid`])
328 dnl Make sure that "db" is still a symlink to dir/db instead of getting
329 dnl replaced by a regular file, ditto for .db.~lock~.
330 AT_CHECK([test -h db])
331 AT_CHECK([test -h .db.~lock~])
332 AT_CHECK([test -f dir/db])
333 AT_CHECK([test -f dir/.db.~lock~])
334 dnl We can't fully re-check the contents of the database log, because the
335 dnl order of the records is not predictable, but there should only be 4 lines
336 dnl in it now.
337 AT_CAPTURE_FILE([db])
338 AT_CHECK([test `wc -l < db` -eq 4], [0], [], [],
339   [test ! -e pid || kill `cat pid`])
340 dnl And check that the dumped data is the same too:
341 AT_CHECK([ovsdb-client dump unix:socket ordinals], [0], [stdout], [ignore],
342   [test ! -e pid || kill `cat pid`])
343 AT_CHECK([perl $srcdir/uuidfilt.pl stdout], [0], [dnl
344 ordinals table
345 _uuid                                name  number
346 ------------------------------------ ----- ------
347 <0> five  5     @&t@
348 <1> four  4     @&t@
349 <2> one   1     @&t@
350 <3> three 3     @&t@
351 <4> two   2     @&t@
352 <5> zero  0     @&t@
353 ], [], [test ! -e pid || kill `cat pid`])
354 dnl Now do some more transactions.
355 AT_CHECK(
356   [[ovsdb-client transact unix:socket '
357      ["ordinals",
358       {"op": "delete",
359        "table": "ordinals",
360        "where": [["number", "<", 3]]}]']],
361   [0], [[[{"count":3}]
362 ]], [ignore], [test ! -e pid || kill `cat pid`])
363 dnl There should be 6 lines in the log now.
364 AT_CHECK([test `wc -l < db` -eq 6], [0], [], [],
365   [test ! -e pid || kill `cat pid`])
366 dnl Then check that the dumped data is correct.
367 AT_CHECK([ovsdb-client dump unix:socket ordinals], [0], [stdout], [ignore],
368   [test ! -e pid || kill `cat pid`])
369 AT_CHECK([perl $srcdir/uuidfilt.pl stdout], [0], [dnl
370 ordinals table
371 _uuid                                name  number
372 ------------------------------------ ----- ------
373 <0> five  5     @&t@
374 <1> four  4     @&t@
375 <2> three 3     @&t@
376 ], [], [test ! -e pid || kill `cat pid`])
377 OVSDB_SERVER_SHUTDOWN
378 AT_CLEANUP
379 \f
380 AT_BANNER([OVSDB -- ovsdb-server transactions (SSL sockets)])
381
382 # OVSDB_CHECK_EXECUTION(TITLE, SCHEMA, TRANSACTIONS, OUTPUT, [KEYWORDS])
383 #
384 # Creates a database with the given SCHEMA, starts an ovsdb-server on
385 # that database, and runs each of the TRANSACTIONS (which should be a
386 # quoted list of quoted strings) against it with ovsdb-client one at a
387 # time.
388 #
389 # Checks that the overall output is OUTPUT, but UUIDs in the output
390 # are replaced by markers of the form <N> where N is a number.  The
391 # first unique UUID is replaced by <0>, the next by <1>, and so on.
392 # If a given UUID appears more than once it is always replaced by the
393 # same marker.
394 #
395 # TITLE is provided to AT_SETUP and KEYWORDS to AT_KEYWORDS.
396 m4_define([OVSDB_CHECK_EXECUTION], 
397   [AT_SETUP([$1])
398    AT_KEYWORDS([ovsdb server positive ssl $5])
399    AT_SKIP_IF([test "$HAVE_OPENSSL" = no])
400    $2 > schema
401    AT_CHECK([perl $srcdir/choose-port.pl], [0], [stdout])
402    SSL_PORT=`cat stdout`
403    PKIDIR=$abs_top_builddir/tests
404    AT_CHECK([ovsdb-tool create db schema], [0], [stdout], [ignore])
405    AT_CHECK([ovsdb-server --detach --no-chdir --pidfile="`pwd`"/pid --private-key=$PKIDIR/testpki-privkey2.pem --certificate=$PKIDIR/testpki-cert2.pem --ca-cert=$PKIDIR/testpki-cacert.pem --remote=pssl:$SSL_PORT:127.0.0.1 --unixctl="`pwd`"/unixctl db], [0], [ignore], [ignore])
406    m4_foreach([txn], [$3], 
407      [AT_CHECK([ovsdb-client --private-key=$PKIDIR/testpki-privkey.pem --certificate=$PKIDIR/testpki-cert.pem --ca-cert=$PKIDIR/testpki-cacert.pem transact ssl:127.0.0.1:$SSL_PORT 'txn'], [0], [stdout], [ignore],
408      [test ! -e pid || kill `cat pid`])
409 cat stdout >> output
410 ])
411    AT_CHECK([perl $srcdir/uuidfilt.pl output], [0], [$4], [ignore],
412             [test ! -e pid || kill `cat pid`])
413    OVSDB_SERVER_SHUTDOWN
414    AT_CLEANUP])
415
416 EXECUTION_EXAMPLES
417 \f
418 AT_BANNER([OVSDB -- transactions on transient ovsdb-server])
419
420 # OVSDB_CHECK_EXECUTION(TITLE, SCHEMA, TRANSACTIONS, OUTPUT, [KEYWORDS])
421 #
422 # Creates a database with the given SCHEMA and runs each of the
423 # TRANSACTIONS (which should be a quoted list of quoted strings)
424 # against it with ovsdb-client one at a time.  Each ovsdb-client
425 # is run against a separately started ovsdb-server that executes
426 # only that single transaction.  (The idea is that this should
427 # help to ferret out any differences between what ovsdb-server has
428 # in memory and what actually gets committed to disk.)
429 #
430 # Checks that the overall output is OUTPUT, but UUIDs in the output
431 # are replaced by markers of the form <N> where N is a number.  The
432 # first unique UUID is replaced by <0>, the next by <1>, and so on.
433 # If a given UUID appears more than once it is always replaced by the
434 # same marker.
435 #
436 # TITLE is provided to AT_SETUP and KEYWORDS to AT_KEYWORDS.
437 m4_define([OVSDB_CHECK_EXECUTION], 
438   [AT_SETUP([$1])
439    AT_KEYWORDS([ovsdb server positive transient $5])
440    $2 > schema
441    AT_CHECK([ovsdb-tool create db schema], [0], [stdout], [ignore])
442    m4_foreach([txn], [$3], 
443      [AT_DATA([txnfile], [ovsdb-client transact unix:socket 'txn'
444 ])
445       AT_CHECK([ovsdb-server --remote=punix:socket --unixctl="`pwd`"/unixctl db --run="sh txnfile"], [0], [stdout], [ignore])
446       cat stdout >> output
447 ])
448    AT_CHECK([perl $srcdir/uuidfilt.pl output], [0], [$4], [ignore])
449    AT_CLEANUP])
450
451 EXECUTION_EXAMPLES