[ovs-dev] [PATCH v3 1/3] ovsdb-idl.at: Make test outputs more predictable.

Dumitru Ceara dceara at redhat.com
Fri Mar 12 12:07:27 UTC 2021


IDL tests need predictable output from test-ovsdb.

This used to be done by first sorting the output of test-ovsdb and then
applying uuidfilt to predictably translate UUIDs.  This was not
reliable enough in case test-ovsdb processes two or more insert/delete
operations in the same iteration because the order of lines in the
output depends on the automatically generated UUID values.

To fix this we change the way test-ovsdb and test-ovsdb.py generate
outputs and prepend the table name and tracking information before
printing the contents of a row.

All existing ovsdb-idl.at and ovsdb-cluster.at tests are updated to
expect the new output format.

Signed-off-by: Dumitru Ceara <dceara at redhat.com>
---
Note: the old approach was enough for outputs of the existing tests but
the next patch in this series adds a new test that requires this
change.

v3:
- Changed expected output of ovsdb-cluster.at to reflect the new
  formatting in test-ovsdb output.
- Fixed typo in test-ovsdb.py.
v2:
- Reworked the patch and changed test-ovsdb.c and test-ovsdb.py to
  generate output that can be sorted predictably.
- Rephrased commit message.
---
 lib/ovsdb-idl.c        |    3 
 lib/ovsdb-idl.h        |    2 
 tests/ovsdb-cluster.at |    2 
 tests/ovsdb-idl.at     |  463 +++++++++++++++++++++++-------------------------
 tests/test-ovsdb.c     |  186 +++++++++++--------
 tests/test-ovsdb.py    |   87 +++++----
 6 files changed, 390 insertions(+), 353 deletions(-)

diff --git a/lib/ovsdb-idl.c b/lib/ovsdb-idl.c
index 2c8a0c9..9e1e787 100644
--- a/lib/ovsdb-idl.c
+++ b/lib/ovsdb-idl.c
@@ -182,7 +182,6 @@ ovsdb_idl_table_from_class(const struct ovsdb_idl *,
 static struct ovsdb_idl_table *
 ovsdb_idl_table_from_class(const struct ovsdb_idl *,
                            const struct ovsdb_idl_table_class *);
-static bool ovsdb_idl_track_is_set(struct ovsdb_idl_table *table);
 static void ovsdb_idl_track_clear__(struct ovsdb_idl *, bool flush_all);
 
 static void ovsdb_idl_destroy_indexes(struct ovsdb_idl_table *);
@@ -1140,7 +1139,7 @@ ovsdb_idl_track_add_all(struct ovsdb_idl *idl)
 }
 
 /* Returns true if 'table' has any tracked column. */
-static bool
+bool
 ovsdb_idl_track_is_set(struct ovsdb_idl_table *table)
 {
     size_t i;
diff --git a/lib/ovsdb-idl.h b/lib/ovsdb-idl.h
index 05bb48d..d934832 100644
--- a/lib/ovsdb-idl.h
+++ b/lib/ovsdb-idl.h
@@ -53,6 +53,7 @@ struct ovsdb_datum;
 struct ovsdb_idl_class;
 struct ovsdb_idl_row;
 struct ovsdb_idl_column;
+struct ovsdb_idl_table;
 struct ovsdb_idl_table_class;
 struct uuid;
 
@@ -217,6 +218,7 @@ unsigned int ovsdb_idl_row_get_seqno(
 void ovsdb_idl_track_add_column(struct ovsdb_idl *idl,
                                 const struct ovsdb_idl_column *column);
 void ovsdb_idl_track_add_all(struct ovsdb_idl *idl);
+bool ovsdb_idl_track_is_set(struct ovsdb_idl_table *table);
 const struct ovsdb_idl_row *ovsdb_idl_track_get_first(
     const struct ovsdb_idl *, const struct ovsdb_idl_table_class *);
 const struct ovsdb_idl_row *ovsdb_idl_track_get_next(const struct ovsdb_idl_row *);
diff --git a/tests/ovsdb-cluster.at b/tests/ovsdb-cluster.at
index 92aa427..cf43e9c 100644
--- a/tests/ovsdb-cluster.at
+++ b/tests/ovsdb-cluster.at
@@ -128,7 +128,7 @@ ovsdb_test_cluster_disconnect () {
            "rows": [{"i": 1}]}]]' > test-ovsdb.log 2>&1 &
     echo $! > test-ovsdb.pid
 
-    OVS_WAIT_UNTIL([grep "000: i=1" test-ovsdb.log])
+    OVS_WAIT_UNTIL([grep "000: table simple: i=1" test-ovsdb.log])
 
     # Start collecting raft_is_connected logs for $target before shutting down
     # any servers.
diff --git a/tests/ovsdb-idl.at b/tests/ovsdb-idl.at
index 4b4791a..610680c 100644
--- a/tests/ovsdb-idl.at
+++ b/tests/ovsdb-idl.at
@@ -355,28 +355,28 @@ OVSDB_CHECK_IDL([simple idl, initially empty, various ops],
     'reconnect']],
   [[000: empty
 001: {"error":null,"result":[{"uuid":["uuid","<0>"]},{"uuid":["uuid","<1>"]}]}
-002: i=0 r=0 b=false s= u=<2> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<1>
-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>
+002: table simple: i=0 r=0 b=false s= u=<2> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<1>
+002: table simple: 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>
 003: {"error":null,"result":[{"count":2}]}
-004: i=0 r=0 b=true s= u=<2> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<1>
-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>
+004: table simple: i=0 r=0 b=true s= u=<2> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<1>
+004: table simple: 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>
 005: {"error":null,"result":[{"count":2}]}
-006: i=0 r=123.5 b=true s= u=<2> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<1>
-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>
+006: table simple: i=0 r=123.5 b=true s= u=<2> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<1>
+006: table simple: 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>
 007: {"error":null,"result":[{"uuid":["uuid","<6>"]}]}
-008: i=-1 r=125 b=false s= u=<2> ia=[1] ra=[1.5] ba=[false] sa=[] ua=[] uuid=<6>
-008: i=0 r=123.5 b=true s= u=<2> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<1>
-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>
+008: table simple: i=-1 r=125 b=false s= u=<2> ia=[1] ra=[1.5] ba=[false] sa=[] ua=[] uuid=<6>
+008: table simple: i=0 r=123.5 b=true s= u=<2> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<1>
+008: table simple: 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>
 009: {"error":null,"result":[{"count":2}]}
-010: i=-1 r=125 b=false s=newstring u=<2> ia=[1] ra=[1.5] ba=[false] sa=[] ua=[] uuid=<6>
-010: i=0 r=123.5 b=true s=newstring u=<2> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<1>
-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>
+010: table simple: i=-1 r=125 b=false s=newstring u=<2> ia=[1] ra=[1.5] ba=[false] sa=[] ua=[] uuid=<6>
+010: table simple: i=0 r=123.5 b=true s=newstring u=<2> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<1>
+010: table simple: 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>
 011: {"error":null,"result":[{"count":1}]}
-012: i=-1 r=125 b=false s=newstring u=<2> ia=[1] ra=[1.5] ba=[false] sa=[] ua=[] uuid=<6>
-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>
+012: table simple: i=-1 r=125 b=false s=newstring u=<2> ia=[1] ra=[1.5] ba=[false] sa=[] ua=[] uuid=<6>
+012: table simple: 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>
 013: reconnect
-014: i=-1 r=125 b=false s=newstring u=<2> ia=[1] ra=[1.5] ba=[false] sa=[] ua=[] uuid=<6>
-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>
+014: table simple: i=-1 r=125 b=false s=newstring u=<2> ia=[1] ra=[1.5] ba=[false] sa=[] ua=[] uuid=<6>
+014: table simple: 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>
 015: done
 ]])
 
@@ -403,11 +403,11 @@ OVSDB_CHECK_IDL([simple idl, initially populated],
        "table": "simple",
        "where": [],
        "row": {"b": true}}]']],
-  [[000: i=0 r=0 b=false s= u=<0> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<1>
-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>
+  [[000: table simple: i=0 r=0 b=false s= u=<0> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<1>
+000: table simple: 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>
 001: {"error":null,"result":[{"count":2}]}
-002: i=0 r=0 b=true s= u=<0> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<1>
-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>
+002: table simple: i=0 r=0 b=true s= u=<0> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<1>
+002: table simple: 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>
 003: done
 ]])
 
@@ -431,14 +431,14 @@ OVSDB_CHECK_IDL([simple idl, writing via IDL],
        "row": {}}]']],
   [['verify 0 b, verify 1 r, set 0 b 1, set 1 r 3.5' \
     'insert 2, verify 2 i, verify 1 b, delete 1']],
-  [[000: i=0 r=0 b=false s= u=<0> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<1>
-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>
+  [[000: table simple: i=0 r=0 b=false s= u=<0> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<1>
+000: table simple: 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>
 001: commit, status=success
-002: i=0 r=0 b=true s= u=<0> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<1>
-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>
+002: table simple: i=0 r=0 b=true s= u=<0> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<1>
+002: table simple: 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>
 003: commit, status=success
-004: i=0 r=0 b=true s= u=<0> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<1>
-004: i=2 r=0 b=false s= u=<0> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<6>
+004: table simple: i=0 r=0 b=true s= u=<0> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<1>
+004: table simple: i=2 r=0 b=false s= u=<0> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<6>
 005: done
 ]])
 
@@ -448,10 +448,10 @@ OVSDB_CHECK_IDL([simple idl, writing via IDL with unicode],
        "table": "simple",
        "row": {"s": "(╯°□°)╯︵ ┻━┻"}}]']],
   [['set 0 b 1, insert 1, set 1 s "¯\_(ツ)_/¯"']],
