1 #ifndef TDB_TEST_EXTERNAL_AGENT_H
2 #define TDB_TEST_EXTERNAL_AGENT_H
4 /* For locking tests, we need a different process to try things at
8 OPEN_WITH_CLEAR_IF_FIRST,
20 /* Do this before doing any tdb stuff. Return handle, or -1. */
21 struct agent *prepare_external_agent(void);
22 void shutdown_agent(struct agent *agent);
28 FAILED, /* For fetch, or NEEDS_RECOVERY */
32 /* Ask the external agent to try to do an operation.
33 * name == tdb name for OPEN/OPEN_WITH_CLEAR_IF_FIRST,
34 * record name for FETCH/STORE (store stores name as data too)
36 enum agent_return external_agent_operation(struct agent *handle,
40 /* Mapping enum -> string. */
41 const char *agent_return_name(enum agent_return ret);
42 const char *operation_name(enum operation op);
44 #endif /* TDB_TEST_EXTERNAL_AGENT_H */