History log of /freebsd-10-stable/tests/sys/fifo/fifo_io.c
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 282842 13-May-2015 ngie

MFC r282067:

Integrate tools/regression/fifo into the FreeBSD test suite as tests/sys/fifo
and tools/regression/file into the FreeBSD test suite as tests/sys/file

# 282067 27-Apr-2015 ngie

Integrate tools/regression/fifo into the FreeBSD test suite as tests/sys/fifo
and tools/regression/file into the FreeBSD test suite as tests/sys/file

MFC after: 1 week


# 281450 12-Apr-2015 ngie

Integrate tools/regression/fifo into the FreeBSD test suite as tests/sys/fifo


# 281414 11-Apr-2015 ngie

Integrate more tests into the FreeBSD test suite from tools/regression, etc


# 228975 29-Dec-2011 uqs

Spelling fixes for tools/

Add some $FreeBSD$ tags so svn will allow the commit.


# 164083 07-Nov-2006 jkim

Use z modifier for size_t and ssize_t.


# 150093 13-Sep-2005 rwatson

Restructure fifo_io event-related tests in order to support test cases
relating to O_RDWR file descriptors, which while not defined in POSIX,
are in fact used:

(1) Revise assumption that we have two file descriptors when testing I/O
operations on a fifo. Provide cleanup routines that handle either
two or three file descriptors (including a kqueue descriptor).

(2) Add an openfifo_rw() routine to supplement openfifo().

(3) kqueue_setup() now configures an existing kqueue to monitor a new
file descriptor, rather than allocating a new kqueue to monitor two
existing file descriptors.

(4) Wrap all direct poll/select/kqueue/FIONREAD interactions in a single
function, assert_status(), which takes a file descriptor, kqueue
descriptor, assertion of read/writable/exception states, and
test description, then tests the assertion. This reduces the bulk
of calls in many of the tests, making them shorter, more readable,
and easier to determine correct.

(5) Add a new test_events_rdwr() function, which performs a basic create/
write/read event test on a O_RDWR fifo file descriptor. This is
currently failed by our fifo code in HEAD due to a bug in FIONREAD
handling. Fix to be merged shortly.


# 150091 13-Sep-2005 rwatson

Teach fifo_io how to use ioctl(FIONREAD) to determine if a fifo is
readable, and use that in addition to poll+select+kqueue to verify
appropriate readability.


# 150059 12-Sep-2005 rwatson

Further updates to fifo_io regression test:

- Teach fifo_io about kqueue monitoring of fifo file descriptor status,
and add test cases for kqueue to match existing case for poll and
select. Add a new cleanup routine, cleanfifokq(), for use in tests that
use kqueues. kqueue_setup() sets up kqueue sessions, and kqueue_status()
returns file descriptor status.

- Correct a bug in select handling relating to the nfds argument, which
was incorrect so resulted in select occuring on the wrong file descriptor,
and possible false positive/negative results.

- Clarify error reporting in one byte write+read tests to distinguish
errors in the after case from the before case.


# 150031 12-Sep-2005 rwatson

Use different temporary directory templates for fifo_io and fifo_open so
that if the tests fail to GC their working spaces, it's clear which it is.


# 150022 12-Sep-2005 rwatson

Add fifo_io, a regression test for I/O operations on POSIX fifos. We
currently can't pass this regression test due to broken poll() and
select() support for fifos, but past the basic I/O operation tests.