-  [[000: i=0 r=0 b=false s=(╯°□°)╯︵ ┻━┻ u=<0> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<1>
+  [[000: table simple: i=0 r=0 b=false s=(╯°□°)╯︵ ┻━┻ u=<0> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<1>
 001: commit, status=success
-002: i=0 r=0 b=true s=(╯°□°)╯︵ ┻━┻ u=<0> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<1>
-002: i=1 r=0 b=false s="¯\_(ツ)_/¯" u=<0> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<2>
+002: table simple: i=0 r=0 b=true s=(╯°□°)╯︵ ┻━┻ u=<0> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<1>
+002: table simple: i=1 r=0 b=false s="¯\_(ツ)_/¯" u=<0> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<2>
 003: done
 ]])
 
@@ -475,10 +475,10 @@ OVSDB_CHECK_IDL_PY_WITH_EXPOUT([simple idl, writing large data via IDL with unic
        "table": "simple",
        "row": {"s": "'$(printf "测试超过四千零九十六个字节的中文字符串以使解码出现问题。%.0s" {1..50})'"}}]']],
   [['set 0 b 1, insert 1, set 1 s '$(printf "测试超过四千零九十六个字节的中文字符串以使解码出现问题。%.0s" {1..100})'']],
-  [[000: i=0 r=0 b=false s=$(printf "测试超过四千零九十六个字节的中文字符串以使解码出现问题。%.0s" {1..50}) u=<0> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<1>
+  [[000: table simple: i=0 r=0 b=false s=$(printf "测试超过四千零九十六个字节的中文字符串以使解码出现问题。%.0s" {1..50}) u=<0> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<1>
 001: commit, status=success
-002: i=0 r=0 b=true s=$(printf "测试超过四千零九十六个字节的中文字符串以使解码出现问题。%.0s" {1..50}) u=<0> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<1>
-002: i=1 r=0 b=false s=$(printf "测试超过四千零九十六个字节的中文字符串以使解码出现问题。%.0s" {1..100}) u=<0> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<2>
+002: table simple: i=0 r=0 b=true s=$(printf "测试超过四千零九十六个字节的中文字符串以使解码出现问题。%.0s" {1..50}) u=<0> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<1>
+002: table simple: i=1 r=0 b=false s=$(printf "测试超过四千零九十六个字节的中文字符串以使解码出现问题。%.0s" {1..100}) u=<0> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<2>
 003: done]])
 
 OVSDB_CHECK_IDL([simple idl, handling verification failure],
@@ -499,16 +499,16 @@ OVSDB_CHECK_IDL([simple idl, handling verification failure],
     '+verify 1 r, set 1 r 3' \
     'verify 1 r, set 1 r 3' \
     ]],
-  [[000: i=0 r=0 b=false s= u=<0> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<1>
-000: i=1 r=2 b=false s= u=<0> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<2>
+  [[000: table simple: i=0 r=0 b=false s= u=<0> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<1>
+000: table simple: i=1 r=2 b=false s= u=<0> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<2>
 001: commit, status=success
 002: {"error":null,"result":[{"count":1}]}
 003: commit, status=try again
-004: i=0 r=0 b=true s= u=<0> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<1>
-004: i=1 r=5 b=false s= u=<0> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<2>
+004: table simple: i=0 r=0 b=true s= u=<0> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<1>
+004: table simple: i=1 r=5 b=false s= u=<0> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<2>
 005: commit, status=success
-006: i=0 r=0 b=true s= u=<0> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<1>
-006: i=1 r=3 b=false s= u=<0> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<2>
+006: table simple: i=0 r=0 b=true s= u=<0> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<1>
+006: table simple: i=1 r=3 b=false s= u=<0> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<2>
 007: done
 ]])
 
@@ -518,9 +518,9 @@ OVSDB_CHECK_IDL([simple idl, increment operation],
        "table": "simple",
        "row": {}}]']],
   [['set 0 r 2.0, increment 0']],
-  [[000: i=0 r=0 b=false s= u=<0> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<1>
+  [[000: table simple: i=0 r=0 b=false s= u=<0> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<1>
 001: commit, status=success, increment=1
-002: i=1 r=2 b=false s= u=<0> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<1>
+002: table simple: i=1 r=2 b=false s= u=<0> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<1>
 003: done
 ]])
 
@@ -531,10 +531,10 @@ OVSDB_CHECK_IDL([simple idl, aborting],
        "row": {}}]']],
   [['set 0 r 2.0, abort' \
 '+set 0 b 1']],
-  [[000: i=0 r=0 b=false s= u=<0> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<1>
+  [[000: table simple: i=0 r=0 b=false s= u=<0> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<1>
 001: commit, status=aborted
 002: commit, status=success
-003: i=0 r=0 b=true s= u=<0> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<1>
+003: table simple: i=0 r=0 b=true s= u=<0> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<1>
 004: done
 ]])
 
@@ -545,10 +545,10 @@ OVSDB_CHECK_IDL([simple idl, destroy without commit or abort],
        "row": {}}]']],
   [['set 0 r 2.0, destroy' \
 '+set 0 b 1']],
-  [[000: i=0 r=0 b=false s= u=<0> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<1>
+  [[000: table simple: i=0 r=0 b=false s= u=<0> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<1>
 001: destroy
 002: commit, status=success
-003: i=0 r=0 b=true s= u=<0> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<1>
+003: table simple: i=0 r=0 b=true s= u=<0> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<1>
 004: done
 ]])
 
@@ -564,7 +564,7 @@ OVSDB_CHECK_IDL([simple idl, conditional, false condition],
   [[000: change conditions
 001: empty
 002: change conditions
-003: i=1 r=2 b=true s= u=<0> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<1>
+003: table simple: i=1 r=2 b=true s= u=<0> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<1>
 004: done
 ]])
 
@@ -580,7 +580,7 @@ OVSDB_CHECK_IDL([simple idl, conditional, true condition],
   [[000: change conditions
 001: empty
 002: change conditions
-003: i=1 r=2 b=true s= u=<0> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<1>
+003: table simple: i=1 r=2 b=true s= u=<0> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<1>
 004: done
 ]])
 
@@ -601,8 +601,8 @@ OVSDB_CHECK_IDL([simple idl, conditional, multiple clauses in condition],
   [[000: change conditions
 001: empty
 002: change conditions
-003: i=1 r=2 b=true s= u=<0> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<1>
-003: i=2 r=3 b=true s= u=<0> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<2>
+003: table simple: i=1 r=2 b=true s= u=<0> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<1>
+003: table simple: i=2 r=3 b=true s= u=<0> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<2>
 004: done
 ]])
 
@@ -618,7 +618,7 @@ OVSDB_CHECK_IDL([simple idl, conditional, modify as insert due to condition],
   [[000: change conditions
 001: empty
 002: change conditions
-003: i=1 r=2 b=true s= u=<0> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<1>
+003: table simple: i=1 r=2 b=true s= u=<0> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<1>
 004: done
 ]])
 
@@ -641,11 +641,11 @@ OVSDB_CHECK_IDL([simple idl, conditional, modify as delete due to condition],
   [[000: change conditions
 001: empty
 002: change conditions
-003: i=1 r=2 b=true s= u=<0> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<1>
+003: table simple: i=1 r=2 b=true s= u=<0> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<1>
 004: change conditions
 005: empty
 006: {"error":null,"result":[{"uuid":["uuid","<2>"]}]}
-007: i=2 r=3 b=true s= u=<0> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<2>
+007: table simple: i=2 r=3 b=true s= u=<0> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<2>
 008: done
 ]])
 
@@ -676,15 +676,15 @@ OVSDB_CHECK_IDL([simple idl, conditional, multiple tables],
   [[000: change conditions
 001: empty
 002: change conditions
-003: i=1 r=2 b=true s= u=<0> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<1>
+003: table simple: i=1 r=2 b=true s= u=<0> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<1>
 004: change conditions
-005: i=0 k=0 ka=[] l2= uuid=<2>
-005: i=1 r=2 b=true s= u=<0> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<1>
+005: table link1: i=0 k=0 ka=[] l2= uuid=<2>
+005: table simple: i=1 r=2 b=true s= u=<0> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<1>
 006: change conditions
 007: {"error":null,"result":[{"uuid":["uuid","<3>"]}]}
-008: i=0 k=0 ka=[] l2= uuid=<2>
-008: i=1 r=2 b=true s= u=<0> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<1>
-008: i=3 l1= uuid=<3>
+008: table link1: i=0 k=0 ka=[] l2= uuid=<2>
+008: table link2: i=3 l1= uuid=<3>
+008: table simple: i=1 r=2 b=true s= u=<0> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<1>
 009: done
 ]])
 
@@ -716,19 +716,19 @@ OVSDB_CHECK_IDL([self-linking idl, consistent ops],
        "row": {"k": ["uuid", "#0#"]}}]']],
   [[000: empty
 001: {"error":null,"result":[{"uuid":["uuid","<0>"]}]}
-002: i=0 k=0 ka=[] l2= uuid=<0>
+002: table link1: i=0 k=0 ka=[] l2= uuid=<0>
 003: {"error":null,"result":[{"uuid":["uuid","<1>"]},{"uuid":["uuid","<2>"]}]}
-004: i=0 k=0 ka=[] l2= uuid=<0>
-004: i=1 k=2 ka=[] l2= uuid=<1>
-004: i=2 k=1 ka=[] l2= uuid=<2>
+004: table link1: i=0 k=0 ka=[] l2= uuid=<0>
+004: table link1: i=1 k=2 ka=[] l2= uuid=<1>
+004: table link1: i=2 k=1 ka=[] l2= uuid=<2>
 005: {"error":null,"result":[{"count":1}]}
-006: i=0 k=0 ka=[] l2= uuid=<0>
-006: i=1 k=1 ka=[] l2= uuid=<1>
-006: i=2 k=1 ka=[] l2= uuid=<2>
+006: table link1: i=0 k=0 ka=[] l2= uuid=<0>
+006: table link1: i=1 k=1 ka=[] l2= uuid=<1>
+006: table link1: i=2 k=1 ka=[] l2= uuid=<2>
 007: {"error":null,"result":[{"count":3}]}
-008: i=0 k=0 ka=[] l2= uuid=<0>
-008: i=1 k=0 ka=[] l2= uuid=<1>
-008: i=2 k=0 ka=[] l2= uuid=<2>
+008: table link1: i=0 k=0 ka=[] l2= uuid=<0>
+008: table link1: i=1 k=0 ka=[] l2= uuid=<1>
+008: table link1: i=2 k=0 ka=[] l2= uuid=<2>
 009: done
 ]])
 
@@ -767,12 +767,12 @@ OVSDB_CHECK_IDL([self-linking idl, inconsistent ops],
   [[000: empty
 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"}]}
 002: {"error":null,"result":[{"uuid":["uuid","<2>"]},{"uuid":["uuid","<3>"]}]}
-003: i=1 k=1 ka=[] l2= uuid=<2>
-003: i=2 k=1 ka=[] l2= uuid=<3>
+003: table link1: i=1 k=1 ka=[] l2= uuid=<2>
+003: table link1: i=2 k=1 ka=[] l2= uuid=<3>
 004: {"error":null,"result":[{"count":2},{"details":"Table link1 column k row <x> references nonexistent row <4> in table link1.","error":"referential integrity violation"}]}
 005: {"error":null,"result":[{"count":1},{"details":"cannot delete link1 row <2> because of 1 remaining reference(s)","error":"referential integrity violation"}]}
 006: {"error":null,"result":[{"count":1}]}
-007: i=1 k=1 ka=[] l2= uuid=<2>
+007: table link1: i=1 k=1 ka=[] l2= uuid=<2>
 008: {"error":null,"result":[{"count":1}]}
 009: empty
 010: done
@@ -815,15 +815,15 @@ OVSDB_CHECK_IDL([self-linking idl, sets],
        "where": []}]']],
   [[000: empty
 001: {"error":null,"result":[{"uuid":["uuid","<0>"]},{"uuid":["uuid","<1>"]},{"uuid":["uuid","<2>"]},{"uuid":["uuid","<3>"]}]}
-002: i=0 k=0 ka=[0] l2= uuid=<0>
-002: i=1 k=0 ka=[1] l2= uuid=<1>
-002: i=2 k=0 ka=[2] l2= uuid=<2>
-002: i=3 k=0 ka=[3] l2= uuid=<3>
+002: table link1: i=0 k=0 ka=[0] l2= uuid=<0>
+002: table link1: i=1 k=0 ka=[1] l2= uuid=<1>
+002: table link1: i=2 k=0 ka=[2] l2= uuid=<2>
+002: table link1: i=3 k=0 ka=[3] l2= uuid=<3>
 003: {"error":null,"result":[{"count":4}]}
-004: i=0 k=0 ka=[0 1 2 3] l2= uuid=<0>
-004: i=1 k=0 ka=[0 1 2 3] l2= uuid=<1>
-004: i=2 k=0 ka=[0 1 2 3] l2= uuid=<2>
-004: i=3 k=0 ka=[0 1 2 3] l2= uuid=<3>
+004: table link1: i=0 k=0 ka=[0 1 2 3] l2= uuid=<0>
+004: table link1: i=1 k=0 ka=[0 1 2 3] l2= uuid=<1>
+004: table link1: i=2 k=0 ka=[0 1 2 3] l2= uuid=<2>
+004: table link1: i=3 k=0 ka=[0 1 2 3] l2= uuid=<3>
 005: {"error":null,"result":[{"count":1},{"details":"Table link1 column ka row <2> references nonexistent row <4> in table link1.","error":"referential integrity violation"}]}
 006: {"error":null,"result":[{"count":4}]}
 007: empty
@@ -843,8 +843,8 @@ OVSDB_CHECK_IDL([external-linking idl, consistent ops],
        "uuid-name": "row1"}]']],
   [[000: empty
 001: {"error":null,"result":[{"uuid":["uuid","<0>"]},{"uuid":["uuid","<1>"]}]}
-002: i=0 l1= uuid=<0>
-002: i=1 k=1 ka=[] l2=0 uuid=<1>
+002: table link1: i=1 k=1 ka=[] l2=0 uuid=<1>
+002: table link2: i=0 l1= uuid=<0>
 003: done
 ]])
 
@@ -867,10 +867,10 @@ OVSDB_CHECK_IDL([singleton idl, constraints],
        "row": {"name": "bar"}}]']],
   [[000: empty
 001: {"error":null,"result":[{"uuid":["uuid","<0>"]}]}
-002: name=foo uuid=<0>
+002: table singleton: name=foo uuid=<0>
 003: {"error":null,"result":[{"uuid":["uuid","<1>"]},{"details":"transaction causes \"singleton\" table to contain 2 rows, greater than the schema-defined limit of 1 row(s)","error":"constraint violation"}]}
 004: {"error":null,"result":[{"count":1},{"uuid":["uuid","<2>"]}]}
-005: name=bar uuid=<2>
+005: table singleton: name=bar uuid=<2>
 006: done
 ]])
 
@@ -879,8 +879,8 @@ OVSDB_CHECK_IDL_PY([external-linking idl, insert ops],
   [['linktest']],
   [[000: empty
 001: commit, status=success
-002: i=1 k=1 ka=[1] l2= uuid=<0>
-002: i=2 k=1 ka=[1 2] l2= uuid=<1>
+002: table link1: i=1 k=1 ka=[1] l2= uuid=<0>
+002: table link1: i=2 k=1 ka=[1 2] l2= uuid=<1>
 003: done
 ]])
 
@@ -889,7 +889,7 @@ OVSDB_CHECK_IDL_PY([getattr idl, insert ops],
   [['getattrtest']],
   [[000: empty
 001: commit, status=success
-002: i=2 k=2 ka=[] l2= uuid=<0>
+002: table link1: i=2 k=2 ka=[] l2= uuid=<0>
 003: done
 ]])
 
@@ -902,11 +902,11 @@ OVSDB_CHECK_IDL_PY([row-from-json idl, whats this],
        "table": "simple",
        "row": {}}]']],
   [['notifytest insert 2, notifytest set 1 b 1, notifytest delete 0']],
