|
Home About Us A-Z Index Search * Contact Us Register Login Press ShopThe Open Brand -- Problem Reporting and Interpretations System |
Problem Report 0281 Details
Show help | Quick Search | Submit a Test Suite Support Request | Click here to view your privileges
This page provides all information on Problem Report 0281.
Report 0281 Actions
Problem Report Number 0281 Submitter's Classification Test Suite problem State Resolved Resolution Test Suite Deficiency (TSD) Problem Resolution ID TSD.X.0281 Raised 2002-10-01 08:00 Updated 2003-03-13 08:00 Published 2002-10-08 08:00 Product Standard Network File System Certification Program The Open Brand certification program Test Suite VSX4+XNFS version 4.4.5 Test Identification POSIX.os/ioprim/write 16 Problem Summary TSD4.281 For this test, the relevant part of the write(2) definition, taken from http://www.opengroup.org/onlinepubs/007904975/functions/write.html is this: " When attempting to write to a file descriptor (oth... Problem Text
For this test, the relevant part of the write(2) definition,
taken from
http://www.opengroup.org/onlinepubs/007904975/functions/write.html
is this:
"
When attempting to write to a file descriptor (other than a pipe
or FIFO) that supports non-blocking writes and cannot accept the
data immediately:
* If the O_NONBLOCK flag is clear, write() shall block the
calling thread until the data can be accepted.
* If the O_NONBLOCK flag is set, write() shall not block the
thread. If some data can be written without blocking the thread,
write() shall write what it can and return the number of bytes
written. Otherwise, it shall return -1 and set errno to [EAGAIN].
"
In the case of the IRIX NFS client:
* we support non-blocking writes; and
* the file descriptor *can* accept all the data
due to client side file buffering.
Hence, the write() call returns immediately with the indication
that all the data has been written to the file descriptor.
This is allowable behaviour because the file descriptor has not
been opened with synchronous file semantics specified (O_SYNC).
Irix will then write the data out to the server asynchronously.
The Irix NFS server does generate an ENOSPC error, and it will
be returned to the client test application on subsequent write()
or close() calls to the file descriptor.
Because the test does not do a second write() call, and
specifically ignores the error from close, the error cannot be
reported back to the test application.
The test is attempting to achieve a return from write(2)
that is >=0 and < the size of the write. That is, a partially
successful write. We believe the test is incorrect in two ways.
Firstly, in order to fullfil the requirements in the above quoted
section, the test should open the file with O_NONBLOCK, which it fails
to do.
Secondly, this test assumes that the amount of data written to
the file descriptor relates directly to the amount of data written
to stable storage. This requires synchronous operation of the write()
call. The relevant quote from the write(2) page is:
"
If the O_SYNC bit has been set, write I/O operations on the file
descriptor shall complete as defined by synchronized I/O file
integrity completion.
"
If we want to ensure that the above assumed semantics are used,
according to the above quote, the file must be opened with the
O_SYNC flag set. This has not been specified by the open() call
in the test.
The Irix NFS client returns the correct results if the file is
opened with the O_SYNC and O_NONBLOCK flags set. We believe that
the test file must be opened with these flags to ensure that the
write() call to behave as the test requires.
--Test Output
/tset/POSIX.os/ioprim/write/T.write 16 Failed
Test Description:
If there is not enough space in the output device, then only as many
bytes as there are room for will be written.
Posix Ref: Component WRITE Assertion 6.4.2.2-11(B)
Test Strategy:
CREATE a new process and exec a subprogram
SUBPROGRAM:
SETUP the file system given by VSX_NOSPC_DEV to be almost full with
setupnospc()
DETERMINE size of one of the temporary files (fill.tmp1)
WRITE a buffer to this file that is twenty times as large as its
current size
VERIFY that write() returned a value greater than zero and less than
the buffer size
CLEAN up file system with tidynospc()
Test Information:
write() returned 199800, expected < 199800Review Information
Review Type TSMA Review Start Date null Completed null Status Complete Review Recommendation No Resolution Given Review Response
This is accepted as a fault in the test suite.
It is worth noting that the submitter's comments about O_NONBLOCK
are incorrect, and the text quoted from the XSH specification
related to O_NONBLOCK is irrelevant.
The fault should be fixed by changing the test to open the file
with O_SYNC set (when testing XNFS).
Review Type SA Review Start Date null Completed null Status Complete Review Resolution Test Suite Deficiency (TSD) Review Conclusion
This is an agreed Test Suite Deficiency.
Problem Reporting System Options:
- View Report 0281
- List All PRs
- Search Reports
- Email the System Administrator
- View the The Open Brand Interpretations Database User Manual
Contact the Certification Authority