#include "testsuite.h"
-static int test_array_append1(const struct test *t)
+static int test_array_append1(void)
{
struct array array;
const char *c1 = "test1";
}
DEFINE_TEST(test_array_append1, .description = "test simple array append");
-static int test_array_append2(const struct test *t)
+static int test_array_append2(void)
{
struct array array;
const char *c1 = "test1";
}
DEFINE_TEST(test_array_append2, .description = "test array append over step");
-static int test_array_append_unique(const struct test *t)
+static int test_array_append_unique(void)
{
struct array array;
const char *c1 = "test1";
return strcmp(a, b);
}
-static int test_array_sort(const struct test *t)
+static int test_array_sort(void)
{
struct array array;
const char *c1 = "test1";
}
DEFINE_TEST(test_array_sort, .description = "test array sort");
-static int test_array_remove_at(const struct test *t)
+static int test_array_remove_at(void)
{
struct array array;
const char *c1 = "test1";
}
DEFINE_TEST(test_array_remove_at, .description = "test array remove at");
-static int test_array_pop(const struct test *t)
+static int test_array_pop(void)
{
struct array array;
const char *c1 = "test1";
#undef ERR
#include "testsuite.h"
-static int blacklist_1(const struct test *t)
+static int blacklist_1(void)
{
struct kmod_ctx *ctx;
struct kmod_list *list = NULL, *l, *filtered;
#define TEST_UNAME "4.0.20-kmod"
-static noreturn int test_dependencies(const struct test *t)
+static noreturn int test_dependencies(void)
{
struct kmod_ctx *ctx;
struct kmod_module *mod = NULL;
#define MODULES_UNAME "4.4.4"
#define MODULES_ORDER_ROOTFS TESTSUITE_ROOTFS "test-depmod/modules-order-compressed"
#define MODULES_ORDER_LIB_MODULES MODULES_ORDER_ROOTFS MODULE_DIRECTORY "/" MODULES_UNAME
-static noreturn int depmod_modules_order_for_compressed(const struct test *t)
+static noreturn int depmod_modules_order_for_compressed(void)
{
EXEC_DEPMOD();
exit(EXIT_FAILURE);
MODULES_OUTDIR_ROOTFS "/outdir" MODULE_DIRECTORY "/" MODULES_UNAME
#define MODULES_OUTDIR_LIB_MODULES_INPUT \
MODULES_OUTDIR_ROOTFS MODULE_DIRECTORY "/" MODULES_UNAME
-static noreturn int depmod_modules_outdir(const struct test *t)
+static noreturn int depmod_modules_outdir(void)
{
EXEC_DEPMOD("--outdir", "/outdir/");
exit(EXIT_FAILURE);
#define SEARCH_ORDER_SIMPLE_ROOTFS TESTSUITE_ROOTFS "test-depmod/search-order-simple"
#define SEARCH_ORDER_SIMPLE_LIB_MODULES \
SEARCH_ORDER_SIMPLE_ROOTFS MODULE_DIRECTORY "/" MODULES_UNAME
-static noreturn int depmod_search_order_simple(const struct test *t)
+static noreturn int depmod_search_order_simple(void)
{
EXEC_DEPMOD();
exit(EXIT_FAILURE);
#define ANOTHER_MODDIR "/foobar"
#define RELATIVE_MODDIR "foobar2"
#define MODULES_ANOTHER_MODDIR_ROOTFS TESTSUITE_ROOTFS "test-depmod/another-moddir"
-static noreturn int depmod_another_moddir(const struct test *t)
+static noreturn int depmod_another_moddir(void)
{
EXEC_DEPMOD("-m", ANOTHER_MODDIR);
exit(EXIT_FAILURE);
}
-static noreturn int depmod_another_moddir_relative(const struct test *t)
+static noreturn int depmod_another_moddir_relative(void)
{
EXEC_DEPMOD("-m", RELATIVE_MODDIR);
exit(EXIT_FAILURE);
TESTSUITE_ROOTFS "test-depmod/search-order-same-prefix"
#define SEARCH_ORDER_SAME_PREFIX_LIB_MODULES \
SEARCH_ORDER_SAME_PREFIX_ROOTFS MODULE_DIRECTORY "/" MODULES_UNAME
-static noreturn int depmod_search_order_same_prefix(const struct test *t)
+static noreturn int depmod_search_order_same_prefix(void)
{
EXEC_DEPMOD();
exit(EXIT_FAILURE);
});
#define DETECT_LOOP_ROOTFS TESTSUITE_ROOTFS "test-depmod/detect-loop"
-static noreturn int depmod_detect_loop(const struct test *t)
+static noreturn int depmod_detect_loop(void)
{
EXEC_DEPMOD();
exit(EXIT_FAILURE);
TESTSUITE_ROOTFS "test-depmod/search-order-external-first"
#define SEARCH_ORDER_EXTERNAL_FIRST_LIB_MODULES \
SEARCH_ORDER_EXTERNAL_FIRST_ROOTFS MODULE_DIRECTORY "/" MODULES_UNAME
-static noreturn int depmod_search_order_external_first(const struct test *t)
+static noreturn int depmod_search_order_external_first(void)
{
EXEC_DEPMOD();
exit(EXIT_FAILURE);
TESTSUITE_ROOTFS "test-depmod/search-order-external-last"
#define SEARCH_ORDER_EXTERNAL_LAST_LIB_MODULES \
SEARCH_ORDER_EXTERNAL_LAST_ROOTFS MODULE_DIRECTORY "/" MODULES_UNAME
-static noreturn int depmod_search_order_external_last(const struct test *t)
+static noreturn int depmod_search_order_external_last(void)
{
EXEC_DEPMOD();
exit(EXIT_FAILURE);
#define SEARCH_ORDER_OVERRIDE_ROOTFS TESTSUITE_ROOTFS "test-depmod/search-order-override"
#define SEARCH_ORDER_OVERRIDE_LIB_MODULES \
SEARCH_ORDER_OVERRIDE_ROOTFS MODULE_DIRECTORY "/" MODULES_UNAME
-static noreturn int depmod_search_order_override(const struct test *t)
+static noreturn int depmod_search_order_override(void)
{
EXEC_DEPMOD();
exit(EXIT_FAILURE);
#define CHECK_WEAKDEP_ROOTFS TESTSUITE_ROOTFS "test-depmod/check-weakdep"
#define CHECK_WEAKDEP_LIB_MODULES CHECK_WEAKDEP_ROOTFS MODULE_DIRECTORY "/" MODULES_UNAME
-static noreturn int depmod_check_weakdep(const struct test *t)
+static noreturn int depmod_check_weakdep(void)
{
EXEC_DEPMOD();
exit(EXIT_FAILURE);
freecount++;
}
-static int test_hash_new(const struct test *t)
+static int test_hash_new(void)
{
struct hash *h = hash_new(8, NULL);
assert_return(h != NULL, EXIT_FAILURE);
}
DEFINE_TEST(test_hash_new, .description = "test hash_new");
-static int test_hash_get_count(const struct test *t)
+static int test_hash_get_count(void)
{
struct hash *h = hash_new(8, NULL);
const char *k1 = "k1", *k2 = "k2", *k3 = "k3";
}
DEFINE_TEST(test_hash_get_count, .description = "test hash_add / hash_get_count");
-static int test_hash_replace(const struct test *t)
+static int test_hash_replace(void)
{
struct hash *h = hash_new(8, countfreecalls);
const char *k1 = "k1", *k2 = "k2", *k3 = "k3";
}
DEFINE_TEST(test_hash_replace, .description = "test hash_add replacing existing value");
-static int test_hash_replace_failing(const struct test *t)
+static int test_hash_replace_failing(void)
{
struct hash *h = hash_new(8, countfreecalls);
const char *k1 = "k1", *k2 = "k2", *k3 = "k3";
DEFINE_TEST(test_hash_replace_failing,
.description = "test hash_add_unique failing to replace existing value");
-static int test_hash_iter(const struct test *t)
+static int test_hash_iter(void)
{
struct hash *h = hash_new(8, NULL);
struct hash *h2 = hash_new(8, NULL);
}
DEFINE_TEST(test_hash_iter, .description = "test hash_iter");
-static int test_hash_iter_after_del(const struct test *t)
+static int test_hash_iter_after_del(void)
{
struct hash *h = hash_new(8, NULL);
struct hash *h2 = hash_new(8, NULL);
DEFINE_TEST(test_hash_iter_after_del,
.description = "test hash_iter, after deleting element");
-static int test_hash_del(const struct test *t)
+static int test_hash_del(void)
{
struct hash *h = hash_new(32, NULL);
const char *k1 = "k1";
}
DEFINE_TEST(test_hash_del, .description = "test add / delete a single element");
-static int test_hash_del_nonexistent(const struct test *t)
+static int test_hash_del_nonexistent(void)
{
struct hash *h = hash_new(32, NULL);
const char *k1 = "k1";
DEFINE_TEST(test_hash_del_nonexistent,
.description = "test deleting an element that doesn't exist");
-static int test_hash_free(const struct test *t)
+static int test_hash_free(void)
{
struct hash *h = hash_new(8, countfreecalls);
const char *k1 = "k1", *k2 = "k2", *k3 = "k3";
DEFINE_TEST(test_hash_free,
.description = "test hash_free calling free function for all values");
-static int test_hash_add_unique(const struct test *t)
+static int test_hash_add_unique(void)
{
const char *k[] = { "k1", "k2", "k3", "k4", "k5" };
const char *v[] = { "v1", "v2", "v3", "v4", "v5" };
DEFINE_TEST(test_hash_add_unique,
.description = "test hash_add_unique with different key orders");
-static int test_hash_massive_add_del(const struct test *t)
+static int test_hash_massive_add_del(void)
{
char buf[1024 * 8];
char *k;
#include "testsuite.h"
-static noreturn int test_load_resources(const struct test *t)
+static noreturn int test_load_resources(void)
{
struct kmod_ctx *ctx;
const char *null_config = NULL;
[TC_UNAME_R] = "5.6.0",
});
-static noreturn int test_initlib(const struct test *t)
+static noreturn int test_initlib(void)
{
struct kmod_ctx *ctx;
const char *null_config = NULL;
}
DEFINE_TEST(test_initlib, .description = "test if libkmod's init function work");
-static noreturn int test_insert(const struct test *t)
+static noreturn int test_insert(void)
{
struct kmod_ctx *ctx;
struct kmod_module *mod;
},
.modules_loaded = "mod_simple");
-static noreturn int test_remove(const struct test *t)
+static noreturn int test_remove(void)
{
struct kmod_ctx *ctx;
struct kmod_module *mod_simple, *mod_bla;
#include "testsuite.h"
-static noreturn int test_initstate_from_lookup(const struct test *t)
+static noreturn int test_initstate_from_lookup(void)
{
struct kmod_ctx *ctx;
struct kmod_list *list = NULL;
[TC_UNAME_R] = "4.4.4",
});
-static noreturn int test_initstate_from_name(const struct test *t)
+static noreturn int test_initstate_from_name(void)
{
struct kmod_ctx *ctx;
struct kmod_module *mod = NULL;
list = kmod_list_remove(list);
}
-static int test_list_last(const struct test *t)
+static int test_list_last(void)
{
struct kmod_list *list = NULL, *last;
int i;
}
DEFINE_TEST(test_list_last, .description = "test for the last element of a list");
-static int test_list_prev(const struct test *t)
+static int test_list_prev(void)
{
struct kmod_list *list = NULL, *l, *p;
int i;
}
DEFINE_TEST(test_list_prev, .description = "test list prev");
-static int test_list_remove_data(const struct test *t)
+static int test_list_remove_data(void)
{
struct kmod_list *list = NULL, *l;
int i;
DEFINE_TEST(test_list_remove_data,
.description = "test list function to remove element by data");
-static int test_list_append_list(const struct test *t)
+static int test_list_append_list(void)
{
struct kmod_list *a = NULL, *b = NULL, *c, *l;
int i;
DEFINE_TEST(test_list_append_list,
.description = "test list function to append another list");
-static int test_list_insert_before(const struct test *t)
+static int test_list_insert_before(void)
{
struct kmod_list *list = NULL, *l;
const char *v1 = "v1", *v2 = "v2", *v3 = "v3", *vx = "vx";
DEFINE_TEST(test_list_insert_before,
.description = "test list function to insert before element");
-static int test_list_insert_after(const struct test *t)
+static int test_list_insert_after(void)
{
struct kmod_list *list = NULL, *l;
const char *v1 = "v1", *v2 = "v2", *v3 = "v3", *vx = "vx";
#include "testsuite.h"
-static int loaded_1(const struct test *t)
+static int loaded_1(void)
{
struct kmod_ctx *ctx;
const char *null_config = NULL;
static const char *progname = TOOLS_DIR "/modinfo";
-#define DEFINE_MODINFO_TEST(_field, _flavor, ...) \
- static noreturn int test_modinfo_##_field(const struct test *t) \
- { \
- const char *const args[] = { \
- progname, "-F", #_field, __VA_ARGS__, NULL, \
- }; \
- test_spawn_prog(progname, args); \
- exit(EXIT_FAILURE); \
- } \
+#define DEFINE_MODINFO_TEST(_field, _flavor, ...) \
+ static noreturn int test_modinfo_##_field(void) \
+ { \
+ const char *const args[] = { \
+ progname, "-F", #_field, __VA_ARGS__, NULL, \
+ }; \
+ test_spawn_prog(progname, args); \
+ exit(EXIT_FAILURE); \
+ } \
DEFINE_TEST(test_modinfo_##_field, \
.description = "check " #_field " output of modinfo for different architectures", \
.config = { \
DEFINE_MODINFO_SIGN_TEST(sig_hashalgo);
#if 0
-static noreturn int test_modinfo_signature(const struct test *t)
+static noreturn int test_modinfo_signature(void)
{
const char *const args[] = {
progname,
});
#endif
-static noreturn int test_modinfo_external(const struct test *t)
+static noreturn int test_modinfo_external(void)
{
const char *const args[] = {
// clang-format off
.out = TESTSUITE_ROOTFS "test-modinfo/correct-external.txt",
});
-static noreturn int test_modinfo_builtin(const struct test *t)
+static noreturn int test_modinfo_builtin(void)
{
const char *const args[] = {
// clang-format off
test_spawn_prog(TOOLS_DIR "/modprobe", \
(const char *[]){ TOOLS_DIR "/modprobe", ##__VA_ARGS__, NULL })
-static noreturn int modprobe_show_depends(const struct test *t)
+static noreturn int modprobe_show_depends(void)
{
EXEC_MODPROBE("--show-depends", "mod-loop-a");
exit(EXIT_FAILURE);
.out = TESTSUITE_ROOTFS "test-modprobe/show-depends/correct.txt",
});
-static noreturn int modprobe_show_depends2(const struct test *t)
+static noreturn int modprobe_show_depends2(void)
{
EXEC_MODPROBE("--show-depends", "mod-simple");
exit(EXIT_FAILURE);
.modules_loaded = "",
);
-static noreturn int modprobe_show_alias_to_none(const struct test *t)
+static noreturn int modprobe_show_alias_to_none(void)
{
EXEC_MODPROBE("--show-depends", "--ignore-install", "--quiet", "mod-simple");
exit(EXIT_FAILURE);
.modules_loaded = "",
);
-static noreturn int modprobe_show_exports(const struct test *t)
+static noreturn int modprobe_show_exports(void)
{
EXEC_MODPROBE("--show-exports", "--quiet", "/mod-loop-a.ko");
exit(EXIT_FAILURE);
.regex = true,
});
-static noreturn int modprobe_builtin(const struct test *t)
+static noreturn int modprobe_builtin(void)
{
EXEC_MODPROBE("unix");
exit(EXIT_FAILURE);
[TC_ROOTFS] = TESTSUITE_ROOTFS "test-modprobe/builtin",
});
-static noreturn int modprobe_builtin_lookup_only(const struct test *t)
+static noreturn int modprobe_builtin_lookup_only(void)
{
EXEC_MODPROBE("-R", "unix");
exit(EXIT_FAILURE);
.out = TESTSUITE_ROOTFS "test-modprobe/builtin/correct.txt",
});
-static noreturn int modprobe_softdep_loop(const struct test *t)
+static noreturn int modprobe_softdep_loop(void)
{
EXEC_MODPROBE("mod-loop-b");
exit(EXIT_FAILURE);
.modules_loaded = "mod-loop-a,mod-loop-b",
);
-static noreturn int modprobe_weakdep_loop(const struct test *t)
+static noreturn int modprobe_weakdep_loop(void)
{
EXEC_MODPROBE("mod-loop-b");
exit(EXIT_FAILURE);
.modules_not_loaded = "mod-loop-a,mod-simple-c",
);
-static noreturn int modprobe_install_cmd_loop(const struct test *t)
+static noreturn int modprobe_install_cmd_loop(void)
{
EXEC_MODPROBE("mod-loop-a");
exit(EXIT_FAILURE);
.modules_loaded = "mod-loop-b,mod-loop-a",
);
-static noreturn int modprobe_param_kcmdline_show_deps(const struct test *t)
+static noreturn int modprobe_param_kcmdline_show_deps(void)
{
EXEC_MODPROBE("--show-depends", "mod-simple");
exit(EXIT_FAILURE);
.out = TESTSUITE_ROOTFS "test-modprobe/module-param-kcmdline/correct.txt",
});
-static noreturn int modprobe_param_kcmdline(const struct test *t)
+static noreturn int modprobe_param_kcmdline(void)
{
EXEC_MODPROBE("-c");
exit(EXIT_FAILURE);
.out = TESTSUITE_ROOTFS "test-modprobe/module-param-kcmdline9/correct.txt",
});
-static noreturn int modprobe_force(const struct test *t)
+static noreturn int modprobe_force(void)
{
EXEC_MODPROBE("--force", "mod-simple");
exit(EXIT_FAILURE);
.modules_loaded = "mod-simple",
);
-static noreturn int modprobe_force_modversion(const struct test *t)
+static noreturn int modprobe_force_modversion(void)
{
EXEC_MODPROBE("--force-modversion", "mod-simple");
exit(EXIT_FAILURE);
.modules_loaded = "mod-simple",
);
-static noreturn int modprobe_force_vermagic(const struct test *t)
+static noreturn int modprobe_force_vermagic(void)
{
EXEC_MODPROBE("--force-vermagic", "mod-simple");
exit(EXIT_FAILURE);
.modules_loaded = "mod-simple",
);
-static noreturn int modprobe_oldkernel(const struct test *t)
+static noreturn int modprobe_oldkernel(void)
{
EXEC_MODPROBE("mod-simple");
exit(EXIT_FAILURE);
.modules_loaded = "mod-simple",
);
-static noreturn int modprobe_oldkernel_force(const struct test *t)
+static noreturn int modprobe_oldkernel_force(void)
{
EXEC_MODPROBE("--force", "mod-simple");
exit(EXIT_FAILURE);
.modules_loaded = "mod-simple",
);
-static noreturn int modprobe_oldkernel_force_modversion(const struct test *t)
+static noreturn int modprobe_oldkernel_force_modversion(void)
{
EXEC_MODPROBE("--force-modversion", "mod-simple");
exit(EXIT_FAILURE);
.modules_loaded = "mod-simple",
);
-static noreturn int modprobe_oldkernel_force_vermagic(const struct test *t)
+static noreturn int modprobe_oldkernel_force_vermagic(void)
{
EXEC_MODPROBE("--force-vermagic", "mod-simple");
exit(EXIT_FAILURE);
.modules_loaded = "mod-simple",
);
-static noreturn int modprobe_external(const struct test *t)
+static noreturn int modprobe_external(void)
{
EXEC_MODPROBE("mod-simple");
exit(EXIT_FAILURE);
.modules_loaded = "mod-simple",
);
-static noreturn int modprobe_module_from_abspath(const struct test *t)
+static noreturn int modprobe_module_from_abspath(void)
{
EXEC_MODPROBE("/home/foo/mod-simple.ko");
exit(EXIT_FAILURE);
.modules_loaded = "mod-simple",
);
-static noreturn int modprobe_module_from_relpath(const struct test *t)
+static noreturn int modprobe_module_from_relpath(void)
{
if (chdir("/home/foo") != 0) {
perror("failed to change into /home/foo");
return -1;
}
-static int multi_softdep(const struct test *t)
+static int multi_softdep(void)
{
struct kmod_ctx *ctx = NULL;
struct kmod_module *mod = NULL;
#include "testsuite.h"
-static int from_name(const struct test *t)
+static int from_name(void)
{
static const char *const modnames[] = {
// clang-format off
.out = TESTSUITE_ROOTFS "test-new-module/from_name/correct.txt",
});
-static int from_alias(const struct test *t)
+static int from_alias(void)
{
static const char *const modnames[] = {
"ext4.*",
#include "testsuite.h"
-static noreturn int test_remove(const struct test *t)
+static noreturn int test_remove(void)
{
struct kmod_ctx *ctx;
struct kmod_module *mod;
static const char *TEXT =
"this is a very long test that is longer than the size we initially se in the strbuf";
-static int test_strbuf_pushchar(const struct test *t)
+static int test_strbuf_pushchar(void)
{
_cleanup_strbuf_ struct strbuf buf;
const char *result;
}
DEFINE_TEST(test_strbuf_pushchar, .description = "test strbuf_{pushchar, str, steal}");
-static int test_strbuf_pushchars(const struct test *t)
+static int test_strbuf_pushchars(void)
{
_cleanup_strbuf_ struct strbuf buf;
const char *result;
DEFINE_TEST(test_strbuf_pushchars,
.description = "test strbuf_{pushchars, popchar, popchars}");
-static int test_strbuf_with_stack(const struct test *t)
+static int test_strbuf_with_stack(void)
{
const char test[] = "test-something-small";
const char *stack_buf;
}
DEFINE_TEST(test_strbuf_with_stack, .description = "test strbuf with stack");
-static int test_strbuf_with_heap(const struct test *t)
+static int test_strbuf_with_heap(void)
{
DECLARE_STRBUF(heapbuf);
}
DEFINE_TEST(test_strbuf_with_heap, .description = "test strbuf with heap only");
-static int test_strbuf_pushmem(const struct test *t)
+static int test_strbuf_pushmem(void)
{
_cleanup_strbuf_ struct strbuf buf;
}
DEFINE_TEST(test_strbuf_pushmem, .description = "test strbuf_reserve");
-static int test_strbuf_used(const struct test *t)
+static int test_strbuf_used(void)
{
_cleanup_strbuf_ struct strbuf buf;
}
DEFINE_TEST(test_strbuf_used, .description = "test strbuf_used");
-static int test_strbuf_shrink_to(const struct test *t)
+static int test_strbuf_shrink_to(void)
{
_cleanup_strbuf_ struct strbuf buf;
}
DEFINE_TEST(test_strbuf_shrink_to, .description = "test strbuf_shrink_to");
-static int xfail_strbuf_shrink_to(const struct test *t)
+static int xfail_strbuf_shrink_to(void)
{
_cleanup_strbuf_ struct strbuf buf;
#include "testsuite.h"
#define TEST_UNAME "4.0.20-kmod"
-static noreturn int testsuite_uname(const struct test *t)
+static noreturn int testsuite_uname(void)
{
struct utsname u;
int err = uname(&u);
[TC_UNAME_R] = TEST_UNAME,
});
-static int testsuite_rootfs_fopen(const struct test *t)
+static int testsuite_rootfs_fopen(void)
{
FILE *fp;
char s[100];
[TC_ROOTFS] = TESTSUITE_ROOTFS "test-rootfs/",
});
-static int testsuite_rootfs_open(const struct test *t)
+static int testsuite_rootfs_open(void)
{
char buf[100];
int fd, done;
[TC_ROOTFS] = TESTSUITE_ROOTFS "test-rootfs/",
});
-static int testsuite_rootfs_stat(const struct test *t)
+static int testsuite_rootfs_stat(void)
{
struct stat st;
[TC_ROOTFS] = TESTSUITE_ROOTFS "test-rootfs/",
});
-static int testsuite_rootfs_opendir(const struct test *t)
+static int testsuite_rootfs_opendir(void)
{
DIR *d;
#include "testsuite.h"
-static int alias_1(const struct test *t)
+static int alias_1(void)
{
static const char *const input[] = {
// clang-format off
.out = TESTSUITE_ROOTFS "test-util/alias-correct.txt",
});
-static int test_freadline_wrapped(const struct test *t)
+static int test_freadline_wrapped(void)
{
FILE *fp = fopen("/freadline_wrapped-input.txt", "re");
.out = TESTSUITE_ROOTFS "test-util/freadline_wrapped-correct.txt",
});
-static int test_strchr_replace(const struct test *t)
+static int test_strchr_replace(void)
{
_cleanup_free_ char *s = strdup("this is a test string");
const char *res = "thiC iC a teCt Ctring";
DEFINE_TEST(test_strchr_replace,
.description = "check implementation of strchr_replace()");
-static int test_underscores(const struct test *t)
+static int test_underscores(void)
{
struct teststr {
char *val;
}
DEFINE_TEST(test_underscores, .description = "check implementation of underscores()");
-static int test_path_ends_with_kmod_ext(const struct test *t)
+static int test_path_ends_with_kmod_ext(void)
{
struct teststr {
const char *val;
#define TEST_WRITE_STR_SAFE_FILE "/write-str-safe"
#define TEST_WRITE_STR_SAFE_PATH TESTSUITE_ROOTFS "test-util2/" TEST_WRITE_STR_SAFE_FILE
-static int test_write_str_safe(const struct test *t)
+static int test_write_str_safe(void)
{
const char *s = "test";
int fd;
},
});
-static int test_uadd32_overflow(const struct test *t)
+static int test_uadd32_overflow(void)
{
uint32_t res;
bool overflow;
DEFINE_TEST(test_uadd32_overflow,
.description = "check implementation of uadd32_overflow()");
-static int test_uadd64_overflow(const struct test *t)
+static int test_uadd64_overflow(void)
{
uint64_t res;
bool overflow;
DEFINE_TEST(test_uadd64_overflow,
.description = "check implementation of uadd64_overflow()");
-static int test_umul32_overflow(const struct test *t)
+static int test_umul32_overflow(void)
{
uint32_t res;
bool overflow;
DEFINE_TEST(test_umul32_overflow,
.description = "check implementation of umul32_overflow()");
-static int test_umul64_overflow(const struct test *t)
+static int test_umul64_overflow(void)
{
uint64_t res;
bool overflow;
DEFINE_TEST(test_umul64_overflow,
.description = "check implementation of umul64_overflow()");
-static int test_backoff_time(const struct test *t)
+static int test_backoff_time(void)
{
unsigned long long delta = 0;
NULL,
};
-static int test_weakdep(const struct test *t)
+static int test_weakdep(void)
{
struct kmod_ctx *ctx;
int mod_name_index = 0;
.out = TESTSUITE_ROOTFS "test-weakdep/correct-weakdep.txt",
});
-static noreturn int modprobe_config(const struct test *t)
+static noreturn int modprobe_config(void)
{
EXEC_MODPROBE("-c");
exit(EXIT_FAILURE);
static int test_run_spawned(const struct test *t)
{
- int err = t->func(t);
+ int err = t->func();
exit(err);
return EXIT_FAILURE;
#include <shared/macro.h>
struct test;
-typedef int (*testfunc)(const struct test *t);
+typedef int (*testfunc)(void);
enum test_config {
/*