-  [[000: i=0 r=0 b=false s= u=<0> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<1>
-000: i=1 r=0 b=false s= u=<0> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<2>
+  [[000: table simple: i=0 r=0 b=false s= u=<0> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<1>
+000: table simple: i=1 r=0 b=false s= u=<0> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<2>
 001: commit, status=success, events=create|2|None, delete|0|None, update|1|b
-002: i=1 r=0 b=true s= u=<0> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<2>
-002: i=2 r=0 b=false s= u=<0> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<3>
+002: table simple: i=1 r=0 b=true s= u=<0> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<2>
+002: table simple: i=2 r=0 b=false s= u=<0> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<3>
 003: done
 ]])
 
@@ -946,19 +946,19 @@ AT_CHECK([test-ovsdb '-vPATTERN:console:test-ovsdb|%c|%m' -vjsonrpc -t10 idl uni
 AT_CHECK([sort stdout | uuidfilt], [0],
     [[000: empty
 001: {"error":null,"result":[{"uuid":["uuid","<0>"]}]}
-002: i=0 k=0 ka=[] l2= uuid=<0>
+002: table link1: i=0 k=0 ka=[] l2= uuid=<0>
 003: {"error":null,"result":[{"uuid":["uuid","<1>"]},{"uuid":["uuid","<2>"]}]}
-004: i=0 k=0 ka=[] l2= uuid=<0>
-004: i=1 k=2 ka=[] l2= uuid=<1>
-004: i=2 k=1 ka=[] l2= uuid=<2>
+004: table link1: i=0 k=0 ka=[] l2= uuid=<0>
+004: table link1: i=1 k=2 ka=[] l2= uuid=<1>
+004: table link1: i=2 k=1 ka=[] l2= uuid=<2>
 005: {"error":null,"result":[{"count":1}]}
-006: i=0 k=0 ka=[] l2= uuid=<0>
-006: i=1 k=1 ka=[] l2= uuid=<1>
-006: i=2 k=1 ka=[] l2= uuid=<2>
+006: table link1: i=0 k=0 ka=[] l2= uuid=<0>
+006: table link1: i=1 k=1 ka=[] l2= uuid=<1>
+006: table link1: i=2 k=1 ka=[] l2= uuid=<2>
 007: {"error":null,"result":[{"count":3}]}
-008: i=0 k=0 ka=[] l2= uuid=<0>
-008: i=1 k=0 ka=[] l2= uuid=<1>
-008: i=2 k=0 ka=[] l2= uuid=<2>
+008: table link1: i=0 k=0 ka=[] l2= uuid=<0>
+008: table link1: i=1 k=0 ka=[] l2= uuid=<1>
+008: table link1: i=2 k=0 ka=[] l2= uuid=<2>
 009: done
 ]])
 
@@ -1022,11 +1022,11 @@ OVSDB_CHECK_IDL_FETCH_COLUMNS([simple idl, initially populated],
        "row": {}}]']],
   [?simple:i,r!],
   ['fetch 0 r'],
-  [[000: i=0 uuid=<0>
-000: i=1 uuid=<1>
+  [[000: table simple: i=0 uuid=<0>
+000: table simple: i=1 uuid=<1>
 001: commit, status=success
-002: i=0 r=0 uuid=<0>
-002: i=1 uuid=<1>
+002: table simple: i=0 r=0 uuid=<0>
+002: table simple: i=1 uuid=<1>
 003: done
 ]])
 
@@ -1098,28 +1098,28 @@ OVSDB_CHECK_IDL_WO_MONITOR_COND([simple idl disable monitor-cond],
     'reconnect']],
   [[000: empty
 001: {"error":null,"result":[{"uuid":["uuid","<0>"]},{"uuid":["uuid","<1>"]}]}
-002: i=0 r=0 b=false s= u=<2> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<1>
-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>
+002: table simple: i=0 r=0 b=false s= u=<2> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<1>
+002: table simple: 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>
 003: {"error":null,"result":[{"count":2}]}
-004: i=0 r=0 b=true s= u=<2> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<1>
-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>
+004: table simple: i=0 r=0 b=true s= u=<2> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<1>
+004: table simple: 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>
 005: {"error":null,"result":[{"count":2}]}
-006: i=0 r=123.5 b=true s= u=<2> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<1>
-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>
+006: table simple: i=0 r=123.5 b=true s= u=<2> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<1>
+006: table simple: 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>
 007: {"error":null,"result":[{"uuid":["uuid","<6>"]}]}
-008: i=-1 r=125 b=false s= u=<2> ia=[1] ra=[1.5] ba=[false] sa=[] ua=[] uuid=<6>
-008: i=0 r=123.5 b=true s= u=<2> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<1>
-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>
+008: table simple: i=-1 r=125 b=false s= u=<2> ia=[1] ra=[1.5] ba=[false] sa=[] ua=[] uuid=<6>
+008: table simple: i=0 r=123.5 b=true s= u=<2> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<1>
+008: table simple: 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>
 009: {"error":null,"result":[{"count":2}]}
-010: i=-1 r=125 b=false s=newstring u=<2> ia=[1] ra=[1.5] ba=[false] sa=[] ua=[] uuid=<6>
-010: i=0 r=123.5 b=true s=newstring u=<2> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<1>
-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>
+010: table simple: i=-1 r=125 b=false s=newstring u=<2> ia=[1] ra=[1.5] ba=[false] sa=[] ua=[] uuid=<6>
+010: table simple: i=0 r=123.5 b=true s=newstring u=<2> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<1>
+010: table simple: 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>
 011: {"error":null,"result":[{"count":1}]}
-012: i=-1 r=125 b=false s=newstring u=<2> ia=[1] ra=[1.5] ba=[false] sa=[] ua=[] uuid=<6>
-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>
+012: table simple: i=-1 r=125 b=false s=newstring u=<2> ia=[1] ra=[1.5] ba=[false] sa=[] ua=[] uuid=<6>
+012: table simple: 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>
 013: reconnect
-014: i=-1 r=125 b=false s=newstring u=<2> ia=[1] ra=[1.5] ba=[false] sa=[] ua=[] uuid=<6>
-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>
+014: table simple: i=-1 r=125 b=false s=newstring u=<2> ia=[1] ra=[1.5] ba=[false] sa=[] ua=[] uuid=<6>
+014: table simple: 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>
 015: done
 ]])
 
@@ -1162,13 +1162,12 @@ OVSDB_CHECK_IDL_TRACK([track, simple idl, initially populated],
        "table": "simple",
        "where": [],
        "row": {"b": true}}]']],
