summaryrefslogtreecommitdiff
path: root/cesar/bufmgr/test/utest/inc/scenario_defs.h
diff options
context:
space:
mode:
Diffstat (limited to 'cesar/bufmgr/test/utest/inc/scenario_defs.h')
-rw-r--r--cesar/bufmgr/test/utest/inc/scenario_defs.h84
1 files changed, 84 insertions, 0 deletions
diff --git a/cesar/bufmgr/test/utest/inc/scenario_defs.h b/cesar/bufmgr/test/utest/inc/scenario_defs.h
new file mode 100644
index 0000000000..eb80cd6984
--- /dev/null
+++ b/cesar/bufmgr/test/utest/inc/scenario_defs.h
@@ -0,0 +1,84 @@
+#ifndef inc_scenario_defs_h
+#define inc_scenario_defs_h
+/* Cesar project {{{
+ *
+ * Copyright (C) 2012 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file inc/scenario_defs.h
+ * \brief Scenario entries definition.
+ * \ingroup test
+ */
+#include "bufmgr/bufmgr.h"
+
+/* Scenario globals. */
+#define SCENARIO_DEFS_GLOBALS \
+ bufmgr_t *bufmgr;
+
+/* Scenario actions. */
+#define SCENARIO_DEFS_ACTIONS \
+ bufmgr_fill_cache, \
+ bufmgr_get, \
+ bufmgr_get_wait, \
+ bufmgr_give_back, \
+ bufmgr_keep_buffer
+
+typedef struct
+{
+ uint ipmbox_buf_available;
+} scenario_action_bufmgr_fill_cache_t;
+
+void
+scenario_action_bufmgr_fill_cache_cb (scenario_globals_t *globals,
+ scenario_params_t *params);
+
+typedef struct
+{
+ u8 *buf_expected;
+} scenario_action_bufmgr_get_t;
+
+void
+scenario_action_bufmgr_get_cb (scenario_globals_t *globals,
+ scenario_params_t *params);
+
+typedef scenario_action_bufmgr_get_t scenario_action_bufmgr_get_wait_t;
+
+void
+scenario_action_bufmgr_get_wait_cb (scenario_globals_t *globals,
+ scenario_params_t *params);
+
+typedef struct
+{
+ u8 *buffer;
+} scenario_action_bufmgr_keep_buffer_t;
+
+void
+scenario_action_bufmgr_keep_buffer_cb(scenario_globals_t *globals,
+ scenario_params_t *params);
+
+typedef scenario_empty_t scenario_action_bufmgr_give_back_t;
+
+void
+scenario_action_bufmgr_give_back_cb (scenario_globals_t *globals,
+ scenario_params_t *params);
+
+/* Scenario events. */
+#define SCENARIO_DEFS_EVENTS \
+ ipmbox_empty_buf_get, \
+ ipmbox_tx_empty_buf
+
+typedef struct
+{
+ uint nb_req;
+ uint nb_return;
+} scenario_event_ipmbox_empty_buf_get_t;
+
+typedef struct
+{
+ uint length;
+} scenario_event_ipmbox_tx_empty_buf_t;
+
+#endif /* inc_scenario_defs_h */