Lines Matching defs:mode
175 static int st_check_mode(struct stat *st, mode_t mode)
177 if ((st->st_mode & ALLPERMS) != mode) {
178 ERROR("mode 0%o instead of 0%o", st->st_mode & ALLPERMS,
179 mode);
185 static int check_mode(const char *path, mode_t mode)
193 return st_check_mode(&stbuf, mode);
196 static int check_testfile_mode(const char *path, mode_t mode)
199 this_test->stat.st_mode |= mode;
200 return check_mode(path, mode);
703 static int test_ftruncate(int len, int mode)
710 start_test("ftruncate(%u) mode: 0%03o", len, mode);
721 res = fchmod(fd, mode);
727 res = check_testfile_mode(testfile, mode);
1103 #define test_open(exist, flags, mode) do_test_open(exist, flags, #flags, mode)
1105 static int do_test_open(int exist, int flags, const char *flags_str, int mode)
1116 start_test("open(%s, %s, 0%03o)", exist ? "+" : "-", flags_str, mode);
1126 fd = open(testfile, flags, mode);
1155 err += check_mode(testfile, mode);
1158 if (exist && !(flags & O_TRUNC) && (mode & S_IRUSR))
1175 if (mode & S_IRUSR) {
1261 #define test_open_acc(flags, mode, err) \
1262 do_test_open_acc(flags, #flags, mode, err)
1264 static int do_test_open_acc(int flags, const char *flags_str, int mode, int err)
1271 start_test("open_acc(%s) mode: 0%03o message: '%s'", flags_str, mode,
1278 res = chmod(testfile, mode);
1284 res = check_testfile_mode(testfile, mode);