mirror of
https://github.com/lkl/linux.git
synced 2025-12-19 08:03:01 +09:00
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:
@@ -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();
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user