return 0;
}
-static DEFINE_TEST(test_array_append1,
+DEFINE_TEST(test_array_append1,
.description = "test simple array append");
return 0;
}
-static DEFINE_TEST(test_array_append2,
+DEFINE_TEST(test_array_append2,
.description = "test array append over step");
static int test_array_append_unique(const struct test *t)
return 0;
}
-static DEFINE_TEST(test_array_append_unique,
+DEFINE_TEST(test_array_append_unique,
.description = "test array append unique");
static int test_array_sort(const struct test *t)
return 0;
}
-static DEFINE_TEST(test_array_sort,
+DEFINE_TEST(test_array_sort,
.description = "test array sort");
static int test_array_remove_at(const struct test *t)
return 0;
}
-static DEFINE_TEST(test_array_remove_at,
+DEFINE_TEST(test_array_remove_at,
.description = "test array remove at");
static const struct test *tests[] = {
test_spawn_prog(progname, args);
exit(EXIT_FAILURE);
}
-static DEFINE_TEST(depmod_modules_order_for_compressed,
+DEFINE_TEST(depmod_modules_order_for_compressed,
.description = "check if depmod let aliases in right order when using compressed modules",
.config = {
[TC_UNAME_R] = MODULES_ORDER_UNAME,
test_spawn_prog(progname, args);
exit(EXIT_FAILURE);
}
-static DEFINE_TEST(depmod_search_order_simple,
+DEFINE_TEST(depmod_search_order_simple,
.description = "check if depmod honor search order in config",
.config = {
[TC_UNAME_R] = "4.4.4",
test_spawn_prog(progname, args);
exit(EXIT_FAILURE);
}
-static DEFINE_TEST(depmod_search_order_same_prefix,
+DEFINE_TEST(depmod_search_order_same_prefix,
.description = "check if depmod honor search order in config with same prefix",
.config = {
[TC_UNAME_R] = "4.4.4",
test_spawn_prog(progname, args);
exit(EXIT_FAILURE);
}
-static DEFINE_TEST(depmod_detect_loop,
+DEFINE_TEST(depmod_detect_loop,
.description = "check if depmod detects module loops correctly",
.config = {
[TC_UNAME_R] = "4.4.4",
hash_free(h);
return 0;
}
-static DEFINE_TEST(test_hash_new,
+DEFINE_TEST(test_hash_new,
.description = "test hash_new");
hash_free(h);
return 0;
}
-static DEFINE_TEST(test_hash_get_count,
+DEFINE_TEST(test_hash_get_count,
.description = "test hash_add / hash_get_count");
hash_free(h);
return 0;
}
-static DEFINE_TEST(test_hash_replace,
+DEFINE_TEST(test_hash_replace,
.description = "test hash_add replacing existing value");
hash_free(h);
return 0;
}
-static DEFINE_TEST(test_hash_replace_failing,
+DEFINE_TEST(test_hash_replace_failing,
.description = "test hash_add_unique failing to replace existing value");
hash_free(h2);
return 0;
}
-static DEFINE_TEST(test_hash_iter,
+DEFINE_TEST(test_hash_iter,
.description = "test hash_iter");
hash_free(h2);
return 0;
}
-static DEFINE_TEST(test_hash_iter_after_del,
+DEFINE_TEST(test_hash_iter_after_del,
.description = "test hash_iter, after deleting element");
return 0;
}
-static DEFINE_TEST(test_hash_free,
+DEFINE_TEST(test_hash_free,
.description = "test hash_free calling free function for all values");
static const struct test *tests[] = {
&stest_hash_new,
exit(EXIT_SUCCESS);
}
-static DEFINE_TEST(test_initlib,
+DEFINE_TEST(test_initlib,
.description = "test if libkmod's init function work");
static noreturn int test_insert(const struct test *t)
exit(EXIT_SUCCESS);
}
-static DEFINE_TEST(test_insert,
+DEFINE_TEST(test_insert,
.description = "test if libkmod's insert_module returns ok",
.config = {
[TC_ROOTFS] = TESTSUITE_ROOTFS "test-init/",
exit(EXIT_SUCCESS);
}
-static DEFINE_TEST(test_remove,
+DEFINE_TEST(test_remove,
.description = "test if libkmod's remove_module returns ok",
.config = {
[TC_ROOTFS] = TESTSUITE_ROOTFS "test-remove/",
return EXIT_SUCCESS;
}
-static DEFINE_TEST(loaded_1,
+DEFINE_TEST(loaded_1,
.description = "check if list of module is created",
.config = {
[TC_ROOTFS] = TESTSUITE_ROOTFS "test-loaded/",
test_spawn_prog(progname, args);
exit(EXIT_FAILURE);
}
-static DEFINE_TEST(modinfo_jonsmodules,
+DEFINE_TEST(modinfo_jonsmodules,
.description = "check if output for modinfo is correct for i686, ppc64, s390x and x86_64",
.config = {
[TC_ROOTFS] = TESTSUITE_ROOTFS "test-modinfo/",
test_spawn_prog(progname, args);
exit(EXIT_FAILURE);
}
-static DEFINE_TEST(modprobe_show_depends,
+DEFINE_TEST(modprobe_show_depends,
.description = "check if output for modprobe --show-depends is correct for loaded modules",
.config = {
[TC_UNAME_R] = "4.4.4",
test_spawn_prog(progname, args);
exit(EXIT_FAILURE);
}
-static DEFINE_TEST(modprobe_show_depends2,
+DEFINE_TEST(modprobe_show_depends2,
.description = "check if output for modprobe --show-depends is correct",
.config = {
[TC_UNAME_R] = "4.4.4",
test_spawn_prog(progname, args);
exit(EXIT_FAILURE);
}
-static DEFINE_TEST(modprobe_show_alias_to_none,
+DEFINE_TEST(modprobe_show_alias_to_none,
.description = "check if modprobe --show-depends doesn't explode with an alias to nothing",
.config = {
[TC_UNAME_R] = "4.4.4",
test_spawn_prog(progname, args);
exit(EXIT_FAILURE);
}
-static DEFINE_TEST(modprobe_builtin,
+DEFINE_TEST(modprobe_builtin,
.description = "check if modprobe return 0 for builtin",
.config = {
[TC_UNAME_R] = "4.4.4",
test_spawn_prog(progname, args);
exit(EXIT_FAILURE);
}
-static DEFINE_TEST(modprobe_softdep_loop,
+DEFINE_TEST(modprobe_softdep_loop,
.description = "check if modprobe breaks softdep loop",
.config = {
[TC_UNAME_R] = "4.4.4",
test_spawn_prog(progname, args);
exit(EXIT_FAILURE);
}
-static DEFINE_TEST(modprobe_install_cmd_loop,
+DEFINE_TEST(modprobe_install_cmd_loop,
.description = "check if modprobe breaks install-commands loop",
.config = {
[TC_UNAME_R] = "4.4.4",
test_spawn_prog(progname, args);
exit(EXIT_FAILURE);
}
-static DEFINE_TEST(modprobe_param_kcmdline,
+DEFINE_TEST(modprobe_param_kcmdline,
.description = "check if params from kcmdline are passed in fact passed to (f)init_module call",
.config = {
[TC_UNAME_R] = "4.4.4",
test_spawn_prog(progname, args);
exit(EXIT_FAILURE);
}
-static DEFINE_TEST(modprobe_param_kcmdline2,
+DEFINE_TEST(modprobe_param_kcmdline2,
.description = "check if params with no value are parsed correctly from kcmdline",
.config = {
[TC_UNAME_R] = "4.4.4",
test_spawn_prog(progname, args);
exit(EXIT_FAILURE);
}
-static DEFINE_TEST(modprobe_param_kcmdline3,
+DEFINE_TEST(modprobe_param_kcmdline3,
.description = "check if unrelated strings in kcmdline are correctly ignored",
.config = {
[TC_UNAME_R] = "4.4.4",
test_spawn_prog(progname, args);
exit(EXIT_FAILURE);
}
-static DEFINE_TEST(modprobe_param_kcmdline4,
+DEFINE_TEST(modprobe_param_kcmdline4,
.description = "check if unrelated strings in kcmdline are correctly ignored",
.config = {
[TC_UNAME_R] = "4.4.4",
test_spawn_prog(progname, args);
exit(EXIT_FAILURE);
}
-static DEFINE_TEST(modprobe_force,
+DEFINE_TEST(modprobe_force,
.description = "check modprobe --force",
.config = {
[TC_UNAME_R] = "4.4.4",
test_spawn_prog(progname, args);
exit(EXIT_FAILURE);
}
-static DEFINE_TEST(modprobe_oldkernel,
+DEFINE_TEST(modprobe_oldkernel,
.description = "check modprobe --force",
.config = {
[TC_UNAME_R] = "3.3.3",
test_spawn_prog(progname, args);
exit(EXIT_FAILURE);
}
-static DEFINE_TEST(modprobe_oldkernel_force,
+DEFINE_TEST(modprobe_oldkernel_force,
.description = "check modprobe --force",
.config = {
[TC_UNAME_R] = "3.3.3",
return EXIT_SUCCESS;
}
-static DEFINE_TEST(from_name,
+DEFINE_TEST(from_name,
.description = "check if module names are parsed correctly",
.config = {
[TC_ROOTFS] = TESTSUITE_ROOTFS "test-new-module/from_name/",
return EXIT_SUCCESS;
}
-static DEFINE_TEST(from_alias,
+DEFINE_TEST(from_alias,
.description = "check if aliases are parsed correctly",
.config = {
[TC_ROOTFS] = TESTSUITE_ROOTFS "test-new-module/from_alias/",
exit(EXIT_SUCCESS);
}
-static DEFINE_TEST(testsuite_uname,
+DEFINE_TEST(testsuite_uname,
.description = "test if trap to uname() works",
.config = {
[TC_UNAME_R] = TEST_UNAME,
return EXIT_SUCCESS;
}
-static DEFINE_TEST(testsuite_rootfs_fopen,
+DEFINE_TEST(testsuite_rootfs_fopen,
.description = "test if rootfs works - fopen()",
.config = {
[TC_ROOTFS] = TESTSUITE_ROOTFS "test-rootfs/",
return EXIT_SUCCESS;
}
-static DEFINE_TEST(testsuite_rootfs_open,
+DEFINE_TEST(testsuite_rootfs_open,
.description = "test if rootfs works - open()",
.config = {
[TC_ROOTFS] = TESTSUITE_ROOTFS "test-rootfs/",
return EXIT_SUCCESS;
}
-static DEFINE_TEST(testsuite_rootfs_stat_access,
+DEFINE_TEST(testsuite_rootfs_stat_access,
.description = "test if rootfs works - stat() and access()",
.config = {
[TC_ROOTFS] = TESTSUITE_ROOTFS "test-rootfs/",
closedir(d);
return EXIT_SUCCESS;
}
-static DEFINE_TEST(testsuite_rootfs_opendir,
+DEFINE_TEST(testsuite_rootfs_opendir,
.description = "test if rootfs works - opendir()",
.config = {
[TC_ROOTFS] = TESTSUITE_ROOTFS "test-rootfs/",
return EXIT_SUCCESS;
}
-static DEFINE_TEST(alias_1,
+DEFINE_TEST(alias_1,
.description = "check if alias_normalize does the right thing",
.config = {
[TC_ROOTFS] = TESTSUITE_ROOTFS "test-util/",
fclose(fp);
return EXIT_SUCCESS;
}
-static DEFINE_TEST(test_freadline_wrapped,
+DEFINE_TEST(test_freadline_wrapped,
.description = "check if freadline_wrapped() does the right thing",
.config = {
[TC_ROOTFS] = TESTSUITE_ROOTFS "test-util/",
/* Test definitions */
#define DEFINE_TEST(_name, ...) \
- const struct test s##_name = { \
+ static const struct test s##_name = { \
.name = #_name, \
.func = _name, \
## __VA_ARGS__ \