Report 2487 Actions
Problem Report Number |
2487 |
Submitter's Classification |
Test Suite problem |
State |
Resolved |
Resolution |
Rejected (REJ) |
Problem Resolution ID |
REJ.X.0675 |
Raised |
2005-11-02 20:26 |
Updated |
2005-11-09 19:17 |
Published |
2005-11-09 19:17 |
Product Standard |
Internationalised System Calls and Libraries Extended V3 (UNIX 03) |
Certification Program |
The Open Brand certification program |
Test Suite |
VSU version 5.2.7 |
Test Identification |
CAPI.os/sockets/connect 20 |
Specification |
Base Definitions Issue 6 |
Location in Spec |
XSH line 7451 pdf version. |
Problem Summary |
Test setup is not correct |
Problem Text |
Doing execution of test 20, connect() is getting a ENOENT error. It's
because it's trying to connect to the path which doesn't exist. The test
needs to have the path created before calling connect(). |
Test Output |
************************************************************************
/tset/CAPI.os/sockets/connect/T.connect 20 Failed
Test Description:
Base Conditional Deviance
If the implementation supports the AF_UNIX communications domain
and a
connection-oriented socket type and a sufficient address size:
ENAMETOOLONG in errno and return -1 on a call to int connect(int
socket, const struct sockaddr *address, socklen_t address_len) when
the address family of the socket is AF_UNIX and the length of a
pathname component is longer than NAME_MAX.
Test Information:
PREP: Create test sockaddr_un: path = ../tmp/unix.Iwanqa
TEST: AF_UNIX SOCK_STREAM
PREP: Create socket
PREP: Obtain pathconf(_PC_PATH_MAX) for ../tmp
PREP: Obtain pathconf(_PC_NAME_MAX) for ../tmp
PREP: Allocate 1025 byte buffer for name
PREP: Make pathname with file name of 256 chars
TEST: connect fails with ENAMETOOLONG
ERROR: connect set errno to 2 (ENOENT - No such file or directory)
PREP: Obtain pathconf(_PC_PATH_MAX) for ../tmp
PREP: Obtain pathconf(_PC_NAME_MAX) for ../tmp
PREP: Allocate 1025 byte buffer for name
PREP: Make pathname with component of 256 chars
TEST: connect fails with ENAMETOOLONG
ERROR: connect set errno to 2 (ENOENT - No such file or directory)
************************************************************************ |
Review Information
Review Type |
TSMA Review |
Start Date |
2005-11-02 20:26 |
Last Updated |
2005-11-03 00:25 |
Completed |
2005-11-03 00:25 |
Status |
Complete |
Review Recommendation |
Rejected (REJ) |
Review Response |
The submitter suggests that the failure can be corrected by changing the
test such that the path exists before the connect() call is made. This
would not work because any attempt to create the path would fail with
ENAMETOOLONG.
It is possible that this implementation complies with the letter of the
specification, but I do not believe that it complies with the spirit.
The intention is that the pathname-related errors should provide useful
information about the path that was used. In several cases the path can
be thought of as not existing even though the "real" error is something
else. For example if a component of the path prefix is not a directory
then it is true that the path does not exist, but the "real" error is
ENOTDIR, not ENOENT. Likewise if a symlink loop occurs in the path
prefix then, although the path does not exist, the "real" error is
ELOOP, not ENOENT. I believe the intention is that ENOENT should mean
"it is possible for a file with this pathname to exist, but no such file
exists at the moment" (except when pathname is an empty string).
Setting errno to ENOENT when a file with the given pathname could not
exist is not useful information, it is misleading.
Thus, even though the standard does not specify a precedence between the
ENOENT and ENAMETOOLONG error conditions for connect(), I believe it is
inappropriate for an implementation to set errno to ENOENT when a
pathname component is longer than NAME_MAX, because it is not possible
for a file with that pathname to exist and thus setting errno to ENOENT
is misleading. The "real" error is ENAMETOOLONG.
My recommendation is to reject this request for a TSD, but if the
submitter wishes to appeal it rather than change their connect()
function to give precedence to ENAMETOOLONG over ENOENT, then it should
be forwarded to the expert group for review. |
Review Type |
SA Review |
Start Date |
2005-11-03 00:25 |
Last Updated |
2005-11-04 07:48 |
Completed |
2005-11-04 07:48 |
Status |
Complete |
Review Resolution |
Rejected (REJ) |
Review Conclusion |
The TSMA does not believe that the test is in error but acknowledges
that the specification does not specify a precedence between the
ENOENT and ENAMETOOLONG error conditions for connect().This
implementation sets errno to ENOENT when a file with the given
pathname could not exist and the TSMA considers this misleading or
unhelpful. The SA therefore asks the expert group to consider the
intent of the specification in this area and to determine if an
Interpretation (INT) is appropriate to legitimize the behavior of the
implementation or to refuse it as an INT if it believes that the
applicant should change their connect() function to give precedence to
ENAMETOOLONG over ENOENT |
Review Type |
Expert Group Review |
Start Date |
2005-11-09 19:12 |
Last Updated |
2005-11-09 19:16 |
Completed |
2005-11-09 19:16 |
Status |
Complete |
Review Resolution |
Rejected (REJ) |
Review Conclusion |
It is possible that this implementation complies with the letter of the
specification, but we do not believe that it complies with the spirit. |
Problem Reporting System Options:
|