Skip to content

Commit

Permalink
updated tests
Browse files Browse the repository at this point in the history
  • Loading branch information
dulive committed Feb 1, 2022
1 parent 78b72c5 commit 0a609a9
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
6 changes: 5 additions & 1 deletion tests/test-cxx-build.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,11 @@ class test_plugin
struct mptcpd_pm *const pm = NULL;

bool const loaded =
mptcpd_plugin_load(dir, default_plugin, NULL, this->pm);
mptcpd_plugin_load(dir,
default_plugin,
dir,
NULL,
this->pm);
assert(loaded);

call_plugin_ops(&test_count_4,
Expand Down
12 changes: 8 additions & 4 deletions tests/test-plugin.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ static bool run_plugin_load(mode_t mode, struct l_queue const *queue)
assert(mode_ok == 0);

bool const loaded =
mptcpd_plugin_load(dir, default_plugin, queue, pm);
mptcpd_plugin_load(dir, default_plugin, dir, queue, pm);

if (loaded) {
call_plugin_ops(&test_count_4,
Expand Down Expand Up @@ -118,7 +118,7 @@ static void test_no_plugins(void const *test_data)
assert(dir != NULL);

struct mptcpd_pm *const pm = NULL;
bool const loaded = mptcpd_plugin_load(dir, NULL, NULL, pm);
bool const loaded = mptcpd_plugin_load(dir, NULL, dir, NULL, pm);

(void) rmdir(dir);

Expand Down Expand Up @@ -187,7 +187,7 @@ static void test_plugin_dispatch(void const *test_data)
struct mptcpd_pm *const pm = NULL;

bool const loaded =
mptcpd_plugin_load(dir, default_plugin, NULL, pm);
mptcpd_plugin_load(dir, default_plugin, dir, NULL, pm);
assert(loaded);

// Notice that we call plugin 1 twice.
Expand Down Expand Up @@ -257,7 +257,11 @@ static void test_null_plugin_ops(void const *test_data)
static char const *const default_plugin = NULL;
struct mptcpd_pm *const pm = NULL;

bool const loaded = mptcpd_plugin_load(dir, default_plugin, NULL, pm);
bool const loaded = mptcpd_plugin_load(dir,
default_plugin,
dir,
NULL,
pm);
assert(loaded);

char const name[] = "null ops";
Expand Down

0 comments on commit 0a609a9

Please sign in to comment.