


     readv_L(LSB.os/iopriRelease 1I1 (UniSoft Ltreadv_L(LSB.os/ioprim)



     NAME
	  LSB.os/ioprim/readv_L	- <description>	test case

     DESCRIPTION
	  This test case tests the readv() system call interface for
	  conformance to parts of The Open Group's CAE Specification:
	  System Interfaces and	Headers, page:readv()

     TESTS
     Compliance
	  1    When the	number of bytes	remaining after	the file
	       pointer associated with fildes is greater than or equal
	       to the sum of the iov_len members in the	iovec
	       structures iov[0] through iov[iovcnt- 1], then a	call
	       to readv(fildes,	iov, iovcnt) places the	file data in
	       the buffers specified in	the iovec structures, filling
	       each buffer completely before moving on to the next,
	       and returns the number of bytes read.  In each of these
	       iovec structures, the iov_base member points to the
	       start of	a buffer in which data is to be	placed,	and
	       the iov_len member specifies the	length of the buffer.

	  2    When the	values of all the iov_len members are zero,
	       then a call to readv(fildes, iov, iovcnt) returns zero
	       and the st_atime, st_ctime st_mtime fields are not
	       updated.

	  3    When fildes refers to a regular file, then a call to
	       readv(fildes, iov, iovcnt) retrieves data from the
	       current file offset.

	  4    After a successful call to readv(fildes,	iov, iovcnt),
	       the file	offset associated with fildes is incremented
	       by the number of	bytes read.

	  5    When the	file referenced	by fildes does not support
	       seeking,	then a successful call to
	       readv(fildes, iov, iovcnt) reads	data starting at the
	       current position	in the file.

	  6    When fildes refers to a regular file and	the sum	of the
	       iov_len members is more than the	number of bytes
	       remaining in the	file, then a call to
	       readv(fildes, iov, iovcnt) places the remaining file
	       contents	in the buffers specified in the	iovec
	       structures and returns the number of bytes remaining in
	       the file.

	  7    If the implementation supports character	special	files:
		   For file types other	than pipe or FIFO, when	a
		   readv() operation is	interrupted by a signal, the
		   number of bytes successfully	read so	far is



     Page 1					    (printed 2/21/103)






     readv_L(LSB.os/iopriRelease 2I2 (UniSoft Ltreadv_L(LSB.os/ioprim)



		   returned;
					otherwise
		   -1 is returned and errno is set to EINTR.

	  8    When fildes refers to a pipe or FIFO and	a call to
	       readv(fildes, iov, iovcnt) is interrupted by a signal
	       after some data has been	transfered, then the number of
	       bytes read is returned.

	  9    When the	file offset associated with fildes is at or
	       beyond the end of the file, then	a call to
	       readv(fildes, iov, iovcnt) returns zero.

	  10   When fildes refers to an	empty pipe which is not	open
	       for writing by any process, then	a call to
	       readv(fildes, iov, iovcnt) returns zero.

	  11   When fildes refers to an	empty pipe or FIFO and
	       O_NONBLOCK is clear, then a call	to
	       readv(fildes, iov, iovcnt) blocks until data is written
	       to the file or until the	file is	no longer open for
	       writing.

	  12   When fildes refers to a file that is capable of seeking
	       and a call to readv(fildes, iov,	iovcnt)	reads any
	       portion of the file prior to end-of-file	which has not
	       been written, then each byte read from this portion is
	       transferred with	a value	of zero.

	  13   After a successful call to readv(fildes,	iov, iovcnt)
	       the access time field st_atime is marked	for update.

	  14   When fildes refers to a pipe or FIFO which contains at
	       least one byte and the sum of the iov_len members is
	       greater than the	number of bytes	in the file, then a
	       call to readv(fildes, iov, iovcnt) transfers as much
	       data as is available and	returns	the number of bytes
	       read.

	  15   When the	current	file pointer associated	with fildes is
	       at end-of-file, then a successful call to
	       readv(fildes, iov, iovcnt) marks	the st_atime field for
	       update.

	  16   When fildes refers to a pipe or FIFO, O_NONBLOCK	is set
	       and a call to readv(fildes, iov,	iovcnt)	would be
	       delayed,	then -1	is returned and	errno is set to
	       EAGAIN.

	  17   When fildes does	not refer to a valid file descriptor
	       open for	reading, then a	call to
	       readv(fildes, iov, iovcnt) returns -1 with errno	set to



     Page 2					    (printed 2/21/103)






     readv_L(LSB.os/iopriRelease 3I3 (UniSoft Ltreadv_L(LSB.os/ioprim)



	       EBADF.

	  18   When a signal is	caught before any data has been
	       transferred, then a call	to readv(fildes, iov, iovcnt)
	       returns -1 with errno set to EINTR.

	  19   If _POSIX_JOB_CONTROL is	supported:
		   When	fildes refers to the controlling terminal, the
		   calling process is in a background process group
		   and the process is either ignoring or blocking
		   SIGTTIN, then a call	to readv(fildes, iov, iovcnt)
		   returns -1 with errno set to	EIO.

	  20   If _POSIX_JOB_CONTROL is	supported:
		   When	fildes refers to the controlling terminal, the
		   calling process is in a background process group
		   and the process is orphaned,	then a call to
		   readv(fildes, iov, iovcnt) returns -1 with errno
		   set to EIO.

	  21   If the implementation supports a	read-only file system:
		   When	fildes references a file on a read-only	file
		   system, then	a call to readv(fildes,	iov, iovcnt)
		   does	not update the time related element st_atime
		   of the file.

	  22   When iovcnt is less than	or equal to zero, then a call
	       to readv(fildes,	iov, iovcnt) returns -1	with errno set
	       to EINVAL.

	  23   When iovcnt is greater than {IOV_MAX}, then a call to
	       readv(fildes, iov, iovcnt) returns -1 with errno	set to
	       EINVAL.

	  24   When the	sum of the iov_len members overflows a
	       ssize_t,	then a call to readv(fildes, iov, iovcnt)
	       returns -1 with errno set to EINVAL.

     RELEASE
	  LSB-os %I% (%E%)















     Page 3					    (printed 2/21/103)



