Home
last modified time | relevance | path

Searched refs:devfd (Results 1 – 6 of 6) sorted by relevance

/linux-6.12.1/tools/testing/selftests/powerpc/papr_sysparm/
Dpapr_sysparm.c15 const int devfd = open(DEVPATH, O_RDONLY); in open_close() local
17 SKIP_IF_MSG(devfd < 0 && errno == ENOENT, in open_close()
20 FAIL_IF(devfd < 0); in open_close()
21 FAIL_IF(close(devfd) != 0); in open_close()
31 const int devfd = open(DEVPATH, O_RDONLY); in get_splpar() local
33 SKIP_IF_MSG(devfd < 0 && errno == ENOENT, in get_splpar()
36 FAIL_IF(devfd < 0); in get_splpar()
37 FAIL_IF(ioctl(devfd, PAPR_SYSPARM_IOC_GET, &sp) != 0); in get_splpar()
40 FAIL_IF(close(devfd) != 0); in get_splpar()
50 const int devfd = open(DEVPATH, O_RDONLY); in get_bad_parameter() local
[all …]
/linux-6.12.1/tools/testing/selftests/powerpc/papr_vpd/
Dpapr_vpd.c18 const int devfd = open(DEVPATH, O_RDONLY); in dev_papr_vpd_open_close() local
20 SKIP_IF_MSG(devfd < 0 && errno == ENOENT, in dev_papr_vpd_open_close()
23 FAIL_IF(devfd < 0); in dev_papr_vpd_open_close()
24 FAIL_IF(close(devfd) != 0); in dev_papr_vpd_open_close()
31 const int devfd = open(DEVPATH, O_RDONLY); in dev_papr_vpd_get_handle_all() local
36 SKIP_IF_MSG(devfd < 0 && errno == ENOENT, in dev_papr_vpd_get_handle_all()
39 FAIL_IF(devfd < 0); in dev_papr_vpd_get_handle_all()
42 fd = ioctl(devfd, PAPR_VPD_IOC_CREATE_HANDLE, &lc); in dev_papr_vpd_get_handle_all()
46 FAIL_IF(close(devfd) != 0); in dev_papr_vpd_get_handle_all()
70 const int devfd = open(DEVPATH, O_RDONLY); in dev_papr_vpd_get_handle_byte_at_a_time() local
[all …]
/linux-6.12.1/tools/testing/selftests/drivers/dma-buf/
Dudmabuf.c57 static int create_udmabuf_list(int devfd, int memfd, off64_t memfd_size) in create_udmabuf_list() argument
77 ubuf_fd = ioctl(devfd, UDMABUF_CREATE_LIST, list); in create_udmabuf_list()
136 int devfd, memfd, buf, ret; in main() local
143 devfd = open("/dev/udmabuf", O_RDWR); in main()
144 if (devfd < 0) { in main()
176 buf = ioctl(devfd, UDMABUF_CREATE, &create); in main()
186 buf = ioctl(devfd, UDMABUF_CREATE, &create); in main()
196 buf = ioctl(devfd, UDMABUF_CREATE, &create); in main()
209 buf = ioctl(devfd, UDMABUF_CREATE, &create); in main()
224 buf = create_udmabuf_list(devfd, memfd, size); in main()
[all …]
/linux-6.12.1/tools/testing/selftests/tdx/
Dtdx_guest_test.c135 int devfd, i; in TEST() local
137 devfd = open(TDX_GUEST_DEVNAME, O_RDWR | O_SYNC); in TEST()
138 ASSERT_LT(0, devfd); in TEST()
145 ASSERT_EQ(0, ioctl(devfd, TDX_CMD_GET_REPORT0, &req)); in TEST()
160 ASSERT_EQ(0, close(devfd)); in TEST()
/linux-6.12.1/tools/testing/selftests/bpf/prog_tests/
Dd_path.c43 int sockfd = -1, procfd = -1, devfd = -1; in trigger_fstat_events() local
60 devfd = open("/dev/urandom", O_RDONLY); in trigger_fstat_events()
61 if (CHECK(devfd < 0, "trigger", "open /dev/urandom failed\n")) in trigger_fstat_events()
84 ret = set_pathname(devfd, pid); in trigger_fstat_events()
99 fstat(devfd, &fileStat); in trigger_fstat_events()
113 close(devfd); in trigger_fstat_events()
/linux-6.12.1/tools/testing/selftests/net/
Dncdevmem.c205 static void create_udmabuf(int *devfd, int *memfd, int *buf, size_t dmabuf_size) in create_udmabuf() argument
210 *devfd = open("/dev/udmabuf", O_RDWR); in create_udmabuf()
211 if (*devfd < 0) { in create_udmabuf()
235 *buf = ioctl(*devfd, UDMABUF_CREATE, &create); in create_udmabuf()
248 int devfd, memfd, buf, ret; in do_server() local
264 create_udmabuf(&devfd, &memfd, &buf, dmabuf_size); in do_server()
459 close(devfd); in do_server()
468 int devfd, memfd, buf; in run_devmem_tests() local
475 create_udmabuf(&devfd, &memfd, &buf, dmabuf_size); in run_devmem_tests()