/third_party/libuv/test/ |
D | test-pipe-set-fchmod.c | 31 struct stat stat_buf; in TEST_IMPL() local 51 stat(TEST_PIPENAME, &stat_buf); in TEST_IMPL() 52 ASSERT(stat_buf.st_mode & S_IRUSR); in TEST_IMPL() 53 ASSERT(stat_buf.st_mode & S_IRGRP); in TEST_IMPL() 54 ASSERT(stat_buf.st_mode & S_IROTH); in TEST_IMPL() 60 stat(TEST_PIPENAME, &stat_buf); in TEST_IMPL() 61 ASSERT(stat_buf.st_mode & S_IWUSR); in TEST_IMPL() 62 ASSERT(stat_buf.st_mode & S_IWGRP); in TEST_IMPL() 63 ASSERT(stat_buf.st_mode & S_IWOTH); in TEST_IMPL() 69 stat(TEST_PIPENAME, &stat_buf); in TEST_IMPL() [all …]
|
/third_party/ltp/testcases/kernel/syscalls/stat/ |
D | stat01.c | 40 struct stat stat_buf; in verify_stat() local 43 TEST(stat(tc->pathname, &stat_buf)); in verify_stat() 50 if (stat_buf.st_uid != user_id) { in verify_stat() 52 stat_buf.st_uid, user_id); in verify_stat() 56 if (stat_buf.st_gid != group_id) { in verify_stat() 58 stat_buf.st_gid, group_id); in verify_stat() 62 if (stat_buf.st_size != FILE_SIZE) { in verify_stat() 64 (long)stat_buf.st_size, FILE_SIZE); in verify_stat() 68 if ((stat_buf.st_mode & MASK) != tc->mode) { in verify_stat() 70 (stat_buf.st_mode & MASK), tc->mode); in verify_stat() [all …]
|
/third_party/f2fs-tools/mkfs/ |
D | f2fs_format_utils.c | 56 struct stat *stat_buf; in trim_device() local 61 stat_buf = malloc(sizeof(struct stat)); in trim_device() 62 if (stat_buf == NULL) { in trim_device() 67 if (fstat(fd, stat_buf) < 0 ) { in trim_device() 69 free(stat_buf); in trim_device() 78 if (S_ISREG(stat_buf->st_mode)) { in trim_device() 85 free(stat_buf); in trim_device() 87 } else if (S_ISBLK(stat_buf->st_mode)) { in trim_device() 89 free(stat_buf); in trim_device() 97 (unsigned long)stat_buf->st_size >> 20); in trim_device() [all …]
|
/third_party/ltp/testcases/kernel/syscalls/fstat/ |
D | fstat02.c | 23 static struct stat stat_buf; variable 32 TEST(fstat(fildes, &stat_buf)); in run() 40 if (stat_buf.st_uid != user_id) { in run() 42 stat_buf.st_uid, user_id); in run() 46 if (stat_buf.st_gid != group_id) { in run() 48 stat_buf.st_gid, group_id); in run() 52 if (stat_buf.st_size != FILE_SIZE) { in run() 54 (long)stat_buf.st_size, FILE_SIZE); in run() 58 if ((stat_buf.st_mode & 0777) != FILE_MODE) { in run() 60 (stat_buf.st_mode & 0777), FILE_MODE); in run()
|
D | fstat03.c | 29 static struct stat stat_buf; variable 33 struct stat *stat_buf; member 36 {&fd_ebadf, &stat_buf, EBADF}, 44 TEST(fstat(*tc->fd, tc->stat_buf)); in check_fstat()
|
/third_party/ltp/testcases/kernel/syscalls/lstat/ |
D | lstat01.c | 31 struct stat stat_buf; in run() local 33 memset(&stat_buf, 0, sizeof(stat_buf)); in run() 35 TEST(lstat(TESTSYML, &stat_buf)); in run() 39 if ((stat_buf.st_mode & S_IFMT) != S_IFLNK || in run() 40 stat_buf.st_uid != user_id || in run() 41 stat_buf.st_gid != group_id || in run() 42 stat_buf.st_size != strlen(TESTFILE)) { in run()
|
/third_party/mesa3d/src/drm-shim/ |
D | drm_shim.c | 409 PUBLIC int stat(const char* path, struct stat* stat_buf) in stat() argument 417 return real_stat(path, stat_buf); in stat() 433 return real_stat(path, stat_buf); in stat() 435 memset(stat_buf, 0, sizeof(*stat_buf)); in stat() 436 stat_buf->st_rdev = makedev(DRM_MAJOR, render_node_minor); in stat() 437 stat_buf->st_mode = S_IFCHR; in stat() 442 PUBLIC int stat64(const char* path, struct stat64* stat_buf) in stat64() argument 450 return real_stat64(path, stat_buf); in stat64() 466 return real_stat64(path, stat_buf); in stat64() 468 memset(stat_buf, 0, sizeof(*stat_buf)); in stat64() [all …]
|
/third_party/ltp/testcases/open_posix_testsuite/conformance/interfaces/shm_open/ |
D | 26-2.c | 41 struct stat stat_buf; in main() local 62 if (fstat(fd, &stat_buf) != 0) { in main() 67 old_uid = stat_buf.st_uid; in main() 68 old_gid = stat_buf.st_gid; in main() 104 if (fstat(fd, &stat_buf) != 0) { in main() 116 if (stat_buf.st_uid == old_uid && stat_buf.st_gid == old_gid) { in main() 121 if (stat_buf.st_uid != old_uid) in main() 123 if (stat_buf.st_gid != old_gid) in main()
|
D | 26-1.c | 33 struct stat stat_buf; in main() local 42 if (fstat(fd, &stat_buf) != 0) { in main() 47 old_mode = stat_buf.st_mode; in main() 56 if (fstat(fd, &stat_buf) != 0) { in main() 64 if (stat_buf.st_mode == old_mode) { in main()
|
/third_party/ltp/testcases/kernel/syscalls/chown/ |
D | chown02.c | 48 struct stat stat_buf; in run() local 49 SAFE_STAT(tc[i].filename, &stat_buf); in run() 51 if (stat_buf.st_uid != uid || stat_buf.st_gid != gid) { in run() 53 tc[i].filename, stat_buf.st_uid, stat_buf.st_gid, uid, gid); in run() 56 if (stat_buf.st_mode != tc[i].exp_mode) { in run() 58 tc[i].filename, stat_buf.st_mode, tc[i].exp_mode); in run()
|
D | chown03.c | 58 struct stat stat_buf; in run() local 59 SAFE_STAT(FILENAME, &stat_buf); in run() 60 check_owner(&stat_buf, uid, 0); in run() 61 check_mode(&stat_buf, NEW_PERMS); in run() 65 SAFE_STAT(FILENAME, &stat_buf); in run() 66 check_owner(&stat_buf, uid, gid); in run() 67 check_mode(&stat_buf, NEW_PERMS & ~(S_ISUID | S_ISGID)); in run()
|
D | chown05.c | 38 struct stat stat_buf; in run() local 45 SAFE_STAT(TESTFILE, &stat_buf); in run() 46 if (stat_buf.st_uid != expect_uid || stat_buf.st_gid != expect_gid) { in run()
|
/third_party/ltp/testcases/kernel/syscalls/fchown/ |
D | fchown02.c | 47 struct stat stat_buf; in run() local 59 SAFE_STAT(tc[i].filename, &stat_buf); in run() 61 if (stat_buf.st_uid != uid || stat_buf.st_gid != gid) in run() 63 tc[i].filename, stat_buf.st_uid, stat_buf.st_gid, uid, gid); in run() 65 if (stat_buf.st_mode != tc[i].exp_mode) in run() 67 tc[i].filename, stat_buf.st_mode, tc[i].exp_mode); in run()
|
D | fchown03.c | 55 struct stat stat_buf; in run() local 65 SAFE_STAT(FILENAME, &stat_buf); in run() 66 check_owner(&stat_buf, uid, 0); in run() 67 check_mode(&stat_buf, NEW_PERMS); in run() 70 SAFE_STAT(FILENAME, &stat_buf); in run() 71 check_owner(&stat_buf, uid, gid); in run() 72 check_mode(&stat_buf, NEW_PERMS & ~(S_ISUID | S_ISGID)); in run()
|
D | fchown05.c | 40 struct stat stat_buf; in run() local 47 SAFE_FSTAT(fd, &stat_buf); in run() 48 if (stat_buf.st_uid != expect_uid || stat_buf.st_gid != expect_gid) { in run()
|
/third_party/ltp/testcases/kernel/syscalls/chmod/ |
D | chmod01.c | 33 struct stat stat_buf; in verify_chmod() local 43 SAFE_STAT(tc->name, &stat_buf); in verify_chmod() 44 stat_buf.st_mode &= ~tc->mode_mask; in verify_chmod() 46 if (stat_buf.st_mode == (unsigned int)mode) { in verify_chmod() 48 tc->name, stat_buf.st_mode); in verify_chmod() 51 tc->name, stat_buf.st_mode); in verify_chmod()
|
D | chmod03.c | 39 struct stat stat_buf; in verify_chmod() local 48 SAFE_STAT(tc->name, &stat_buf); in verify_chmod() 50 if ((stat_buf.st_mode & PERMS) != PERMS) { in verify_chmod() 52 tc->name, stat_buf.st_mode); in verify_chmod() 55 tc->name, stat_buf.st_mode); in verify_chmod()
|
D | chmod07.c | 40 struct stat stat_buf; in test_chmod() local 52 if (stat(TESTFILE, &stat_buf) == -1) { in test_chmod() 57 if ((stat_buf.st_mode & PERMS) == PERMS) { in test_chmod() 62 TESTFILE, stat_buf.st_mode, PERMS); in test_chmod()
|
/third_party/ltp/testcases/kernel/syscalls/utime/ |
D | utime04.c | 99 struct stat stat_buf; /* struct buffer to hold file info. */ in main() local 126 SAFE_STAT(cleanup, TEMP_FILE, &stat_buf); in main() 127 modf_time = stat_buf.st_mtime; in main() 128 access_time = stat_buf.st_atime; in main()
|
D | utime05.c | 105 struct stat stat_buf; /* struct buffer to hold file info. */ in main() local 132 SAFE_STAT(cleanup, TEMP_FILE, &stat_buf); in main() 133 modf_time = stat_buf.st_mtime; in main() 134 access_time = stat_buf.st_atime; in main()
|
D | utime01.c | 98 struct stat stat_buf; /* struct buffer to hold file info. */ in main() local 152 SAFE_STAT(cleanup, TEMP_FILE, &stat_buf); in main() 153 modf_time = stat_buf.st_mtime; in main() 154 access_time = stat_buf.st_atime; in main()
|
D | utime02.c | 104 struct stat stat_buf; /* struct buffer to hold file info. */ in main() local 158 SAFE_STAT(cleanup, TEMP_FILE, &stat_buf); in main() 159 modf_time = stat_buf.st_mtime; in main() 160 access_time = stat_buf.st_atime; in main()
|
/third_party/ltp/testcases/kernel/syscalls/fsync/ |
D | fsync02.c | 32 struct statvfs stat_buf; variable 40 if (fstatvfs(fd, &stat_buf) != 0) { in setup() 44 f_bavail = (stat_buf.f_bavail * stat_buf.f_bsize) / BLOCKSIZE; in setup()
|
/third_party/ltp/testcases/kernel/syscalls/truncate/ |
D | truncate02.c | 47 struct stat stat_buf; in verify_truncate() local 67 SAFE_STAT(TESTFILE, &stat_buf); in verify_truncate() 68 if (stat_buf.st_size != tc->trunc_len) { in verify_truncate() 70 TESTFILE, stat_buf.st_size, tc->trunc_len); in verify_truncate()
|
/third_party/ltp/testcases/kernel/syscalls/lchown/ |
D | lchown01.c | 74 struct stat stat_buf; in main() local 105 if (lstat(SFILE, &stat_buf) < 0) { in main() 131 if ((stat_buf.st_uid != user_id) || in main() 132 (stat_buf.st_gid != group_id)) { in main()
|