-  [[000: i=1 r=2 b=true s=mystring u=<0> ia=[1 2 3] ra=[-0.5] ba=[true] sa=[abc def] ua=[<1> <2>] uuid=<3>
-000: inserted row: uuid=<3>
-000: updated columns: b ba i ia r ra s sa u ua
+  [[000: table simple: inserted row: i=1 r=2 b=true s=mystring u=<0> ia=[1 2 3] ra=[-0.5] ba=[true] sa=[abc def] ua=[<1> <2>] uuid=<3>
+000: table simple: updated columns: b ba i ia r ra s sa u ua
 001: {"error":null,"result":[{"count":2}]}
-002: i=0 r=0 b=true s= u=<4> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<5>
-002: i=1 r=2 b=true s=mystring u=<0> ia=[1 2 3] ra=[-0.5] ba=[true] sa=[abc def] ua=[<1> <2>] uuid=<3>
-002: updated columns: b
+002: table simple: i=0 r=0 b=true s= u=<4> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<5>
+002: table simple: i=1 r=2 b=true s=mystring u=<0> ia=[1 2 3] ra=[-0.5] ba=[true] sa=[abc def] ua=[<1> <2>] uuid=<3>
+002: table simple: updated columns: b
 003: done
 ]])
 
@@ -1209,19 +1208,17 @@ OVSDB_CHECK_IDL_TRACK([track, simple idl, initially populated, orphan weak refer
       "table": "simple6",
       "where": []}]']],
   [[000: change conditions
-001: inserted row: uuid=<0>
-001: name=first_row weak_ref=[] uuid=<0>
-001: updated columns: name weak_ref
+001: table simple6: inserted row: name=first_row weak_ref=[] uuid=<0>
+001: table simple6: updated columns: name weak_ref
 002: change conditions
-003: i=0 r=0 b=false s=row1_s u=<1> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<2>
-003: inserted row: uuid=<2>
-003: name=first_row weak_ref=[<2>] uuid=<0>
-003: updated columns: s
+003: table simple6: name=first_row weak_ref=[<1>] uuid=<0>
+003: table simple: inserted row: i=0 r=0 b=false s=row1_s u=<2> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<1>
+003: table simple: updated columns: s
 004: {"error":null,"result":[{"count":1}]}
-005: name=new_name weak_ref=[<2>] uuid=<0>
-005: updated columns: name
+005: table simple6: name=new_name weak_ref=[<1>] uuid=<0>
+005: table simple6: updated columns: name
 006: {"error":null,"result":[{"count":1}]}
-007: i=0 r=0 b=false s=row1_s u=<1> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<2>
+007: table simple: i=0 r=0 b=false s=row1_s u=<2> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<1>
 008: done
 ]])
 
@@ -1253,27 +1250,22 @@ OVSDB_CHECK_IDL_TRACK([track, simple idl, initially populated, orphan rows, cond
       "table": "simple6",
       "where": []}]']],
   [[000: change conditions
-001: inserted row: uuid=<0>
-001: name=first_row weak_ref=[] uuid=<0>
-001: updated columns: name weak_ref
+001: table simple6: inserted row: name=first_row weak_ref=[] uuid=<0>
+001: table simple6: updated columns: name weak_ref
 002: change conditions
-003: i=0 r=0 b=false s=row0_s u=<1> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<2>
-003: inserted row: uuid=<2>
-003: name=first_row weak_ref=[<2>] uuid=<0>
-003: updated columns: s
+003: table simple6: name=first_row weak_ref=[<1>] uuid=<0>
+003: table simple: inserted row: i=0 r=0 b=false s=row0_s u=<2> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<1>
+003: table simple: updated columns: s
 004: change conditions
-005: i=0 r=0 b=false s=row1_s u=<1> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<3>
-005: inserted row: uuid=<3>
-005: updated columns: s
+005: table simple: inserted row: i=0 r=0 b=false s=row1_s u=<2> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<3>
+005: table simple: updated columns: s
 006: change conditions
-007: deleted row: uuid=<3>
-007: i=0 r=0 b=false s=row0_s u=<1> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<2>
-007: i=0 r=0 b=false s=row1_s u=<1> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<3>
-007: inserted row: uuid=<2>
-007: name=first_row weak_ref=[<2>] uuid=<0>
-007: updated columns: s
+007: table simple6: name=first_row weak_ref=[<1>] uuid=<0>
+007: table simple: deleted row: i=0 r=0 b=false s=row1_s u=<2> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<3>
+007: table simple: inserted row: i=0 r=0 b=false s=row0_s u=<2> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<1>
+007: table simple: updated columns: s
 008: {"error":null,"result":[{"count":1}]}
-009: i=0 r=0 b=false s=row0_s u=<1> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<2>
+009: table simple: i=0 r=0 b=false s=row0_s u=<2> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<1>
 010: done
 ]])
 
