From: Ben Pfaff Date: Wed, 7 Mar 2012 22:17:45 +0000 (-0800) Subject: tests: Convert *_SCHEMA macros to shell functions. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=39ab07affb2d155aaabfdecaec2ec908f9d05a3a;p=openvswitch tests: Convert *_SCHEMA macros to shell functions. This reduces tests/testsuite by about 70 kB, by collapsing a number of macro expansions into just one copy in a shell function. Signed-off-by: Ben Pfaff --- diff --git a/tests/ovsdb-execution.at b/tests/ovsdb-execution.at index 90f20ff6..480f6101 100644 --- a/tests/ovsdb-execution.at +++ b/tests/ovsdb-execution.at @@ -1,7 +1,11 @@ AT_BANNER([OVSDB -- execution]) -m4_define([ORDINAL_SCHEMA], - [[{"name": "ordinals", +m4_divert_push([PREPARE_TESTS]) +[ + +ordinal_schema () { + cat <<'EOF' + {"name": "ordinals", "tables": { "ordinals": { "columns": { @@ -9,10 +13,13 @@ m4_define([ORDINAL_SCHEMA], "name": {"type": "string"}}, "indexes": [["number"]]}}, "version": "5.1.3", - "cksum": "12345678 9"}]]) + "cksum": "12345678 9"} +EOF +} -m4_define([CONSTRAINT_SCHEMA], - [[{"name": "constraints", +constraint_schema () { + cat << 'EOF' + {"name": "constraints", "tables": { "a": { "columns": { @@ -33,10 +40,13 @@ m4_define([CONSTRAINT_SCHEMA], "columns": { "positive": {"type": {"key": {"type": "integer", "minInteger": 1}}}}, - "maxRows": 1}}}]]) + "maxRows": 1}}} +EOF +} -m4_define([WEAK_SCHEMA], - [[{"name": "weak", +weak_schema () { + cat <<'EOF' + {"name": "weak", "tables": { "a": { "columns": { @@ -57,10 +67,13 @@ m4_define([WEAK_SCHEMA], "b2a": {"type": {"key": {"type": "uuid", "refTable": "a", "refType": "weak"}, - "min": 0, "max": "unlimited"}}}}}}]]) + "min": 0, "max": "unlimited"}}}}}} +EOF +} -m4_define([GC_SCHEMA], - [[{"name": "gc", +gc_schema () { + cat <<'EOF' + {"name": "gc", "tables": { "root": { "columns": { @@ -95,7 +108,11 @@ m4_define([GC_SCHEMA], "refTable": "a", "refType": "weak"}, "min": 0, "max": "unlimited"}}}, - "isRoot": false}}}]]) + "isRoot": false}}} +EOF +} +] +m4_divert_pop([PREPARE_TESTS]) # OVSDB_CHECK_EXECUTION(TITLE, SCHEMA, TRANSACTIONS, OUTPUT, [KEYWORDS]) # @@ -109,16 +126,16 @@ m4_define([GC_SCHEMA], # same marker. # # TITLE is provided to AT_SETUP and KEYWORDS to AT_KEYWORDS. -m4_define([OVSDB_CHECK_EXECUTION], +m4_define([OVSDB_CHECK_EXECUTION], [AT_SETUP([$1]) AT_KEYWORDS([ovsdb execute execution positive $5]) - AT_CHECK([test-ovsdb execute '$2' m4_foreach([txn], [$3], [ 'txn'])], + AT_CHECK([test-ovsdb execute "`$2`" m4_foreach([txn], [$3], [ 'txn'])], [0], [stdout], []) AT_CHECK([perl $srcdir/uuidfilt.pl stdout], [0], [$4]) AT_CLEANUP]) OVSDB_CHECK_EXECUTION([uuid-name must be ], - [CONSTRAINT_SCHEMA], + [constraint_schema], [[[["constraints", {"op": "insert", "table": "a", @@ -128,7 +145,7 @@ OVSDB_CHECK_EXECUTION([uuid-name must be ], ]]) OVSDB_CHECK_EXECUTION([named-uuid must be ], - [CONSTRAINT_SCHEMA], + [constraint_schema], [[[["constraints", {"op": "insert", "table": "a", @@ -137,7 +154,7 @@ OVSDB_CHECK_EXECUTION([named-uuid must be ], ]]) OVSDB_CHECK_EXECUTION([duplicate uuid-name not allowed], - [ORDINAL_SCHEMA], + [ordinal_schema], [[[["ordinals", {"op": "insert", "table": "ordinals", @@ -154,7 +171,7 @@ m4_define([EXECUTION_EXAMPLES], [ dnl At one point the "commit" code ignored new rows with all-default values, dnl so this checks for that problem. OVSDB_CHECK_EXECUTION([insert default row, query table], - [ORDINAL_SCHEMA], + [ordinal_schema], [[[["ordinals", {"op": "insert", "table": "ordinals", @@ -168,7 +185,7 @@ OVSDB_CHECK_EXECUTION([insert default row, query table], ]]) OVSDB_CHECK_EXECUTION([insert row, query table], - [ORDINAL_SCHEMA], + [ordinal_schema], [[[["ordinals", {"op": "insert", "table": "ordinals", @@ -182,7 +199,7 @@ OVSDB_CHECK_EXECUTION([insert row, query table], ]]) OVSDB_CHECK_EXECUTION([insert rows, query by value], - [ORDINAL_SCHEMA], + [ordinal_schema], [[[["ordinals", {"op": "insert", "table": "ordinals", @@ -206,7 +223,7 @@ OVSDB_CHECK_EXECUTION([insert rows, query by value], ]]) OVSDB_CHECK_EXECUTION([insert rows, query by named-uuid], - [ORDINAL_SCHEMA], + [ordinal_schema], [[[["ordinals", {"op": "insert", "table": "ordinals", @@ -226,7 +243,7 @@ OVSDB_CHECK_EXECUTION([insert rows, query by named-uuid], ]]) OVSDB_CHECK_EXECUTION([insert rows, update rows by value], - [ORDINAL_SCHEMA], + [ordinal_schema], [[[["ordinals", {"op": "insert", "table": "ordinals", @@ -254,7 +271,7 @@ OVSDB_CHECK_EXECUTION([insert rows, update rows by value], ]]) OVSDB_CHECK_EXECUTION([insert rows, mutate rows], - [ORDINAL_SCHEMA], + [ordinal_schema], [[[["ordinals", {"op": "insert", "table": "ordinals", @@ -282,7 +299,7 @@ OVSDB_CHECK_EXECUTION([insert rows, mutate rows], ]]) OVSDB_CHECK_EXECUTION([insert rows, delete by named-uuid], - [ORDINAL_SCHEMA], + [ordinal_schema], [[[["ordinals", {"op": "insert", "table": "ordinals", @@ -303,7 +320,7 @@ OVSDB_CHECK_EXECUTION([insert rows, delete by named-uuid], ]]) OVSDB_CHECK_EXECUTION([insert rows, delete rows by value], - [ORDINAL_SCHEMA], + [ordinal_schema], [[[["ordinals", {"op": "insert", "table": "ordinals", @@ -329,7 +346,7 @@ OVSDB_CHECK_EXECUTION([insert rows, delete rows by value], ]]) OVSDB_CHECK_EXECUTION([insert rows, delete by (non-matching) value], - [ORDINAL_SCHEMA], + [ordinal_schema], [[[["ordinals", {"op": "insert", "table": "ordinals", @@ -356,7 +373,7 @@ OVSDB_CHECK_EXECUTION([insert rows, delete by (non-matching) value], ]]) OVSDB_CHECK_EXECUTION([insert rows, delete all], - [ORDINAL_SCHEMA], + [ordinal_schema], [[[["ordinals", {"op": "insert", "table": "ordinals", @@ -377,7 +394,7 @@ OVSDB_CHECK_EXECUTION([insert rows, delete all], ]]) OVSDB_CHECK_EXECUTION([insert row, query table, commit], - [ORDINAL_SCHEMA], + [ordinal_schema], [[[["ordinals", {"op": "insert", "table": "ordinals", @@ -391,7 +408,7 @@ OVSDB_CHECK_EXECUTION([insert row, query table, commit], ]]) OVSDB_CHECK_EXECUTION([insert row, query table, commit durably], - [ORDINAL_SCHEMA], + [ordinal_schema], [[[["ordinals", {"op": "insert", "table": "ordinals", @@ -405,7 +422,7 @@ OVSDB_CHECK_EXECUTION([insert row, query table, commit durably], ]]) OVSDB_CHECK_EXECUTION([equality wait with correct rows], - [ORDINAL_SCHEMA], + [ordinal_schema], [[[["ordinals", {"op": "insert", "table": "ordinals", @@ -425,7 +442,7 @@ OVSDB_CHECK_EXECUTION([equality wait with correct rows], ]]) OVSDB_CHECK_EXECUTION([equality wait with extra row], - [ORDINAL_SCHEMA], + [ordinal_schema], [[[["ordinals", {"op": "insert", "table": "ordinals", @@ -446,7 +463,7 @@ OVSDB_CHECK_EXECUTION([equality wait with extra row], ]]) OVSDB_CHECK_EXECUTION([equality wait with missing row], - [ORDINAL_SCHEMA], + [ordinal_schema], [[[["ordinals", {"op": "insert", "table": "ordinals", @@ -465,7 +482,7 @@ OVSDB_CHECK_EXECUTION([equality wait with missing row], ]]) OVSDB_CHECK_EXECUTION([inequality wait with correct rows], - [ORDINAL_SCHEMA], + [ordinal_schema], [[[["ordinals", {"op": "insert", "table": "ordinals", @@ -485,7 +502,7 @@ OVSDB_CHECK_EXECUTION([inequality wait with correct rows], ]]) OVSDB_CHECK_EXECUTION([inequality wait with extra row], - [ORDINAL_SCHEMA], + [ordinal_schema], [[[["ordinals", {"op": "insert", "table": "ordinals", @@ -506,7 +523,7 @@ OVSDB_CHECK_EXECUTION([inequality wait with extra row], ]]) OVSDB_CHECK_EXECUTION([inequality wait with missing row], - [ORDINAL_SCHEMA], + [ordinal_schema], [[[["ordinals", {"op": "insert", "table": "ordinals", @@ -525,7 +542,7 @@ OVSDB_CHECK_EXECUTION([inequality wait with missing row], ]]) OVSDB_CHECK_EXECUTION([insert and update constraints], - [CONSTRAINT_SCHEMA], + [constraint_schema], [[[["constraints", {"op": "insert", "table": "constrained", @@ -555,7 +572,7 @@ OVSDB_CHECK_EXECUTION([insert and update constraints], ]]) OVSDB_CHECK_EXECUTION([index uniqueness checking], - [ORDINAL_SCHEMA], + [ordinal_schema], dnl Insert initial row. [[[["ordinals", {"op": "insert", @@ -637,7 +654,7 @@ dnl collide (only) with their previous values (succeeds). ]]) OVSDB_CHECK_EXECUTION([referential integrity -- simple], - [CONSTRAINT_SCHEMA], + [constraint_schema], [[[["constraints", {"op": "insert", "table": "b", @@ -701,7 +718,7 @@ dnl Check that "mutate" honors number-of-elements constraints on sets and maps. ]]) OVSDB_CHECK_EXECUTION([referential integrity -- mutual references], - [CONSTRAINT_SCHEMA], + [constraint_schema], [[[["constraints", {"op": "insert", "table": "a", @@ -753,7 +770,7 @@ OVSDB_CHECK_EXECUTION([referential integrity -- mutual references], ]]) OVSDB_CHECK_EXECUTION([weak references], - [WEAK_SCHEMA], + [weak_schema], [[[["weak", {"op": "insert", "table": "a", @@ -892,7 +909,7 @@ OVSDB_CHECK_EXECUTION([weak references], ]]) OVSDB_CHECK_EXECUTION([garbage collection], - [GC_SCHEMA], + [gc_schema], [dnl Check that inserting a row without any references is a no-op. [[["gc", {"op": "insert", diff --git a/tests/ovsdb-monitor.at b/tests/ovsdb-monitor.at index e3829056..4eb2e883 100644 --- a/tests/ovsdb-monitor.at +++ b/tests/ovsdb-monitor.at @@ -19,8 +19,7 @@ AT_BANNER([OVSDB -- ovsdb-server monitors]) m4_define([OVSDB_CHECK_MONITOR], [AT_SETUP([$1]) AT_KEYWORDS([ovsdb server monitor positive $9]) - AT_DATA([schema], [$2 -]) + $2 > schema AT_CHECK([ovsdb-tool create db schema], [0], [stdout], [ignore]) m4_foreach([txn], [$3], [AT_CHECK([ovsdb-tool transact db 'txn'], [0], [ignore], [ignore])]) @@ -40,7 +39,7 @@ m4_define([OVSDB_CHECK_MONITOR], AT_CLEANUP]) OVSDB_CHECK_MONITOR([monitor insert into empty table], - [ORDINAL_SCHEMA], + [ordinal_schema], [], [ordinals], [ordinals], [[[["ordinals", @@ -52,7 +51,7 @@ OVSDB_CHECK_MONITOR([monitor insert into empty table], ]]) OVSDB_CHECK_MONITOR([monitor insert into populated table], - [ORDINAL_SCHEMA], + [ordinal_schema], [[[["ordinals", {"op": "insert", "table": "ordinals", @@ -70,7 +69,7 @@ row,action,name,number,_version ]]) OVSDB_CHECK_MONITOR([monitor delete], - [ORDINAL_SCHEMA], + [ordinal_schema], [[[["ordinals", {"op": "insert", "table": "ordinals", @@ -88,7 +87,7 @@ row,action,name,number,_version ]]) OVSDB_CHECK_MONITOR([monitor row update], - [ORDINAL_SCHEMA], + [ordinal_schema], [[[["ordinals", {"op": "insert", "table": "ordinals", @@ -108,7 +107,7 @@ row,action,name,number,_version ]]) OVSDB_CHECK_MONITOR([monitor no-op row updates], - [ORDINAL_SCHEMA], + [ordinal_schema], [[[["ordinals", {"op": "insert", "table": "ordinals", @@ -131,7 +130,7 @@ row,action,name,number,_version ]]) OVSDB_CHECK_MONITOR([monitor insert-and-update transaction], - [ORDINAL_SCHEMA], + [ordinal_schema], [[[["ordinals", {"op": "insert", "table": "ordinals", @@ -154,7 +153,7 @@ row,action,name,number,_version ]]) OVSDB_CHECK_MONITOR([monitor insert-update-and-delete transaction], - [ORDINAL_SCHEMA], + [ordinal_schema], [[[["ordinals", {"op": "insert", "table": "ordinals", @@ -183,7 +182,7 @@ row,action,name,number,_version ]]) OVSDB_CHECK_MONITOR([monitor weak reference change], - [WEAK_SCHEMA], + [weak_schema], [[[["weak", {"op": "insert", "table": "a", @@ -218,7 +217,7 @@ row,action,a,a2a,a2a1,a2b,_version ]]) OVSDB_CHECK_MONITOR([monitor insert-update-and-delete transaction], - [ORDINAL_SCHEMA], + [ordinal_schema], [[[["ordinals", {"op": "insert", "table": "ordinals", @@ -269,7 +268,7 @@ m4_define([OVSDB_MONITOR_TXNS], "where": []}]]]]) OVSDB_CHECK_MONITOR([monitor all operations], - [ORDINAL_SCHEMA], [OVSDB_MONITOR_INITIAL], + [ordinal_schema], [OVSDB_MONITOR_INITIAL], [ordinals], [ordinals], [OVSDB_MONITOR_TXNS], [[row,action,name,number,_version <0>,initial,"""ten""",10,"[""uuid"",""<1>""]" @@ -289,21 +288,21 @@ row,action,name,number,_version dnl A monitor with "initial" only doesn't really make sense, dnl but it's still allowed and should work. OVSDB_CHECK_MONITOR([monitor initial only], - [ORDINAL_SCHEMA], [OVSDB_MONITOR_INITIAL], + [ordinal_schema], [OVSDB_MONITOR_INITIAL], [ordinals], [ordinals], [OVSDB_MONITOR_TXNS], [[row,action,name,number,_version <0>,initial,"""ten""",10,"[""uuid"",""<1>""]" ]], [!insert,!delete,!modify]) OVSDB_CHECK_MONITOR([monitor insert only], - [ORDINAL_SCHEMA], [OVSDB_MONITOR_INITIAL], + [ordinal_schema], [OVSDB_MONITOR_INITIAL], [ordinals], [ordinals], [OVSDB_MONITOR_TXNS], [[row,action,name,number,_version <0>,insert,"""five""",5,"[""uuid"",""<1>""]" ]], [!initial,!delete,!modify]) OVSDB_CHECK_MONITOR([monitor delete only], - [ORDINAL_SCHEMA], [OVSDB_MONITOR_INITIAL], + [ordinal_schema], [OVSDB_MONITOR_INITIAL], [ordinals], [ordinals], [OVSDB_MONITOR_TXNS], [[row,action,name,number,_version <0>,delete,"""FIVE""",5,"[""uuid"",""<1>""]" @@ -311,7 +310,7 @@ OVSDB_CHECK_MONITOR([monitor delete only], ]], [!initial,!insert,!modify]) OVSDB_CHECK_MONITOR([monitor modify only], - [ORDINAL_SCHEMA], [OVSDB_MONITOR_INITIAL], + [ordinal_schema], [OVSDB_MONITOR_INITIAL], [ordinals], [ordinals], [OVSDB_MONITOR_TXNS], [[row,action,name,number,_version <0>,old,"""five""",,"[""uuid"",""<1>""]" diff --git a/tests/ovsdb-server.at b/tests/ovsdb-server.at index ce558866..b89718b4 100644 --- a/tests/ovsdb-server.at +++ b/tests/ovsdb-server.at @@ -22,8 +22,7 @@ m4_define([OVSDB_SERVER_SHUTDOWN], m4_define([OVSDB_CHECK_EXECUTION], [AT_SETUP([$1]) AT_KEYWORDS([ovsdb server positive unix $5]) - AT_DATA([schema], [$2 -]) + $2 > schema AT_CHECK([ovsdb-tool create db schema], [0], [stdout], [ignore]) AT_CHECK([ovsdb-server --detach --pidfile=$PWD/pid --remote=punix:socket --unixctl=$PWD/unixctl db], [0], [ignore], [ignore]) m4_foreach([txn], [$3], @@ -40,8 +39,7 @@ EXECUTION_EXAMPLES AT_SETUP([truncating corrupted database log]) AT_KEYWORDS([ovsdb server positive unix]) -AT_DATA([schema], [ORDINAL_SCHEMA -]) +ordinal_schema > schema AT_CHECK([ovsdb-tool create db schema], [0], [stdout], [ignore]) dnl Do one transaction and save the output. AT_DATA([txnfile], [[ovsdb-client transact unix:socket \ @@ -87,8 +85,7 @@ AT_CLEANUP AT_SETUP([truncating database log with bad transaction]) AT_KEYWORDS([ovsdb server positive unix]) -AT_DATA([schema], [ORDINAL_SCHEMA -]) +ordinal_schema > schema AT_CHECK([ovsdb-tool create db schema], [0], [stdout], [ignore]) dnl Do one transaction and save the output. AT_DATA([txnfile], [[ovsdb-client transact unix:socket \ @@ -135,8 +132,7 @@ AT_CLEANUP AT_SETUP([ovsdb-client get-schema-version]) AT_KEYWORDS([ovsdb server positive]) -AT_DATA([schema], [ORDINAL_SCHEMA -]) +ordinal_schema > schema AT_CHECK([ovsdb-tool create db schema], [0], [ignore], [ignore]) AT_CHECK([ovsdb-server --detach --pidfile=$PWD/pid --unixctl=$PWD/unixctl --remote=punix:socket db], [0], [ignore], [ignore]) AT_CHECK([ovsdb-client get-schema-version unix:socket ordinals], [0], [5.1.3 @@ -146,8 +142,7 @@ AT_CLEANUP AT_SETUP([database multiplexing implementation]) AT_KEYWORDS([ovsdb server positive]) -AT_DATA([schema], [ORDINAL_SCHEMA -]) +ordinal_schema > schema AT_CHECK([ovsdb-tool create db schema], [0], [ignore], [ignore]) AT_CHECK([ovsdb-server --detach --pidfile=$PWD/pid --unixctl=$PWD/unixctl --remote=punix:socket db], [0], [ignore], [ignore]) AT_CHECK( @@ -252,8 +247,7 @@ AT_CLEANUP AT_SETUP([compacting online]) AT_KEYWORDS([ovsdb server compact]) -AT_DATA([schema], [ORDINAL_SCHEMA -]) +ordinal_schema > schema touch .db.~lock~ AT_CHECK([ovsdb-tool create db schema], [0], [ignore], [ignore]) AT_CHECK([ovsdb-server --detach --pidfile=$PWD/pid --unixctl=$PWD/unixctl --remote=punix:socket --log-file=$PWD/ovsdb-server.log db], [0], [ignore], [ignore]) @@ -390,8 +384,7 @@ m4_define([OVSDB_CHECK_EXECUTION], [AT_SETUP([$1]) AT_KEYWORDS([ovsdb server positive ssl $5]) AT_SKIP_IF([test "$HAVE_OPENSSL" = no]) - AT_DATA([schema], [$2 -]) + $2 > schema AT_CHECK([perl $srcdir/choose-port.pl], [0], [stdout]) SSL_PORT=`cat stdout` PKIDIR=$abs_top_builddir/tests @@ -431,8 +424,7 @@ AT_BANNER([OVSDB -- transactions on transient ovsdb-server]) m4_define([OVSDB_CHECK_EXECUTION], [AT_SETUP([$1]) AT_KEYWORDS([ovsdb server positive transient $5]) - AT_DATA([schema], [$2 -]) + $2 > schema AT_CHECK([ovsdb-tool create db schema], [0], [stdout], [ignore]) m4_foreach([txn], [$3], [AT_DATA([txnfile], [ovsdb-client transact unix:socket 'txn' diff --git a/tests/ovsdb-tool.at b/tests/ovsdb-tool.at index d48a0c1e..4bc582c0 100644 --- a/tests/ovsdb-tool.at +++ b/tests/ovsdb-tool.at @@ -16,8 +16,7 @@ AT_BANNER([OVSDB -- ovsdb-tool]) m4_define([OVSDB_CHECK_EXECUTION], [AT_SETUP([$1]) AT_KEYWORDS([ovsdb file positive $5]) - AT_DATA([schema], [$2 -]) + $2 > schema touch .db.~lock~ AT_CHECK([ovsdb-tool create db schema], [0], [stdout], [ignore]) m4_foreach([txn], [$3], @@ -31,8 +30,7 @@ EXECUTION_EXAMPLES AT_SETUP([transaction comments]) AT_KEYWORDS([ovsdb file positive]) -AT_DATA([schema], [ORDINAL_SCHEMA -]) +ordinal_schema > schema touch .db.~lock~ AT_CHECK([ovsdb-tool create db schema], [0], [], [ignore]) AT_CHECK([[ovsdb-tool transact db ' @@ -50,8 +48,7 @@ AT_CLEANUP AT_SETUP([ovsdb-tool compact]) AT_KEYWORDS([ovsdb file positive]) -AT_DATA([schema], [ORDINAL_SCHEMA -]) +ordinal_schema > schema touch .db.~lock~ AT_CHECK([ovsdb-tool create db schema], [0], [], [ignore]) dnl Do a bunch of random transactions that put crap in the database log. @@ -144,8 +141,7 @@ AT_CLEANUP AT_SETUP([ovsdb-tool convert -- removing a column]) AT_KEYWORDS([ovsdb file positive]) -AT_DATA([schema], [ORDINAL_SCHEMA -]) +ordinal_schema > schema AT_DATA([new-schema], [[{"name": "ordinals", "tables": { @@ -216,8 +212,7 @@ AT_DATA([schema], "columns": { "number": {"type": "integer"}}}}} ]]) -AT_DATA([new-schema], [ORDINAL_SCHEMA -]) +ordinal_schema > new-schema touch .db.~lock~ AT_CHECK([ovsdb-tool create db schema], [0], [], [ignore]) dnl Put some data in the database. @@ -273,16 +268,14 @@ AT_CLEANUP AT_SETUP([ovsdb-tool schema-version]) AT_KEYWORDS([ovsdb file positive]) -AT_DATA([schema], [ORDINAL_SCHEMA -]) +ordinal_schema > schema AT_CHECK([ovsdb-tool schema-version schema], [0], [5.1.3 ]) AT_CLEANUP AT_SETUP([ovsdb-tool db-version]) AT_KEYWORDS([ovsdb file positive]) -AT_DATA([schema], [ORDINAL_SCHEMA -]) +ordinal_schema > schema touch .db.~lock~ AT_CHECK([ovsdb-tool create db schema], [0], [], [ignore]) AT_CHECK([ovsdb-tool db-version db], [0], [5.1.3 @@ -291,16 +284,14 @@ AT_CLEANUP AT_SETUP([ovsdb-tool schema-cksum]) AT_KEYWORDS([ovsdb file positive]) -AT_DATA([schema], [ORDINAL_SCHEMA -]) +ordinal_schema > schema AT_CHECK([ovsdb-tool schema-cksum schema], [0], [12345678 9 ]) AT_CLEANUP AT_SETUP([ovsdb-tool db-cksum]) AT_KEYWORDS([ovsdb file positive]) -AT_DATA([schema], [ORDINAL_SCHEMA -]) +ordinal_schema > schema touch .db.~lock~ AT_CHECK([ovsdb-tool create db schema], [0], [], [ignore]) AT_CHECK([ovsdb-tool db-cksum db], [0], [12345678 9 @@ -309,8 +300,7 @@ AT_CLEANUP AT_SETUP([ovsdb-tool needs-conversion (no conversion needed)]) AT_KEYWORDS([ovsdb file positive]) -AT_DATA([schema], [ORDINAL_SCHEMA -]) +ordinal_schema > schema touch .db.~lock~ AT_CHECK([ovsdb-tool create db schema], [0], [], [ignore]) AT_CHECK([ovsdb-tool needs-conversion db schema], [0], [no @@ -319,8 +309,7 @@ AT_CLEANUP AT_SETUP([ovsdb-tool needs-conversion (conversion needed)]) AT_KEYWORDS([ovsdb file positive]) -AT_DATA([schema], [ORDINAL_SCHEMA -]) +ordinal_schema > schema touch .db.~lock~ AT_CHECK([ovsdb-tool create db schema], [0], [], [ignore]) sed 's/5\.1\.3/5.1.4/' < schema > schema2 diff --git a/tests/ovsdb-trigger.at b/tests/ovsdb-trigger.at index c2b1b967..fa2feef9 100644 --- a/tests/ovsdb-trigger.at +++ b/tests/ovsdb-trigger.at @@ -13,7 +13,7 @@ m4_define([OVSDB_CHECK_TRIGGER], AT_CLEANUP]) OVSDB_CHECK_TRIGGER([trigger fires immediately], - ['ORDINAL_SCHEMA' [\ + ["`ordinal_schema`" [\ '["ordinals", {"op": "insert", "table": "ordinals", @@ -36,7 +36,7 @@ OVSDB_CHECK_TRIGGER([trigger fires immediately], ]]) OVSDB_CHECK_TRIGGER([trigger times out], - ['ORDINAL_SCHEMA' [\ + ["`ordinal_schema`" [\ '["ordinals", {"op": "insert", "table": "ordinals", @@ -59,7 +59,7 @@ t=10: trigger 0 (delayed): [{"uuid":["uuid","<0>"]},{"uuid":["uuid","<1>"]},{"de ]]) OVSDB_CHECK_TRIGGER([trigger fires after delay], - ['ORDINAL_SCHEMA' [\ + ["`ordinal_schema`" [\ '["ordinals", {"op": "insert", "table": "ordinals", @@ -90,7 +90,7 @@ t=10: trigger 1 (delayed): [{}] ]]) OVSDB_CHECK_TRIGGER([delayed trigger modifies database], - ['ORDINAL_SCHEMA' [\ + ["`ordinal_schema`" [\ '["ordinals", {"op": "insert", "table": "ordinals", @@ -130,7 +130,7 @@ t=15: trigger 3 (immediate): [{"rows":[{"_uuid":["uuid","<2>"],"_version":["uuid ]]) OVSDB_CHECK_TRIGGER([one delayed trigger wakes up another], - ['ORDINAL_SCHEMA' [\ + ["`ordinal_schema`" [\ '["ordinals", {"op": "insert", "table": "ordinals",