+/* tdbtorture, in particular, can do a tdb_close with a transaction in
+ * progress. */
+static struct op *maybe_cancel_transaction(const char *filename,
+ struct op *op, unsigned int *num)
+{
+ unsigned int start = op_transaction_start(op, *num);
+
+ if (start) {
+ char *words[] = { "<unknown>", "tdb_close", NULL };
+ add_op(filename, &op, *num, op[start].serial,
+ OP_TDB_TRANSACTION_CANCEL);
+ op_analyze_transaction(filename, op, *num, words);
+ (*num)++;
+ }
+ return op;
+}
+