@@ -1330,34 +1322,31 @@ OVSDB_CHECK_IDL_TRACK([track, simple idl, initially empty, various ops],
     'reconnect']],
   [[000: empty
 001: {"error":null,"result":[{"uuid":["uuid","<0>"]},{"uuid":["uuid","<1>"]}]}
-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=<0>
-002: inserted row: uuid=<0>
-002: updated columns: b ba i ia r ra s sa u ua
+002: table simple: inserted row: 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=<0>
+002: table simple: updated columns: b ba i ia r ra s sa u ua
 003: {"error":null,"result":[{"count":2}]}
-004: i=0 r=0 b=true s= u=<5> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<1>
-004: updated columns: b
+004: table simple: i=0 r=0 b=true s= u=<5> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<1>
+004: table simple: updated columns: b
 005: {"error":null,"result":[{"count":2}]}
-006: i=0 r=123.5 b=true s= u=<5> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<1>
-006: i=1 r=123.5 b=true s=mystring u=<2> ia=[1 2 3] ra=[-0.5] ba=[true] sa=[abc def] ua=[<3> <4>] uuid=<0>
-006: updated columns: r
-006: updated columns: r
+006: table simple: i=0 r=123.5 b=true s= u=<5> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<1>
+006: table simple: i=1 r=123.5 b=true s=mystring u=<2> ia=[1 2 3] ra=[-0.5] ba=[true] sa=[abc def] ua=[<3> <4>] uuid=<0>
+006: table simple: updated columns: r
+006: table simple: updated columns: r
 007: {"error":null,"result":[{"uuid":["uuid","<6>"]}]}
-008: i=-1 r=125 b=false s= u=<5> ia=[1] ra=[1.5] ba=[false] sa=[] ua=[] uuid=<6>
-008: inserted row: uuid=<6>
-008: updated columns: ba i ia r ra
+008: table simple: inserted row: i=-1 r=125 b=false s= u=<5> ia=[1] ra=[1.5] ba=[false] sa=[] ua=[] uuid=<6>
+008: table simple: updated columns: ba i ia r ra
 009: {"error":null,"result":[{"count":2}]}
-010: i=-1 r=125 b=false s=newstring u=<5> ia=[1] ra=[1.5] ba=[false] sa=[] ua=[] uuid=<6>
-010: i=0 r=123.5 b=true s=newstring u=<5> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<1>
-010: updated columns: s
-010: updated columns: s
+010: table simple: i=-1 r=125 b=false s=newstring u=<5> ia=[1] ra=[1.5] ba=[false] sa=[] ua=[] uuid=<6>
+010: table simple: i=0 r=123.5 b=true s=newstring u=<5> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<1>
+010: table simple: updated columns: s
+010: table simple: updated columns: s
 011: {"error":null,"result":[{"count":1}]}
-012: deleted row: uuid=<1>
-012: i=0 r=123.5 b=true s=newstring u=<5> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<1>
+012: table simple: deleted row: i=0 r=123.5 b=true s=newstring u=<5> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<1>
 013: reconnect
-014: i=-1 r=125 b=false s=newstring u=<5> ia=[1] ra=[1.5] ba=[false] sa=[] ua=[] uuid=<6>
-014: i=1 r=123.5 b=true s=mystring u=<2> ia=[1 2 3] ra=[-0.5] ba=[true] sa=[abc def] ua=[<3> <4>] uuid=<0>
-014: updated columns: b ba i ia r ra s sa u ua
-014: updated columns: ba i ia r ra s
+014: table simple: inserted row: i=-1 r=125 b=false s=newstring u=<5> ia=[1] ra=[1.5] ba=[false] sa=[] ua=[] uuid=<6>
+014: table simple: inserted row: i=1 r=123.5 b=true s=mystring u=<2> ia=[1 2 3] ra=[-0.5] ba=[true] sa=[abc def] ua=[<3> <4>] uuid=<0>
+014: table simple: updated columns: b ba i ia r ra s sa u ua
+014: table simple: updated columns: ba i ia r ra s
 015: done
 ]])
 
@@ -1397,16 +1386,16 @@ OVSDB_CHECK_IDL_PY([partial-map idl],
                 "row":{"name":"myString1","smap":["map",[["key1","value1"],["key2","value2"]]]} }]']
 ],
   [?simple2:name,smap,imap 'partialmapinsertelement' 'partialmapinsertmultipleelements' 'partialmapdelelements' 'partialmapmutatenew'],
