lkl: tests: drop unused lkl_test.fn() parameters

The existing t.fn(t->arg1, t->arg2, t->arg3) call can lead to build
failures:
  tests/test.c: In function ‘lkl_test_run’:
  tests/test.c:93:23: error: too many arguments to function ‘t->fn’;
                             expected 0, have 3

The parameters don't appear to be used, so can be removed.

Signed-off-by: David Disseldorp <ddiss@suse.de>
This commit is contained in:
David Disseldorp
2025-06-26 15:56:27 +10:00
parent ac5cde6a24
commit ed768b65c9
2 changed files with 4 additions and 6 deletions

View File

@@ -90,7 +90,7 @@ int lkl_test_run(const struct lkl_test *tests, int nr, const char *fmt, ...)
start = clock();
ret = t->fn(t->arg1, t->arg2, t->arg3);
ret = t->fn();
stop = clock();

View File

@@ -9,16 +9,14 @@
struct lkl_test {
const char *name;
int (*fn)();
void *arg1, *arg2, *arg3;
int (*fn)(void);
};
/**
* Simple wrapper to initialize a test entry.
* @name - test name, it assume test function is named test_@name
* @vargs - arguments to be passed to the function
* @name - test name; assume existing test function named lkl_test_@name
*/
#define LKL_TEST(name, ...) { #name, lkl_test_##name, __VA_ARGS__ }
#define LKL_TEST(name) { #name, lkl_test_##name }
/**
* lkl_test_run - run a test suite