kmod_unref(ctx);
- return EXIT_SUCCESS;
+ return 0;
}
DEFINE_TEST_WITH_FUNC(
test_load_resource1, test_load_resources,
kmod_unref(ctx);
- return EXIT_SUCCESS;
+ return 0;
}
DEFINE_TEST(test_initlib, .description = "test if libkmod's init function work");
kmod_module_unref(mod);
kmod_unref(ctx);
- return EXIT_SUCCESS;
+ return 0;
}
DEFINE_TEST(test_insert,
.description = "test if libkmod's insert_module returns ok",
kmod_module_unref(mod_simple);
kmod_unref(ctx);
- return EXIT_SUCCESS;
+ return 0;
}
DEFINE_TEST(
test_remove, .description = "test if libkmod's remove_module returns ok",
TS_ASSERT(streq(u.release, TEST_UNAME));
- return EXIT_SUCCESS;
+ return 0;
}
DEFINE_TEST(testsuite_uname, .description = "test if trap to uname() works",
.config = {
TS_ASSERT(streq(s, "kmod-test-chroot-works"));
- return EXIT_SUCCESS;
+ return 0;
}
DEFINE_TEST(testsuite_rootfs_fopen, .description = "test if rootfs works - fopen()",
.config = {
TS_ASSERT(streq(buf, "kmod-test-chroot-works\n"));
- return EXIT_SUCCESS;
+ return 0;
}
DEFINE_TEST(testsuite_rootfs_open, .description = "test if rootfs works - open()",
.config = {
TS_ASSERT(stat(MODULE_DIRECTORY "/a", &st) == 0);
- return EXIT_SUCCESS;
+ return 0;
}
DEFINE_TEST(testsuite_rootfs_stat, .description = "test if rootfs works - stat()",
.config = {
TS_ASSERT(d != NULL);
closedir(d);
- return EXIT_SUCCESS;
+ return 0;
}
DEFINE_TEST(testsuite_rootfs_opendir, .description = "test if rootfs works - opendir()",
.config = {
printf("\n");
}
- return EXIT_SUCCESS;
+ return 0;
}
DEFINE_TEST(alias_1,
.description = "check if alias_normalize does the right thing",
}
fclose(fp);
- return EXIT_SUCCESS;
+ return 0;
}
DEFINE_TEST(test_freadline_wrapped,
.description = "check if freadline_wrapped() does the right thing",
strchr_replace(s, 's', 'C');
TS_ASSERT(streq(s, res));
- return EXIT_SUCCESS;
+ return 0;
}
DEFINE_TEST(test_strchr_replace,
.description = "check implementation of strchr_replace()");
TS_ASSERT(streq(val, teststr[i].res));
}
- return EXIT_SUCCESS;
+ return 0;
}
DEFINE_TEST(test_underscores, .description = "check implementation of underscores()");
teststr[i].res);
}
- return EXIT_SUCCESS;
+ return 0;
}
DEFINE_TEST(test_path_ends_with_kmod_ext,
.description = "check implementation of path_ends_with_kmod_ext()");
write_str_safe(fd, s, strlen(s));
close(fd);
- return EXIT_SUCCESS;
+ return 0;
}
DEFINE_TEST(test_write_str_safe,
.description = "check implementation of write_str_safe()",
overflow = uadd32_overflow(UINT32_MAX, 1, &res);
TS_ASSERT(overflow);
- return EXIT_SUCCESS;
+ return 0;
}
DEFINE_TEST(test_uadd32_overflow,
.description = "check implementation of uadd32_overflow()");
overflow = uadd64_overflow(UINT64_MAX, 1, &res);
TS_ASSERT(overflow);
- return EXIT_SUCCESS;
+ return 0;
}
DEFINE_TEST(test_uadd64_overflow,
.description = "check implementation of uadd64_overflow()");
overflow = umul32_overflow(UINT32_MAX, 0x10, &res);
TS_ASSERT(overflow);
- return EXIT_SUCCESS;
+ return 0;
}
DEFINE_TEST(test_umul32_overflow,
.description = "check implementation of umul32_overflow()");
overflow = umul64_overflow(UINT64_MAX, 0x10, &res);
TS_ASSERT(overflow);
- return EXIT_SUCCESS;
+ return 0;
}
DEFINE_TEST(test_umul64_overflow,
.description = "check implementation of umul64_overflow()");
get_backoff_delta_msec(now_msec() - 10, &delta);
TS_ASSERT(delta == 0);
- return EXIT_SUCCESS;
+ return 0;
}
DEFINE_TEST(test_backoff_time,
.description = "check implementation of get_backoff_delta_msec()");