-[[000: name=myString1 smap=[(key1 value1) (key2 value2)] imap=[]
+[[000: table simple2: name=myString1 smap=[(key1 value1) (key2 value2)] imap=[] uuid=<0>
 001: commit, status=success
-002: name=String2 smap=[(key1 myList1) (key2 value2)] imap=[(3 myids2)]
+002: table simple2: name=String2 smap=[(key1 myList1) (key2 value2)] imap=[(3 myids2)] uuid=<0>
 003: commit, status=success
-004: name=String2 smap=[(key1 myList1) (key2 myList2) (key3 myList3) (key4 myList4)] imap=[(3 myids2)]
+004: table simple2: name=String2 smap=[(key1 myList1) (key2 myList2) (key3 myList3) (key4 myList4)] imap=[(3 myids2)] uuid=<0>
 005: commit, status=success
-006: name=String2 smap=[(key2 myList2)] imap=[(3 myids2)]
+006: table simple2: name=String2 smap=[(key2 myList2)] imap=[(3 myids2)] uuid=<0>
 007: commit, status=success
-008: name=String2 smap=[(key2 myList2)] imap=[(3 myids2)]
-008: name=String2New smap=[(key1 newList1) (key2 newList2)] imap=[]
+008: table simple2: name=String2 smap=[(key2 myList2)] imap=[(3 myids2)] uuid=<0>
+008: table simple2: name=String2New smap=[(key1 newList1) (key2 newList2)] imap=[] uuid=<1>
 009: done
 ]])
 
@@ -1414,11 +1403,11 @@ OVSDB_CHECK_IDL_PY([partial-map update set refmap idl],
 [['["idltest", {"op":"insert", "table":"simple3", "row":{"name":"myString1"}},
                {"op":"insert", "table":"simple5", "row":{"name":"myString2"}}]']],
 ['partialmapmutateirefmap'],
-[[000: name=myString1 uset=[]
-000: name=myString2 irefmap=[]
+[[000: table simple3: name=myString1 uset=[] uuid=<0>
+000: table simple5: name=myString2 irefmap=[] uuid=<1>
 001: commit, status=success
-002: name=myString1 uset=[]
-002: name=myString2 irefmap=[(1 <0>)]
+002: table simple3: name=myString1 uset=[] uuid=<0>
+002: table simple5: name=myString2 irefmap=[(1 <0>)] uuid=<1>
 003: done
 ]])
 
@@ -1441,17 +1430,17 @@ OVSDB_CHECK_IDL_PARTIAL_UPDATE_SET_COLUMN([set, simple3 idl-partial-update-set-c
 ],
 [],
 [[000: Getting records
-001: name=mySet1 uset=[[<0>],[<1>]] uref=[]
+001: table simple3: name=mySet1 uset=[[<0>],[<1>]] uref=[] uuid=<2>
 002: After rename+add new value
-003: name=String2 uset=[[<0>],[<1>],[<2>]] uref=[]
+003: table simple3: name=String2 uset=[[<0>],[<1>],[<3>]] uref=[] uuid=<2>
 004: After add new value
-005: name=String2 uset=[[<0>],[<1>],[<2>],[<3>]] uref=[]
+005: table simple3: name=String2 uset=[[<0>],[<1>],[<3>],[<4>]] uref=[] uuid=<2>
 006: After delete value
-007: name=String2 uset=[[<0>],[<1>],[<3>]] uref=[]
+007: table simple3: name=String2 uset=[[<0>],[<1>],[<4>]] uref=[] uuid=<2>
 008: After trying to delete a deleted value
-009: name=String2 uset=[[<0>],[<1>],[<3>]] uref=[]
+009: table simple3: name=String2 uset=[[<0>],[<1>],[<4>]] uref=[] uuid=<2>
 010: After add to other table + set of strong ref
-011: name=String2 uset=[[<0>],[<1>],[<3>]] uref=[[<4>]]
+011: table simple3: name=String2 uset=[[<0>],[<1>],[<4>]] uref=[[<5>]] uuid=<2>
 012: End test
 ]])
 
@@ -1463,22 +1452,22 @@ OVSDB_CHECK_IDL_PY([partial-set idl],
                     "mutations": [["uset", "insert", ["set", [["uuid", "000d2f6a-76af-412f-b59d-e7bcd3e84eff"]]]]]}]']
 ],
   ['partialrenamesetadd' 'partialduplicateadd' 'partialsetdel' 'partialsetref' 'partialsetoverrideops' 'partialsetadddelete' 'partialsetmutatenew'],
-[[000: name=mySet1 uset=[<0> <1>]
+[[000: table simple3: name=mySet1 uset=[<0> <1>] uuid=<2>
 001: commit, status=success
-002: name=String2 uset=[<0> <1> <2>]
+002: table simple3: name=String2 uset=[<0> <1> <3>] uuid=<2>
 003: commit, status=success
-004: name=String2 uset=[<0> <1> <2> <3>]
+004: table simple3: name=String2 uset=[<0> <1> <3> <4>] uuid=<2>
 005: commit, status=success
-006: name=String2 uset=[<0> <1> <3>]
+006: table simple3: name=String2 uset=[<0> <1> <4>] uuid=<2>
 007: commit, status=success
-008: name=String2 uset=[<0> <1> <3>]
+008: table simple3: name=String2 uset=[<0> <1> <4>] uuid=<2>
 009: commit, status=success
-010: name=String2 uset=[<3>]
+010: table simple3: name=String2 uset=[<4>] uuid=<2>
 011: commit, status=success
-012: name=String2 uset=[<4> <5>]
+012: table simple3: name=String2 uset=[<5> <6>] uuid=<2>
 013: commit, status=success
-014: name=String2 uset=[<4> <5>]
-014: name=String3 uset=[<6>]
+014: table simple3: name=String2 uset=[<5> <6>] uuid=<2>
+014: table simple3: name=String3 uset=[<7>] uuid=<8>
 015: done
 ]])
 
@@ -1538,44 +1527,44 @@ OVSDB_CHECK_IDL_NOTIFY([simple idl verify notify],
        "where": [["i", "==", 0]]}]' \
     'reconnect']],
   [[000: empty
-000: event:create, row={uuid=<0>}, updates=None
-000: event:create, row={uuid=<1>}, updates=None
-001: {"error":null,"result":[{"uuid":["uuid","<2>"]},{"uuid":["uuid","<3>"]}]}
-002: event:create, row={i=0 r=0 b=false s= u=<4> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<3>}, updates=None
-002: event:create, row={i=1 r=2 b=true s=mystring u=<5> ia=[1 2 3] ra=[-0.5] ba=[true] sa=[abc def] ua=[<6> <7>] uuid=<2>}, updates=None
-002: i=0 r=0 b=false s= u=<4> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<3>
-002: i=1 r=2 b=true s=mystring u=<5> ia=[1 2 3] ra=[-0.5] ba=[true] sa=[abc def] ua=[<6> <7>] uuid=<2>
+000: event:create, row={}, updates=None
+000: event:create, row={}, updates=None
+001: {"error":null,"result":[{"uuid":["uuid","<0>"]},{"uuid":["uuid","<1>"]}]}
+002: event:create, row={i=0 r=0 b=false s= u=<2> ia=[] ra=[] ba=[] sa=[] ua=[]}, updates=None
+002: event:create, row={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>]}, updates=None
+002: table simple: i=0 r=0 b=false s= u=<2> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<1>
+002: table simple: 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>
 003: {"error":null,"result":[{"count":2}]}
-004: event:update, row={i=1 r=2 b=false s=mystring u=<5> ia=[1 2 3] ra=[-0.5] ba=[true] sa=[abc def] ua=[<6> <7>] uuid=<2>}, updates={b=true uuid=<2>}
-004: i=0 r=0 b=false s= u=<4> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<3>
-004: i=1 r=2 b=false s=mystring u=<5> ia=[1 2 3] ra=[-0.5] ba=[true] sa=[abc def] ua=[<6> <7>] uuid=<2>
+004: event:update, row={i=1 r=2 b=false s=mystring u=<3> ia=[1 2 3] ra=[-0.5] ba=[true] sa=[abc def] ua=[<4> <5>]}, updates={b=true}
+004: table simple: i=0 r=0 b=false s= u=<2> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<1>
+004: table simple: i=1 r=2 b=false s=mystring u=<3> ia=[1 2 3] ra=[-0.5] ba=[true] sa=[abc def] ua=[<4> <5>] uuid=<0>
 005: {"error":null,"result":[{"count":2}]}
-006: event:update, row={i=0 r=123.5 b=false s= u=<4> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<3>}, updates={r=0 uuid=<3>}
-006: event:update, row={i=1 r=123.5 b=false s=mystring u=<5> ia=[1 2 3] ra=[-0.5] ba=[true] sa=[abc def] ua=[<6> <7>] uuid=<2>}, updates={r=2 uuid=<2>}
-006: i=0 r=123.5 b=false s= u=<4> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<3>
-006: i=1 r=123.5 b=false s=mystring u=<5> ia=[1 2 3] ra=[-0.5] ba=[true] sa=[abc def] ua=[<6> <7>] uuid=<2>
-007: {"error":null,"result":[{"uuid":["uuid","<8>"]}]}
-008: event:create, row={i=-1 r=125 b=false s= u=<4> ia=[1] ra=[1.5] ba=[false] sa=[] ua=[] uuid=<8>}, updates=None
-008: i=-1 r=125 b=false s= u=<4> ia=[1] ra=[1.5] ba=[false] sa=[] ua=[] uuid=<8>
-008: i=0 r=123.5 b=false s= u=<4> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<3>
-008: i=1 r=123.5 b=false s=mystring u=<5> ia=[1 2 3] ra=[-0.5] ba=[true] sa=[abc def] ua=[<6> <7>] uuid=<2>
+006: event:update, row={i=0 r=123.5 b=false s= u=<2> ia=[] ra=[] ba=[] sa=[] ua=[]}, updates={r=0}
+006: event:update, row={i=1 r=123.5 b=false s=mystring u=<3> ia=[1 2 3] ra=[-0.5] ba=[true] sa=[abc def] ua=[<4> <5>]}, updates={r=2}
+006: table simple: i=0 r=123.5 b=false s= u=<2> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<1>
+006: table simple: i=1 r=123.5 b=false s=mystring u=<3> ia=[1 2 3] ra=[-0.5] ba=[true] sa=[abc def] ua=[<4> <5>] uuid=<0>
+007: {"error":null,"result":[{"uuid":["uuid","<6>"]}]}
+008: event:create, row={i=-1 r=125 b=false s= u=<2> ia=[1] ra=[1.5] ba=[false] sa=[] ua=[]}, updates=None
+008: table simple: i=-1 r=125 b=false s= u=<2> ia=[1] ra=[1.5] ba=[false] sa=[] ua=[] uuid=<6>
+008: table simple: i=0 r=123.5 b=false s= u=<2> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<1>
+008: table simple: i=1 r=123.5 b=false s=mystring u=<3> ia=[1 2 3] ra=[-0.5] ba=[true] sa=[abc def] ua=[<4> <5>] uuid=<0>
 009: {"error":null,"result":[{"count":2}]}
-010: event:update, row={i=-1 r=125 b=false s=newstring u=<4> ia=[1] ra=[1.5] ba=[false] sa=[] ua=[] uuid=<8>}, updates={s= uuid=<8>}
-010: event:update, row={i=0 r=123.5 b=false s=newstring u=<4> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<3>}, updates={s= uuid=<3>}
-010: i=-1 r=125 b=false s=newstring u=<4> ia=[1] ra=[1.5] ba=[false] sa=[] ua=[] uuid=<8>
-010: i=0 r=123.5 b=false s=newstring u=<4> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<3>
-010: i=1 r=123.5 b=false s=mystring u=<5> ia=[1 2 3] ra=[-0.5] ba=[true] sa=[abc def] ua=[<6> <7>] uuid=<2>
+010: event:update, row={i=-1 r=125 b=false s=newstring u=<2> ia=[1] ra=[1.5] ba=[false] sa=[] ua=[]}, updates={s=}
+010: event:update, row={i=0 r=123.5 b=false s=newstring u=<2> ia=[] ra=[] ba=[] sa=[] ua=[]}, updates={s=}
+010: table simple: i=-1 r=125 b=false s=newstring u=<2> ia=[1] ra=[1.5] ba=[false] sa=[] ua=[] uuid=<6>
+010: table simple: i=0 r=123.5 b=false s=newstring u=<2> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<1>
+010: table simple: i=1 r=123.5 b=false s=mystring u=<3> ia=[1 2 3] ra=[-0.5] ba=[true] sa=[abc def] ua=[<4> <5>] uuid=<0>
 011: {"error":null,"result":[{"count":1}]}
-012: event:delete, row={i=0 r=123.5 b=false s=newstring u=<4> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<3>}, updates=None
-012: i=-1 r=125 b=false s=newstring u=<4> ia=[1] ra=[1.5] ba=[false] sa=[] ua=[] uuid=<8>
-012: i=1 r=123.5 b=false s=mystring u=<5> ia=[1 2 3] ra=[-0.5] ba=[true] sa=[abc def] ua=[<6> <7>] uuid=<2>
+012: event:delete, row={i=0 r=123.5 b=false s=newstring u=<2> ia=[] ra=[] ba=[] sa=[] ua=[]}, updates=None
+012: table simple: i=-1 r=125 b=false s=newstring u=<2> ia=[1] ra=[1.5] ba=[false] sa=[] ua=[] uuid=<6>
+012: table simple: i=1 r=123.5 b=false s=mystring u=<3> ia=[1 2 3] ra=[-0.5] ba=[true] sa=[abc def] ua=[<4> <5>] uuid=<0>
 013: reconnect
-014: event:create, row={i=-1 r=125 b=false s=newstring u=<4> ia=[1] ra=[1.5] ba=[false] sa=[] ua=[] uuid=<8>}, updates=None
-014: event:create, row={i=1 r=123.5 b=false s=mystring u=<5> ia=[1 2 3] ra=[-0.5] ba=[true] sa=[abc def] ua=[<6> <7>] uuid=<2>}, updates=None
-014: event:create, row={uuid=<0>}, updates=None
-014: event:create, row={uuid=<1>}, updates=None
-014: i=-1 r=125 b=false s=newstring u=<4> ia=[1] ra=[1.5] ba=[false] sa=[] ua=[] uuid=<8>
-014: i=1 r=123.5 b=false s=mystring u=<5> ia=[1 2 3] ra=[-0.5] ba=[true] sa=[abc def] ua=[<6> <7>] uuid=<2>
+014: event:create, row={i=-1 r=125 b=false s=newstring u=<2> ia=[1] ra=[1.5] ba=[false] sa=[] ua=[]}, updates=None
+014: event:create, row={i=1 r=123.5 b=false s=mystring u=<3> ia=[1 2 3] ra=[-0.5] ba=[true] sa=[abc def] ua=[<4> <5>]}, updates=None
+014: event:create, row={}, updates=None
+014: event:create, row={}, updates=None
+014: table simple: i=-1 r=125 b=false s=newstring u=<2> ia=[1] ra=[1.5] ba=[false] sa=[] ua=[] uuid=<6>
+014: table simple: i=1 r=123.5 b=false s=mystring u=<3> ia=[1 2 3] ra=[-0.5] ba=[true] sa=[abc def] ua=[<4> <5>] uuid=<0>
 015: done
 ]])
 
