Commit 916bd026 by Marcus Winter

mtapi_c: fixed plugin test

parent 426360eb
...@@ -32,6 +32,7 @@ ...@@ -32,6 +32,7 @@
#include <mtapi_status_t.h> #include <mtapi_status_t.h>
#include <embb/base/c/memory_allocation.h>
#include <embb/base/c/thread.h> #include <embb/base/c/thread.h>
#include <embb/base/c/atomic.h> #include <embb/base/c/atomic.h>
#include <embb/base/c/internal/unused.h> #include <embb/base/c/internal/unused.h>
...@@ -188,6 +189,10 @@ void PluginTest::TestBasic() { ...@@ -188,6 +189,10 @@ void PluginTest::TestBasic() {
MTAPI_CHECK_STATUS(status); MTAPI_CHECK_STATUS(status);
status = MTAPI_ERR_UNKNOWN; status = MTAPI_ERR_UNKNOWN;
plugin_initialize(THIS_DOMAIN_ID, THIS_NODE_ID, &status);
MTAPI_CHECK_STATUS(status);
status = MTAPI_ERR_UNKNOWN;
action = mtapi_ext_plugin_action_create( action = mtapi_ext_plugin_action_create(
PLUGIN_JOB_ID, PLUGIN_JOB_ID,
plugin_task_start, plugin_task_start,
...@@ -223,8 +228,14 @@ void PluginTest::TestBasic() { ...@@ -223,8 +228,14 @@ void PluginTest::TestBasic() {
MTAPI_CHECK_STATUS(status); MTAPI_CHECK_STATUS(status);
status = MTAPI_ERR_UNKNOWN; status = MTAPI_ERR_UNKNOWN;
plugin_finalize(&status);
MTAPI_CHECK_STATUS(status);
status = MTAPI_ERR_UNKNOWN;
mtapi_finalize(&status); mtapi_finalize(&status);
MTAPI_CHECK_STATUS(status); MTAPI_CHECK_STATUS(status);
PT_EXPECT_EQ(embb_get_bytes_allocated(), 0u);
embb_mtapi_log_info("...done\n\n"); embb_mtapi_log_info("...done\n\n");
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment