Add handling of reduced test cases (traverse lines trimmed), and add all the test...
[ccan] / ccan / tdb / tools / replay_trace.c
index 4afe900aa8e8317587e2f4eb0d84572d74fc221b..08fe8790b6f7043c51af2044b54c47c591887808 100644 (file)
@@ -253,6 +253,16 @@ static void op_add_traverse(const char *filename,
        op[op_num].key = tdb_null;
 }
 
+/* Full traverse info is useful for debugging, but changing it to
+ * "traversefn" without the data makes the traces *much* smaller! */
+static void op_add_traversefn(const char *filename,
+                           struct op op[], unsigned int op_num, char *words[])
+{
+       if (words[2])
+               fail(filename, op_num+1, "Expected no values");
+       op[op_num].key = tdb_null;
+}
+
 /* <serial> tdb_store <rec> <rec> <flag> = <ret> */
 static void op_add_store(const char *filename,
                         struct op op[], unsigned int op_num, char *words[])