cvs commit: src/tools/regression/fifo/fifo_io fifo_io.c

Robert Watson rwatson at
Tue Sep 13 10:15:06 PDT 2005

rwatson     2005-09-13 17:15:05 UTC

  FreeBSD src repository

  Modified files:
    tools/regression/fifo/fifo_io fifo_io.c 
  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.
  Revision  Changes    Path
  1.5       +322 -480  src/tools/regression/fifo/fifo_io/fifo_io.c

More information about the cvs-src mailing list