Changeset View
Changeset View
Standalone View
Standalone View
tests/sys/fifo/fifo_io.c
Show First 20 Lines • Show All 1,172 Lines • ▼ Show 20 Lines | test_events_write_read_byte(void) | ||||
*/ | */ | ||||
if (assert_status(writer_fd, kqueue_fd, NOT_READABLE, WRITABLE, | if (assert_status(writer_fd, kqueue_fd, NOT_READABLE, WRITABLE, | ||||
NOT_EXCEPTION, __func__, "write", "writer_fd") < 0) { | NOT_EXCEPTION, __func__, "write", "writer_fd") < 0) { | ||||
cleanfifo3("testfifo", reader_fd, writer_fd, kqueue_fd); | cleanfifo3("testfifo", reader_fd, writer_fd, kqueue_fd); | ||||
exit(-1); | exit(-1); | ||||
} | } | ||||
/* | /* | ||||
* Read the byte from the reader_fd, and now confirm that that fifo | * Read the byte from the reader_fd, and now confirm that the fifo | ||||
* becomes unreadable. | * becomes unreadable. | ||||
*/ | */ | ||||
len = read(reader_fd, &ch, sizeof(ch)); | len = read(reader_fd, &ch, sizeof(ch)); | ||||
if (len < 0) { | if (len < 0) { | ||||
warn("%s: read", __func__); | warn("%s: read", __func__); | ||||
cleanfifo3("testfifo", reader_fd, writer_fd, kqueue_fd); | cleanfifo3("testfifo", reader_fd, writer_fd, kqueue_fd); | ||||
exit(-1); | exit(-1); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 210 Lines • Show Last 20 Lines |