@@ -1888,10 +1877,10 @@ OVSDB_CHECK_IDL_COMPOUND_INDEX_WITH_REF([set, simple3 idl-compound-index-with-re
 [],
 [],
 [[000: After add to other table + set of strong ref
-001: name= uset=[] uref=[[<0>]]
+001: table simple3: name= uset=[] uref=[[<0>]] uuid=<1>
 002: check simple4: not empty
 003: Query using index with reference
-004: name= uset=[] uref=[[<0>]]
+004: table simple3: name= uset=[] uref=[[<0>]] uuid=<1>
 005: After delete
 007: check simple4: empty
 008: End test
@@ -1989,11 +1978,11 @@ OVSDB_CHECK_CLUSTER_IDL_C([simple idl, monitor_cond_since, cluster disconnect],
   [[000: change conditions
 001: empty
 002: change conditions
-003: i=2 r=1 b=true s= u=<0> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<1>
+003: table simple: i=2 r=1 b=true s= u=<0> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<1>
 004: change conditions
 005: reconnect
-006: i=2 r=1 b=true s= u=<0> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<1>
+006: table simple: i=2 r=1 b=true s= u=<0> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<1>
 007: {"error":null,"result":[{"count":1}]}
-008: i=1 r=2 b=true s= u=<0> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<2>
+008: table simple: i=1 r=2 b=true s= u=<0> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<2>
 009: done
 ]])
diff --git a/tests/test-ovsdb.c b/tests/test-ovsdb.c
index 15433e3..f50e88d 100644
--- a/tests/test-ovsdb.c
+++ b/tests/test-ovsdb.c
@@ -1861,6 +1861,23 @@ print_and_log(const char *format, ...)
     free(message);
 }
 
+static char *
+format_idl_row(const struct ovsdb_idl_row *row, int step, const char *contents)
+{
+    const char *change_str =
+        !ovsdb_idl_track_is_set(row->table)
+        ? ""
+        : ovsdb_idl_row_get_seqno(row, OVSDB_IDL_CHANGE_INSERT) > 0
+          ? "inserted row: "
+          : ovsdb_idl_row_get_seqno(row, OVSDB_IDL_CHANGE_DELETE) > 0
+            ? "deleted row: "
+            : "";
+
+    return xasprintf("%03d: table %s: %s%s uuid=" UUID_FMT,
+                  step, row->table->class_->name, change_str, contents,
+                  UUID_ARGS(&row->uuid));
+}
+
 static void
 print_idl_row_updated_simple(const struct idltest_simple *s, int step)
 {
@@ -1871,7 +1888,9 @@ print_idl_row_updated_simple(const struct idltest_simple *s, int step)
         }
     }
     if (updates.length) {
-        print_and_log("%03d: updated columns:%s", step, ds_cstr(&updates));
+        print_and_log("%03d: table %s: updated columns:%s",
+                      step, s->header_.table->class_->name,
+                      ds_cstr(&updates));
         ds_destroy(&updates);
     }
 }
@@ -1886,7 +1905,9 @@ print_idl_row_updated_link1(const struct idltest_link1 *l1, int step)
         }
     }
     if (updates.length) {
-        print_and_log("%03d: updated columns:%s", step, ds_cstr(&updates));
+        print_and_log("%03d: table %s: updated columns:%s",
+                      step, l1->header_.table->class_->name,
+                      ds_cstr(&updates));
         ds_destroy(&updates);
     }
 }
@@ -1901,7 +1922,26 @@ print_idl_row_updated_link2(const struct idltest_link2 *l2, int step)
         }
     }
     if (updates.length) {
-        print_and_log("%03d: updated columns:%s", step, ds_cstr(&updates));
+        print_and_log("%03d: table %s: updated columns:%s",
+                      step, l2->header_.table->class_->name,
+                      ds_cstr(&updates));
+        ds_destroy(&updates);
+    }
+}
+
+static void
+print_idl_row_updated_simple3(const struct idltest_simple3 *s3, int step)
+{
+    struct ds updates = DS_EMPTY_INITIALIZER;
+    for (size_t i = 0; i < IDLTEST_SIMPLE3_N_COLUMNS; i++) {
+        if (idltest_simple3_is_updated(s3, i)) {
+            ds_put_format(&updates, " %s", idltest_simple3_columns[i].name);
+        }
+    }
+    if (updates.length) {
+        print_and_log("%03d: table %s: updated columns:%s",
+                      step, s3->header_.table->class_->name,
+                      ds_cstr(&updates));
         ds_destroy(&updates);
     }
 }
@@ -1916,7 +1956,9 @@ print_idl_row_updated_simple6(const struct idltest_simple6 *s6, int step)
         }
     }
     if (updates.length) {
-        print_and_log("%03d: updated columns:%s", step, ds_cstr(&updates));
+        print_and_log("%03d: table %s: updated columns:%s",
+                      step, s6->header_.table->class_->name,
+                      ds_cstr(&updates));
         ds_destroy(&updates);
     }
 }
@@ -1931,7 +1973,9 @@ print_idl_row_updated_singleton(const struct idltest_singleton *sng, int step)
         }
     }
     if (updates.length) {
-        print_and_log("%03d: updated columns:%s", step, ds_cstr(&updates));
+        print_and_log("%03d: table %s: updated columns:%s",
+                      step, sng->header_.table->class_->name,
+                      ds_cstr(&updates));
         ds_destroy(&updates);
     }
 }
@@ -1940,8 +1984,8 @@ static void
 print_idl_row_simple(const struct idltest_simple *s, int step)
 {
     struct ds msg = DS_EMPTY_INITIALIZER;
-    ds_put_format(&msg, "%03d: i=%"PRId64" r=%g b=%s s=%s u="UUID_FMT" ia=[",
-                  step, s->i, s->r, s->b ? "true" : "false",
+    ds_put_format(&msg, "i=%"PRId64" r=%g b=%s s=%s u="UUID_FMT" ia=[",
+                  s->i, s->r, s->b ? "true" : "false",
                   s->s, UUID_ARGS(&s->u));
     for (size_t i = 0; i < s->n_ia; i++) {
         ds_put_format(&msg, "%s%"PRId64, i ? " " : "", s->ia[i]);
@@ -1962,9 +2006,12 @@ print_idl_row_simple(const struct idltest_simple *s, int step)
     for (size_t i = 0; i < s->n_ua; i++) {
         ds_put_format(&msg, "%s"UUID_FMT, i ? " " : "", UUID_ARGS(&s->ua[i]));
     }
-    ds_put_format(&msg, "] uuid="UUID_FMT, UUID_ARGS(&s->header_.uuid));
-    print_and_log("%s", ds_cstr(&msg));
+    ds_put_cstr(&msg, "]");
+
+    char *row_msg = format_idl_row(&s->header_, step, ds_cstr(&msg));
+    print_and_log("%s", row_msg);
     ds_destroy(&msg);
+    free(row_msg);
 
     print_idl_row_updated_simple(s, step);
 }
@@ -1973,7 +2020,7 @@ static void
 print_idl_row_link1(const struct idltest_link1 *l1, int step)
 {
     struct ds msg = DS_EMPTY_INITIALIZER;
-    ds_put_format(&msg, "%03d: i=%"PRId64" k=", step, l1->i);
+    ds_put_format(&msg, "i=%"PRId64" k=", l1->i);
     if (l1->k) {
         ds_put_format(&msg, "%"PRId64, l1->k->i);
     }
@@ -1988,9 +2035,11 @@ print_idl_row_link1(const struct idltest_link1 *l1, int step)
     if (l1->l2) {
         ds_put_format(&msg, "%"PRId64, l1->l2->i);
     }
-    ds_put_format(&msg, " uuid="UUID_FMT, UUID_ARGS(&l1->header_.uuid));
-    print_and_log("%s", ds_cstr(&msg));
+
+    char *row_msg = format_idl_row(&l1->header_, step, ds_cstr(&msg));
+    print_and_log("%s", row_msg);
     ds_destroy(&msg);
+    free(row_msg);
 
     print_idl_row_updated_link1(l1, step);
 }
@@ -1999,30 +2048,63 @@ static void
 print_idl_row_link2(const struct idltest_link2 *l2, int step)
 {
     struct ds msg = DS_EMPTY_INITIALIZER;
-    ds_put_format(&msg, "%03d: i=%"PRId64" l1=", step, l2->i);
+    ds_put_format(&msg, "i=%"PRId64" l1=", l2->i);
     if (l2->l1) {
         ds_put_format(&msg, "%"PRId64, l2->l1->i);
     }
-    ds_put_format(&msg, " uuid="UUID_FMT, UUID_ARGS(&l2->header_.uuid));
-    print_and_log("%s", ds_cstr(&msg));
+
+    char *row_msg = format_idl_row(&l2->header_, step, ds_cstr(&msg));
+    print_and_log("%s", row_msg);
     ds_destroy(&msg);
+    free(row_msg);
 
     print_idl_row_updated_link2(l2, step);
 }
 
 static void
+print_idl_row_simple3(const struct idltest_simple3 *s3, int step)
+{
+    struct ds msg = DS_EMPTY_INITIALIZER;
+    size_t i;
+
+    ds_put_format(&msg, "name=%s uset=[", s3->name);
+    for (i = 0; i < s3->n_uset; i++) {
+        ds_put_format(&msg, "["UUID_FMT"]%s",
+                      UUID_ARGS(&s3->uset[i]),
+                      i < s3->n_uset - 1 ? "," : "");
+    }
+    ds_put_cstr(&msg, "] uref=[");
+    for (i = 0; i < s3->n_uref; i++) {
+        ds_put_format(&msg, "["UUID_FMT"]%s",
+                      UUID_ARGS(&s3->uref[i]->header_.uuid),
+                      i < s3->n_uref -1 ? "," : "");
+    }
+    ds_put_cstr(&msg, "]");
+
+    char *row_msg = format_idl_row(&s3->header_, step, ds_cstr(&msg));
+    print_and_log("%s", row_msg);
+    ds_destroy(&msg);
+    free(row_msg);
+
+    print_idl_row_updated_simple3(s3, step);
+}
+
+static void
 print_idl_row_simple6(const struct idltest_simple6 *s6, int step)
 {
     struct ds msg = DS_EMPTY_INITIALIZER;
-    ds_put_format(&msg, "%03d: name=%s ", step, s6->name);
+    ds_put_format(&msg, "name=%s ", s6->name);
     ds_put_cstr(&msg, "weak_ref=[");
     for (size_t i = 0; i < s6->n_weak_ref; i++) {
         ds_put_format(&msg, "%s"UUID_FMT, i ? " " : "",
                       UUID_ARGS(&s6->weak_ref[i]->header_.uuid));
     }
-    ds_put_format(&msg, "] uuid="UUID_FMT, UUID_ARGS(&s6->header_.uuid));
-    print_and_log("%s", ds_cstr(&msg));
+    ds_put_cstr(&msg, "]");
+
+    char *row_msg = format_idl_row(&s6->header_, step, ds_cstr(&msg));
+    print_and_log("%s", row_msg);
     ds_destroy(&msg);
+    free(row_msg);
 
     print_idl_row_updated_simple6(s6, step);
 }
@@ -2030,8 +2112,14 @@ print_idl_row_simple6(const struct idltest_simple6 *s6, int step)
 static void
 print_idl_row_singleton(const struct idltest_singleton *sng, int step)
 {
-    print_and_log("%03d: name=%s uuid="UUID_FMT, step, sng->name,
-                  UUID_ARGS(&sng->header_.uuid));
+    struct ds msg = DS_EMPTY_INITIALIZER;
+    ds_put_format(&msg, "name=%s", sng->name);
+
+    char *row_msg = format_idl_row(&sng->header_, step, ds_cstr(&msg));
+    print_and_log("%s", row_msg);
+    ds_destroy(&msg);
+    free(row_msg);
+
     print_idl_row_updated_singleton(sng, step);
 }
 
@@ -2076,51 +2164,18 @@ print_idl_track(struct ovsdb_idl *idl, int step)
 
     IDLTEST_SIMPLE_FOR_EACH_TRACKED (s, idl) {
         print_idl_row_simple(s, step);
-        if (idltest_simple_is_deleted(s)) {
-            print_and_log("%03d: deleted row: uuid="UUID_FMT, step,
-                          UUID_ARGS(&s->header_.uuid));
-        } else if (idltest_simple_is_new(s)) {
-            print_and_log("%03d: inserted row: uuid="UUID_FMT, step,
-                          UUID_ARGS(&s->header_.uuid));
-        }
         n++;
     }
     IDLTEST_LINK1_FOR_EACH_TRACKED (l1, idl) {
-        if (idltest_link1_is_deleted(l1)) {
-            print_and_log("%03d: deleted row: uuid="UUID_FMT, step,
-                          UUID_ARGS(&l1->header_.uuid));
-        } else {
-            print_idl_row_link1(l1, step);
-            if (idltest_link1_is_new(l1)) {
-                print_and_log("%03d: inserted row: uuid="UUID_FMT, step,
-                              UUID_ARGS(&l1->header_.uuid));
-            }
-        }
+        print_idl_row_link1(l1, step);
         n++;
     }
     IDLTEST_LINK2_FOR_EACH_TRACKED (l2, idl) {
-        if (idltest_link2_is_deleted(l2)) {
-            print_and_log("%03d: deleted row: uuid="UUID_FMT, step,
-                          UUID_ARGS(&l2->header_.uuid));
-        } else {
-            print_idl_row_link2(l2, step);
-            if (idltest_link2_is_new(l2)) {
-                print_and_log("%03d: inserted row: uuid="UUID_FMT, step,
-                              UUID_ARGS(&l2->header_.uuid));
-            }
-
-        }
+        print_idl_row_link2(l2, step);
         n++;
     }
     IDLTEST_SIMPLE6_FOR_EACH_TRACKED (s6, idl) {
         print_idl_row_simple6(s6, step);
-        if (idltest_simple6_is_deleted(s6)) {
-            print_and_log("%03d: deleted row: uuid="UUID_FMT, step,
-                   UUID_ARGS(&s6->header_.uuid));
-        } else if (idltest_simple6_is_new(s6)) {
-            print_and_log("%03d: inserted row: uuid="UUID_FMT, step,
-                          UUID_ARGS(&s6->header_.uuid));
-        }
         n++;
     }
 
@@ -2703,27 +2758,6 @@ do_idl_partial_update_map_column(struct ovs_cmdl_context *ctx)
 }
 
 static void
-print_idl_row_simple3(const struct idltest_simple3 *s, int step)
-{
-    size_t i;
-    const struct ovsdb_datum *uset;
-    const struct ovsdb_datum *uref;
-
-    uset = idltest_simple3_get_uset(s, OVSDB_TYPE_UUID);
-    printf("%03d: name=%s uset=[",
-           step, s->name);
-    for (i = 0; i < uset->n; i++) {
-        printf("["UUID_FMT"]%s", UUID_ARGS(&(uset->keys[i].uuid)), i < uset->n-1? ",": "");
-    }
-    uref = idltest_simple3_get_uref(s, OVSDB_TYPE_UUID);
-    printf("] uref=[");
-    for (i = 0; i < uref->n; i++) {
-        printf("["UUID_FMT"]%s", UUID_ARGS(&(uref->keys[i].uuid)), i < uref->n-1? ",": "");
-    }
-    printf("]\n");
-}
-
-static void
 dump_simple3(struct ovsdb_idl *idl,
              const struct idltest_simple3 *myRow,
              int step)
diff --git a/tests/test-ovsdb.py b/tests/test-ovsdb.py
index a196802..bc7ea4f 100644
--- a/tests/test-ovsdb.py
+++ b/tests/test-ovsdb.py
@@ -174,7 +174,7 @@ def get_simple_printable_row_string(row, columns):
 
 def get_simple_table_printable_row(row):
     simple_columns = ["i", "r", "b", "s", "u", "ia",
-                      "ra", "ba", "sa", "ua", "uuid"]
+                      "ra", "ba", "sa", "ua"]
     return get_simple_printable_row_string(row, simple_columns)
 
 
