Home
last modified time | relevance | path

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

/linux/tools/testing/selftests/powerpc/papr_sysparm/
H A 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/tools/testing/selftests/powerpc/papr_vpd/
H A 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/tools/testing/selftests/drivers/dma-buf/
H A 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/tools/testing/selftests/tdx/
H A 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/tools/testing/selftests/bpf/prog_tests/
H A 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()