WRAP_2ARGS(FILE*, NULL, fopen, const char*);
WRAP_2ARGS(int, -1, mkdir, mode_t);
-WRAP_2ARGS(int, -1, access, int);
WRAP_2ARGS(int, -1, stat, struct stat*);
WRAP_OPEN();
},
.need_spawn = true);
-static int testsuite_rootfs_stat_access(const struct test *t)
+static int testsuite_rootfs_stat(const struct test *t)
{
struct stat st;
- if (access(MODULE_DIRECTORY "/a", F_OK) < 0) {
- ERR("access failed: %m\n");
- return EXIT_FAILURE;
- }
-
if (stat(MODULE_DIRECTORY "/a", &st) < 0) {
ERR("stat failed: %m\n");
return EXIT_FAILURE;
return EXIT_SUCCESS;
}
-DEFINE_TEST(testsuite_rootfs_stat_access,
- .description = "test if rootfs works - stat() and access()",
+DEFINE_TEST(testsuite_rootfs_stat,
+ .description = "test if rootfs works - stat()",
.config = {
[TC_ROOTFS] = TESTSUITE_ROOTFS "test-rootfs/",
},