@@ -188,77 +188,90 @@ def get_simple3_table_printable_row(row):
     return get_simple_printable_row_string(row, simple3_columns)
 
 
+def get_simple5_table_printable_row(row):
+    simple5_columns = ["name", "irefmap"]
+    return get_simple_printable_row_string(row, simple5_columns)
+
+
+def get_link1_table_printable_row(row):
+    s = ["i=%s k=" % row.i]
+    if hasattr(row, "k") and row.k:
+        s.append(str(row.k.i))
+    if hasattr(row, "ka"):
+        s.append(" ka=[")
+        s.append(' '.join(sorted(str(ka.i) for ka in row.ka)))
+        s.append("] l2=")
+    if hasattr(row, "l2") and row.l2:
+        s.append(str(row.l2[0].i))
+    return ''.join(s)
+
+
+def get_link2_table_printable_row(row):
+    s = "i=%s l1=" % row.i
+    if hasattr(row, "l1") and row.l1:
+        s += str(row.l1[0].i)
+    return s
+
+
+def get_singleton_table_printable_row(row):
+    return "name=%s" % row.name
+
+
+def print_row(table, row, step, contents):
+    s = "%03d: table %s: %s " % (step, table, contents)
+    s += get_simple_printable_row_string(row, ["uuid"])
+    print(s)
+
+
 def print_idl(idl, step):
     n = 0
     if "simple" in idl.tables:
         simple = idl.tables["simple"].rows
         for row in simple.values():
-            s = "%03d: " % step
-            s += get_simple_table_printable_row(row)
-            print(s)
+            print_row("simple", row, step,
+                      get_simple_table_printable_row(row))
             n += 1
 
     if "simple2" in idl.tables:
         simple2 = idl.tables["simple2"].rows
         for row in simple2.values():
-            s = "%03d: " % step
-            s += get_simple2_table_printable_row(row)
-            print(s)
+            print_row("simple2", row, step,
+                      get_simple2_table_printable_row(row))
             n += 1
 
     if "simple3" in idl.tables:
         simple3 = idl.tables["simple3"].rows
         for row in simple3.values():
-            s = "%03d: " % step
-            s += get_simple3_table_printable_row(row)
-            print(s)
+            print_row("simple3", row, step,
+                      get_simple3_table_printable_row(row))
             n += 1
 
     if "simple5" in idl.tables:
         simple5 = idl.tables["simple5"].rows
         for row in simple5.values():
-            s = "%03d: " % step
-            s += get_simple_printable_row_string(row, ["name", "irefmap"])
-            print(s)
+            print_row("simple5", row, step,
+                      get_simple5_table_printable_row(row))
             n += 1
 
     if "link1" in idl.tables:
         l1 = idl.tables["link1"].rows
         for row in l1.values():
-            s = ["%03d: i=%s k=" % (step, row.i)]
-            if hasattr(row, "k") and row.k:
-                s.append(str(row.k.i))
-            if hasattr(row, "ka"):
-                s.append(" ka=[")
-                s.append(' '.join(sorted(str(ka.i) for ka in row.ka)))
-                s.append("] l2=")
-            if hasattr(row, "l2") and row.l2:
-                s.append(str(row.l2[0].i))
-            if hasattr(row, "uuid"):
-                s.append(" uuid=%s" % row.uuid)
-            print(''.join(s))
+            print_row("link1", row, step,
+                      get_link1_table_printable_row(row))
             n += 1
 
     if "link2" in idl.tables:
         l2 = idl.tables["link2"].rows
         for row in l2.values():
-            s = ["%03d:" % step]
-            s.append(" i=%s l1=" % row.i)
-            if hasattr(row, "l1") and row.l1:
-                s.append(str(row.l1[0].i))
-            if hasattr(row, "uuid"):
-                s.append(" uuid=%s" % row.uuid)
-            print(''.join(s))
+            print_row("link2", row, step,
+                      get_link2_table_printable_row(row))
             n += 1
 
     if "singleton" in idl.tables:
         sng = idl.tables["singleton"].rows
         for row in sng.values():
-            s = ["%03d:" % step]
-            s.append(" name=%s" % row.name)
-            if hasattr(row, "uuid"):
-                s.append(" uuid=%s" % row.uuid)
-            print(''.join(s))
+            print_row("singleton", row, step,
+                      get_singleton_table_printable_row(row))
             n += 1
 
     if not n:



More information about the dev mailing list