Home
last modified time | relevance | path

Searched refs:fd1 (Results 1 – 25 of 129) sorted by relevance

123456

/external/igt-gpu-tools/tests/
Dprime_self_import.c57 check_bo(int fd1, uint32_t handle1, int fd2, uint32_t handle2) in check_bo() argument
63 ptr1 = gem_mmap__cpu(fd1, handle1, 0, BO_SIZE, PROT_READ | PROT_WRITE); in check_bo()
66 gem_set_domain(fd1, handle1, I915_GEM_DOMAIN_CPU, I915_GEM_DOMAIN_CPU); in check_bo()
86 int fd1, fd2; in test_with_fd_dup() local
92 fd1 = drm_open_driver(DRIVER_INTEL); in test_with_fd_dup()
95 handle = gem_create(fd1, BO_SIZE); in test_with_fd_dup()
97 dma_buf_fd1 = prime_handle_to_fd(fd1, handle); in test_with_fd_dup()
98 gem_close(fd1, handle); in test_with_fd_dup()
108 close(fd1); in test_with_fd_dup()
114 int fd1, fd2; in test_with_two_bos() local
[all …]
/external/ltp/testcases/kernel/syscalls/kcmp/
Dkcmp01.c23 static int fd1; variable
33 int *fd1; member
37 {&pid1, &pid1, KCMP_FILE, &fd1, &fd1, 0},
38 {&pid2, &pid2, KCMP_FILE, &fd1, &fd2, 0},
39 {&pid1, &pid2, KCMP_FILE, &fd1, &fd1, 0},
40 {&pid1, &pid2, KCMP_FILE, &fd1, &fd2, 0},
41 {&pid1, &pid2, KCMP_FILE, &fd1, &fd3, 1},
46 fd1 = SAFE_OPEN(TEST_FILE, O_CREAT | O_RDWR | O_TRUNC); in setup()
51 if (fd1 > 0) in cleanup()
52 SAFE_CLOSE(fd1); in cleanup()
[all …]
Dkcmp02.c25 static int fd1; variable
40 int *fd1; member
44 {&pid1, &pid_unused, KCMP_FILE, &fd1, &fd2, ESRCH},
45 {&pid1, &pid1, KCMP_TYPES + 1, &fd1, &fd2, EINVAL},
46 {&pid1, &pid1, -1, &fd1, &fd2, EINVAL},
47 {&pid1, &pid1, INT_MIN, &fd1, &fd2, EINVAL},
48 {&pid1, &pid1, INT_MAX, &fd1, &fd2, EINVAL},
49 {&pid1, &pid1, KCMP_FILE, &fd1, &fd_fake, EBADF}
57 fd1 = SAFE_OPEN(TEST_FILE, O_CREAT | O_RDWR | O_TRUNC); in setup()
63 if (fd1 > 0) in cleanup()
[all …]
/external/ltp/testcases/kernel/syscalls/dup2/
Ddup203.c62 int fd0, fd1, fd2, rval; in main() local
89 if ((fd1 = creat(filename1, 0666)) == -1) in main()
91 if (write(fd1, filename1, strlen(filename1)) == -1) in main()
98 SAFE_CLOSE(cleanup, fd1); in main()
99 if ((fd1 = open(filename1, O_RDONLY)) == -1) in main()
102 TEST(dup2(fd0, fd1)); in main()
107 if (fd1 != fd2) { in main()
121 close(fd1); in main()
153 if ((fd1 = TEST_RETURN) == -1) { in main()
156 if (fd1 != fd2) { in main()
[all …]
/external/ltp/testcases/kernel/syscalls/eventfd2/
Deventfd2_03.c80 static void sem_player(int fd1, int fd2) in sem_player() argument
82 fprintf(stdout, "[%u] posting 1 on %d\n", getpid(), fd1); in sem_player()
83 xsem_post(fd1, 1); in sem_player()
88 fprintf(stdout, "[%u] posting 1 on %d\n", getpid(), fd1); in sem_player()
89 xsem_post(fd1, 1); in sem_player()
94 fprintf(stdout, "[%u] posting 5 on %d\n", getpid(), fd1); in sem_player()
95 xsem_post(fd1, 5); in sem_player()
112 int c, fd1, fd2, status; in main() local
127 if ((fd1 = eventfd2(0, EFD_SEMLIKE)) == -1 || in main()
133 sem_player(fd1, fd2); in main()
[all …]
/external/ltp/testcases/kernel/syscalls/pwritev/
Dpwritev02.c38 static int fd1; variable
64 {&fd1, wr_iovec1, 1, 0, EINVAL},
65 {&fd1, wr_iovec2, -1, 0, EINVAL},
66 {&fd1, wr_iovec2, 1, -1, EINVAL},
67 {&fd1, wr_iovec3, 1, 0, EFAULT},
94 fd1 = SAFE_OPEN("file", O_RDWR | O_CREAT, 0644); in setup()
95 SAFE_FTRUNCATE(fd1, getpagesize()); in setup()
102 if (fd1 > 0) in cleanup()
103 SAFE_CLOSE(fd1); in cleanup()
/external/ltp/testcases/kernel/syscalls/pwritev2/
Dpwritev202.c30 static int fd1; variable
57 {&fd1, wr_iovec1, 1, 0, 0, EINVAL},
58 {&fd1, wr_iovec2, -1, 0, 0, EINVAL},
59 {&fd1, wr_iovec2, 1, 1, -1, EOPNOTSUPP},
60 {&fd1, wr_iovec3, 1, 0, 0, EFAULT},
88 fd1 = SAFE_OPEN("file1", O_RDWR | O_CREAT, 0644); in setup()
89 SAFE_FTRUNCATE(fd1, getpagesize()); in setup()
98 if (fd1 > 0) in cleanup()
99 SAFE_CLOSE(fd1); in cleanup()
/external/ltp/testcases/kernel/syscalls/preadv/
Dpreadv02.c40 static int fd1; variable
67 {&fd1, rd_iovec1, 1, 0, EINVAL},
68 {&fd1, rd_iovec2, -1, 0, EINVAL},
69 {&fd1, rd_iovec2, 1, -1, EINVAL},
70 {&fd1, rd_iovec3, 1, 0, EFAULT},
99 fd1 = SAFE_OPEN("file1", O_RDWR | O_CREAT, 0644); in setup()
100 SAFE_FTRUNCATE(fd1, getpagesize()); in setup()
108 if (fd1 > 0) in cleanup()
109 SAFE_CLOSE(fd1); in cleanup()
/external/ltp/testcases/kernel/syscalls/preadv2/
Dpreadv202.c32 static int fd1; variable
60 {&fd1, rd_iovec1, 1, 0, 0, EINVAL},
61 {&fd1, rd_iovec2, -1, 0, 0, EINVAL},
62 {&fd1, rd_iovec2, 1, 1, -1, EOPNOTSUPP},
63 {&fd1, rd_iovec3, 1, 0, 0, EFAULT},
92 fd1 = SAFE_OPEN("file1", O_RDWR | O_CREAT, 0644); in setup()
93 SAFE_FTRUNCATE(fd1, getpagesize()); in setup()
103 if (fd1 > 0) in cleanup()
104 SAFE_CLOSE(fd1); in cleanup()
/external/mesa3d/src/util/
Dlibsync.h94 static inline int sync_merge(const char *name, int fd1, int fd2)
103 ret = ioctl(fd1, SYNC_IOC_MERGE, &data);
131 static inline int sync_accumulate(const char *name, int *fd1, int fd2) in sync_accumulate() argument
137 if (*fd1 < 0) { in sync_accumulate()
138 *fd1 = dup(fd2); in sync_accumulate()
142 ret = sync_merge(name, *fd1, fd2); in sync_accumulate()
148 close(*fd1); in sync_accumulate()
149 *fd1 = ret; in sync_accumulate()
/external/libdrm/
Dlibsync.h86 static inline int sync_merge(const char *name, int fd1, int fd2) in sync_merge() argument
95 ret = ioctl(fd1, SYNC_IOC_MERGE, &data); in sync_merge()
121 static inline int sync_accumulate(const char *name, int *fd1, int fd2) in sync_accumulate() argument
127 if (*fd1 < 0) { in sync_accumulate()
128 *fd1 = dup(fd2); in sync_accumulate()
132 ret = sync_merge(name, *fd1, fd2); in sync_accumulate()
138 close(*fd1); in sync_accumulate()
139 *fd1 = ret; in sync_accumulate()
/external/linux-kselftest/tools/testing/selftests/net/
Dreuseaddr_conflict.c89 int fd1, fd2; in main() local
96 fd1 = open_port(0, 1); in main()
97 if (fd1 >= 0) in main()
100 fd1 = open_port(1, 1); in main()
101 if (fd1 < 0) in main()
107 close(fd1); in main()
109 fd1 = open_port(0, 1); in main()
110 if (fd1 >= 0) in main()
/external/strace/tests-mx32/
Dredirect-fds.test39 fd1="$LOG.fd1"
51 rm -f "$LOG" "$fd0" "$fd1" "$fd2"
64 check_fd "$fd0" "$fd1" "$fd2"
65 check_fd '' "$fd1" "$fd2"
67 check_fd "$fd0" "$fd1" ''
69 check_fd '' "$fd1" ''
/external/strace/tests/
Dredirect-fds.test39 fd1="$LOG.fd1"
51 rm -f "$LOG" "$fd0" "$fd1" "$fd2"
64 check_fd "$fd0" "$fd1" "$fd2"
65 check_fd '' "$fd1" "$fd2"
67 check_fd "$fd0" "$fd1" ''
69 check_fd '' "$fd1" ''
/external/strace/tests-m32/
Dredirect-fds.test39 fd1="$LOG.fd1"
51 rm -f "$LOG" "$fd0" "$fd1" "$fd2"
64 check_fd "$fd0" "$fd1" "$fd2"
65 check_fd '' "$fd1" "$fd2"
67 check_fd "$fd0" "$fd1" ''
69 check_fd '' "$fd1" ''
/external/ltp/testcases/kernel/io/direct_io/
Ddiotest1.c57 static int fd1, fd2; variable
71 if (fd1 > 0) in cleanup()
72 close(fd1); in cleanup()
129 fd1 = SAFE_OPEN(cleanup, infile, O_DIRECT | O_RDWR | O_CREAT, 0666); in main()
140 SAFE_WRITE(cleanup, 1, fd1, buf, bufsize); in main()
145 SAFE_LSEEK(cleanup, fd1, offset, SEEK_SET); in main()
147 while ((n = read(fd1, buf, bufsize)) > 0) { in main()
153 SAFE_LSEEK(cleanup, fd1, offset, SEEK_SET); in main()
/external/ltp/testcases/kernel/syscalls/flistxattr/
Dflistxattr02.c36 static int fd1; variable
44 {&fd1, 1, ERANGE},
73 fd1 = SAFE_OPEN("testfile", O_RDWR | O_CREAT, 0644); in setup()
75 SAFE_FSETXATTR(fd1, SECURITY_KEY, VALUE, VALUE_SIZE, XATTR_CREATE); in setup()
80 if (fd1 > 0) in cleanup()
81 SAFE_CLOSE(fd1); in cleanup()
/external/linux-kselftest/tools/testing/selftests/kcmp/
Dkcmp_test.c23 static long sys_kcmp(int pid1, int pid2, int type, unsigned long fd1, unsigned long fd2) in sys_kcmp() argument
25 return syscall(__NR_kcmp, pid1, pid2, type, fd1, fd2); in sys_kcmp()
37 int fd1, fd2; in main() local
42 fd1 = open(kpath, O_RDWR | O_CREAT | O_TRUNC, 0644); in main()
45 if (fd1 < 0) { in main()
102 sys_kcmp(pid1, pid2, KCMP_FILE, fd1, fd2), in main()
114 ret = sys_kcmp(pid1, pid2, KCMP_FILE, fd1, fd1); in main()
/external/ltp/testcases/kernel/syscalls/fcntl/
Dfcntl32.c35 static int fd1; variable
101 fd1 = SAFE_OPEN(cleanup, "file", test_cases[i].fd1_flag); in verify_fcntl()
104 TEST(fcntl(fd1, F_SETLEASE, F_WRLCK)); in verify_fcntl()
122 SAFE_CLOSE(cleanup, fd1); in verify_fcntl()
123 fd1 = 0; in verify_fcntl()
130 if (fd1 > 0 && close(fd1)) in cleanup()
/external/ltp/testcases/kernel/syscalls/lseek/
Dlseek07.c24 static int fd1, fd2; variable
33 {&fd1, TFILE1, 7, 7, 10, "abcdefgijk"},
76 fd1 = SAFE_OPEN(TFILE1, O_RDWR | O_CREAT, 0644); in setup()
79 SAFE_WRITE(1, fd1, WR_STR1, sizeof(WR_STR1) - 1); in setup()
85 if (fd1 > 0) in cleanup()
86 SAFE_CLOSE(fd1); in cleanup()
/external/ltp/testcases/kernel/syscalls/flock/
Dflock06.c24 int fd1, fd2; in verify_flock() local
26 fd1 = SAFE_OPEN("testfile", O_RDWR); in verify_flock()
27 TEST(flock(fd1, LOCK_EX | LOCK_NB)); in verify_flock()
40 TEST(flock(fd1, LOCK_UN)); in verify_flock()
52 SAFE_CLOSE(fd1); in verify_flock()
Dflock03.c59 int fd1; in verify_flock() local
62 fd1 = SAFE_OPEN("testfile", O_RDWR); in verify_flock()
66 childfunc(fd1); in verify_flock()
68 TEST(flock(fd1, LOCK_EX | LOCK_NB)); in verify_flock()
81 SAFE_CLOSE(fd1); in verify_flock()
/external/python/cpython3/Python/
Ddup2.c20 dup2(int fd1, int fd2) in dup2() argument
22 if (fd1 != fd2) { in dup2()
23 if (fcntl(fd1, F_GETFL) < 0) in dup2()
27 if (fcntl(fd1, F_DUPFD, fd2) < 0) in dup2()
/external/python/cpython2/Python/
Ddup2.c20 dup2(int fd1, int fd2) in dup2() argument
22 if (fd1 != fd2) { in dup2()
23 if (fcntl(fd1, F_GETFL) < 0) in dup2()
27 if (fcntl(fd1, F_DUPFD, fd2) < 0) in dup2()
/external/ltp/testcases/kernel/syscalls/fchmod/
Dfchmod06.c21 static int fd1; variable
30 {&fd1, 0644, EPERM},
62 fd1 = SAFE_OPEN("tfile_1", O_RDWR | O_CREAT, 0666); in setup()
71 if (fd1 > 0) in cleanup()
72 SAFE_CLOSE(fd1); in cleanup()

123456