


     aio_fsync(rt.os/aioVSRT 5.1.1 (The	Open Groupaio_fsync(rt.os/aio)



     NAME
	  rt.os/aio/aio_fsync -	asynchronous file synchronization
	  testset

     DESCRIPTION
	  Tests	the aio_fsync()	function for conformance to System
	  Interfaces and Headers, Issue	5 Page:	aio_fsync().

     TESTS
     Compliance
	  1    If _POSIX_ASYNCHRONOUS_IO and _POSIX_SYNCHRONOUS_IO are
	       defined or the implementation supports the aio_fsync()
	       function	as described in	System Interfaces and Headers,
	       Issue 5:
		 A successful call to aio_fsync() shall	queue the
		 aiocb structure referenced by aiocbp for the file
		 indicated by aiocbp->aio_fildes, setting its error
		 status	to EINPROGRESS and return 0.

	  2    If _POSIX_ASYNCHRONOUS_IO and _POSIX_SYNCHRONOUS_IO are
	       defined or the implementation supports the aio_fsync()
	       function	as described in	System Interfaces and Headers,
	       Issue 5:
		 When data for all asynchronous	I/O operations for the
		 file indicated	by aiocbp->aio_fildes queued prior to
		 a call	to aio_fsync() has been	successfully
		 transferred the error status for the the aiocb
		 structure referenced by aiocbp	shall be set to
		 indicate the success or failure of the	operation,
		 which can be retrieved	with aio_error() and
		 aio_return().

	  3    If _POSIX_ASYNCHRONOUS_IO and _POSIX_SYNCHRONOUS_IO are
	       defined or the implementation supports the aio_fsync()
	       function	as described in	System Interfaces and Headers,
	       Issue 5:
		 On a call to aio_fsync() when aiocbp-
		 >aio_sigev.sigev_notify is SIGEV_NONE no asynchronous
		 notification shall be delivered when the operation
		 completes.

	  4    If _POSIX_ASYNCHRONOUS_IO and _POSIX_SYNCHRONOUS_IO are
	       defined or the implementation supports the aio_fsync()
	       function	as described in	System Interfaces and Headers,
	       Issue 5:
		 On a call to aio_fsync() when aiocbp-
		 >aio_sigev.sigev_notify is SIGEV_SIGNAL the signal
		 specified in aiocbp->aio_sigev.sigev_signo shall be
		 generated for the process when	the operation
		 completes.

	  5    If _POSIX_ASYNCHRONOUS_IO, _POSIX_SYNCHRONOUS_IO	and



     Page 1					    (printed 2/21/103)






     aio_fsync(rt.os/aioVSRT 5.1.1 (The	Open Groupaio_fsync(rt.os/aio)



	       _POSIX_REALTIME_SIGNALS are defined or the
	       implementation supports the aio_fsync() function	as
	       described in System Interfaces and Headers, Issue 5:
		 On a call to aio_fsync() when aiocbp-
		 >aio_sigev.sigev_notify is SIGEV_SIGNAL and the
		 SA_SIGINFO flag is set	for the	signal specified in
		 aiocbp->aio_sigev.sigev_signo,	the signal shall be
		 queued	for the	process	when it	is generated and the
		 value specified in aiocbp->aio_sigev.sigev_value
		 shall be in the si_value component of the generated
		 signal.

	  6    If _POSIX_ASYNCHRONOUS_IO, _POSIX_SYNCHRONOUS_IO	and
	       _POSIX_REALTIME_SIGNALS are defined or the
	       implementation supports the aio_fsync() function	as
	       described in System Interfaces and Headers, Issue 5:
		 On a call to aio_fsync() when aiocbp-
		 >aio_sigev.sigev_notify is SIGEV_THREAD the function
		 in aiocbp->aio_sigev.sigev_notify_function shall be
		 called	with the value of aiocbp-
		 >aio_sigev.sigev_value	as a parameter when the
		 operation completes, executed in an environment as if
		 it were the start_routine for a newly created thread
		 with thread attributes	specified by aiocbp-
		 >aio_sigev.sigev_notify_attributes.

	  7    If _POSIX_ASYNCHRONOUS_IO, _POSIX_SYNCHRONOUS_IO	and
	       _POSIX_REALTIME_SIGNALS are defined or the
	       implementation supports the aio_fsync() function	as
	       described in System Interfaces and Headers, Issue 5:
		 On a call to aio_fsync() when aiocbp-
		 >aio_sigev.sigev_notify is SIGEV_THREAD and aiocbp-
		 >aio_sigev.sigev_notify_attributes is NULL the
		 function in aiocbp->aio_sigev.sigev_notify_function
		 shall be called with the value	of aiocbp-
		 >aio_sigev.sigev_value	as a parameter when the
		 operation completes, executed in an environment as if
		 it were the start_routine for a newly created thread
		 with the detachstate attribute	set to
		 PTHREAD_CREATE_DETACHED.

	  8    If _POSIX_ASYNCHRONOUS_IO and _POSIX_SYNCHRONOUS_IO are
	       defined or the implementation supports the aio_fsync()
	       function	as described in	System Interfaces and Headers,
	       Issue 5:
		 When aiocbp is	NULL a call to aio_fsync() shall not
		 cause a signal	to be generated	on completion of the
		 operation.

	  9    If _POSIX_ASYNCHRONOUS_IO and _POSIX_SYNCHRONOUS_IO are
	       defined or the implementation supports the aio_fsync()
	       function	as described in	System Interfaces and Headers,



     Page 2					    (printed 2/21/103)






     aio_fsync(rt.os/aioVSRT 5.1.1 (The	Open Groupaio_fsync(rt.os/aio)



	       Issue 5:
		 On a call to aio_fsync() all members of the aiocb
		 structure referenced by aiocbp	other than aio_fildes
		 and aio_sigevent shall	be ignored.

     Deviance
	  10   If _POSIX_ASYNCHRONOUS_IO and _POSIX_SYNCHRONOUS_IO are
	       defined or the implementation supports the aio_fsync()
	       function	as described in	System Interfaces and Headers,
	       Issue 5:
		 A call	to aio_fsync() shall return -1 and set errno
		 to EBADF when aiocbp->aio_fildes is not a valid file
		 descriptor open for writing.

	  11   If _POSIX_ASYNCHRONOUS_IO and _POSIX_SYNCHRONOUS_IO are
	       defined or the implementation supports the aio_fsync()
	       function	as described in	System Interfaces and Headers,
	       Issue 5 and there is a file type	for which the
	       implementation does not support synchronized I/O:
		 A call	to aio_fsync() shall return -1 and set errno
		 to EINVAL when	the implementation does	not support
		 synchronized I/O for this file.

	  12   If _POSIX_ASYNCHRONOUS_IO and _POSIX_SYNCHRONOUS_IO are
	       defined or the implementation supports the aio_fsync()
	       function	as described in	System Interfaces and Headers,
	       Issue 5:
		 A call	to aio_fsync() shall return -1 and set errno
		 to EINVAL when	the value of op	is neither O_DSYNC or
		 O_SYNC.

	  13   If _POSIX_ASYNCHRONOUS_IO or _POSIX_SYNCHRONOUS_IO are
	       not defined and the implementation does not support the
	       aio_fsync() function as described in System Interfaces
	       and Headers, Issue 5:
		 A call	to aio_fsync() shall return -1 and set errno
		 to ENOSYS.

     Untestable	Aspects
	  1    If _POSIX_ASYNCHRONOUS_IO and _POSIX_SYNCHRONOUS_IO are
	       defined or the implementation supports the aio_fsync()
	       function	as described in	System Interfaces and Headers,
	       Issue 5:
		 A call	to aio_fsync() when op is O_DSYNC shall	cause
		 all currently queued operations for the file
		 indicated by aiocbp->aio_fildes to be completed as
		 defined for synchronized I/O data integrity.
		 Reason	for omission: It is not	possible to determine
		 in a portable manner whether data has been written to
		 the file-system or whether file or data integrity
		 completion was	provided.




     Page 3					    (printed 2/21/103)






     aio_fsync(rt.os/aioVSRT 5.1.1 (The	Open Groupaio_fsync(rt.os/aio)



	  2    If _POSIX_ASYNCHRONOUS_IO and _POSIX_SYNCHRONOUS_IO are
	       defined or the implementation supports the aio_fsync()
	       function	as described in	System Interfaces and Headers,
	       Issue 5:
		 A call	to aio_fsync() when op is O_SYNC shall cause
		 all currently queued operations for the file
		 indicated by aiocbp->aio_fildes to be completed as
		 defined for synchronized I/O file integrity.
		 Reason	for omission: It is not	possible to determine
		 in a portable manner whether data has been written to
		 the file-system or whether file or data integrity
		 completion was	provided.

	  3    If _POSIX_ASYNCHRONOUS_IO and _POSIX_SYNCHRONOUS_IO are
	       defined or the implementation supports the aio_fsync()
	       function	as described in	System Interfaces and Headers,
	       Issue 5:
		 A call	to aio_fsync() shall return -1 and set errno
		 to EAGAIN when	the requested asynchronous I/O
		 operation is not queued due to	temporary resource
		 limitations.
		 Reason	for omission: This is not reliable test	method
		 for this assertion.

     RELEASE
	  Release VSRT 5.1.1
	  Copyright (c)	1997 X/Open Company Ltd., A member of The Open
	  Group.
	  All rights reserved


























     Page 4					    (printed 2/21/103)



