Lines Matching refs:fd
29 int fd; in FIXTURE() local
33 self->fd = open(rtc_file, O_RDONLY); in FIXTURE_SETUP()
37 close(self->fd); in FIXTURE_TEARDOWN()
44 if (self->fd == -1 && errno == ENOENT) in TEST_F()
46 ASSERT_NE(-1, self->fd); in TEST_F()
49 rc = ioctl(self->fd, RTC_RD_TIME, &rtc_tm); in TEST_F()
91 if (self->fd == -1 && errno == ENOENT)
93 ASSERT_NE(-1, self->fd);
98 rc = ioctl(self->fd, RTC_RD_TIME, &rtc_tm);
106 rc = ioctl(self->fd, RTC_RD_TIME, &rtc_tm);
129 if (self->fd == -1 && errno == ENOENT)
131 ASSERT_NE(-1, self->fd);
134 rc = ioctl(self->fd, RTC_UIE_ON, 0);
143 rc = read(self->fd, &data, sizeof(data));
150 rc = ioctl(self->fd, RTC_UIE_OFF, 0);
158 if (self->fd == -1 && errno == ENOENT) in TEST_F()
160 ASSERT_NE(-1, self->fd); in TEST_F()
163 rc = ioctl(self->fd, RTC_UIE_ON, 0); in TEST_F()
175 FD_SET(self->fd, &readfds); in TEST_F()
177 rc = select(self->fd + 1, &readfds, NULL, NULL, &tv); in TEST_F()
182 rc = read(self->fd, &data, sizeof(unsigned long)); in TEST_F()
189 rc = ioctl(self->fd, RTC_UIE_OFF, 0); in TEST_F()
201 if (self->fd == -1 && errno == ENOENT) in TEST_F()
203 ASSERT_NE(-1, self->fd); in TEST_F()
205 rc = ioctl(self->fd, RTC_RD_TIME, &tm); in TEST_F()
211 rc = ioctl(self->fd, RTC_ALM_SET, &tm); in TEST_F()
218 rc = ioctl(self->fd, RTC_ALM_READ, &tm); in TEST_F()
225 rc = ioctl(self->fd, RTC_AIE_ON, 0); in TEST_F()
229 FD_SET(self->fd, &readfds); in TEST_F()
231 rc = select(self->fd + 1, &readfds, NULL, NULL, &tv); in TEST_F()
236 rc = ioctl(self->fd, RTC_AIE_OFF, 0); in TEST_F()
239 rc = read(self->fd, &data, sizeof(unsigned long)); in TEST_F()
243 rc = ioctl(self->fd, RTC_RD_TIME, &tm); in TEST_F()
259 if (self->fd == -1 && errno == ENOENT) in TEST_F()
261 ASSERT_NE(-1, self->fd); in TEST_F()
263 rc = ioctl(self->fd, RTC_RD_TIME, &alarm.time); in TEST_F()
271 rc = ioctl(self->fd, RTC_WKALM_SET, &alarm); in TEST_F()
278 rc = ioctl(self->fd, RTC_WKALM_RD, &alarm); in TEST_F()
287 FD_SET(self->fd, &readfds); in TEST_F()
289 rc = select(self->fd + 1, &readfds, NULL, NULL, &tv); in TEST_F()
293 rc = read(self->fd, &data, sizeof(unsigned long)); in TEST_F()
296 rc = ioctl(self->fd, RTC_RD_TIME, &tm); in TEST_F()
311 if (self->fd == -1 && errno == ENOENT)
313 ASSERT_NE(-1, self->fd);
315 rc = ioctl(self->fd, RTC_RD_TIME, &tm);
321 rc = ioctl(self->fd, RTC_ALM_SET, &tm);
328 rc = ioctl(self->fd, RTC_ALM_READ, &tm);
335 rc = ioctl(self->fd, RTC_AIE_ON, 0);
339 FD_SET(self->fd, &readfds);
341 rc = select(self->fd + 1, &readfds, NULL, NULL, &tv);
346 rc = ioctl(self->fd, RTC_AIE_OFF, 0);
349 rc = read(self->fd, &data, sizeof(unsigned long));
353 rc = ioctl(self->fd, RTC_RD_TIME, &tm);
369 if (self->fd == -1 && errno == ENOENT)
371 ASSERT_NE(-1, self->fd);
373 rc = ioctl(self->fd, RTC_RD_TIME, &alarm.time);
381 rc = ioctl(self->fd, RTC_WKALM_SET, &alarm);
388 rc = ioctl(self->fd, RTC_WKALM_RD, &alarm);
397 FD_SET(self->fd, &readfds);
399 rc = select(self->fd + 1, &readfds, NULL, NULL, &tv);
403 rc = read(self->fd, &data, sizeof(unsigned long));
406 rc = ioctl(self->fd, RTC_RD_TIME, &tm);