Lines Matching refs:devfd
15 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
52 SKIP_IF_MSG(devfd < 0 && errno == ENOENT, in get_bad_parameter()
55 FAIL_IF(devfd < 0); in get_bad_parameter()
58 FAIL_IF(ioctl(devfd, PAPR_SYSPARM_IOC_GET, &sp) != -1); in get_bad_parameter()
66 FAIL_IF(close(devfd) != 0); in get_bad_parameter()
73 const int devfd = open(DEVPATH, O_RDWR); in check_efault_common() local
75 SKIP_IF_MSG(devfd < 0 && errno == ENOENT, in check_efault_common()
78 FAIL_IF(devfd < 0); in check_efault_common()
81 FAIL_IF(ioctl(devfd, cmd, NULL) != -1); in check_efault_common()
84 FAIL_IF(close(devfd) != 0); in check_efault_common()
104 const int devfd = open(DEVPATH, O_RDWR); in set_hmc0() local
106 SKIP_IF_MSG(devfd < 0 && errno == ENOENT, in set_hmc0()
109 FAIL_IF(devfd < 0); in set_hmc0()
112 FAIL_IF(ioctl(devfd, PAPR_SYSPARM_IOC_SET, &sp) != -1); in set_hmc0()
116 FAIL_IF(close(devfd) != 0); in set_hmc0()
126 const int devfd = open(DEVPATH, O_RDONLY); in set_with_ro_fd() local
128 SKIP_IF_MSG(devfd < 0 && errno == ENOENT, in set_with_ro_fd()
131 FAIL_IF(devfd < 0); in set_with_ro_fd()
134 FAIL_IF(ioctl(devfd, PAPR_SYSPARM_IOC_SET, &sp) != -1); in set_with_ro_fd()
143 FAIL_IF(close(devfd) != 0); in set_with_ro_fd()