####################################################
Test Name: creat.24 Failed
Test Description:
For the XNFS specification:
Not in use.
For the XSH specification:
If _POSIX_NO_TRUNC is defined:
If _POSIX_NAME_MAX <= {NAME_MAX} <= PCTS_NAME_MAX, then
ENAMETOOLONG in errno and a return value of -1 on a call to
creat(path, mode) when the length of a pathname component of
path is longer than the maximum number of bytes in a filename
{NAME_MAX};
otherwise
a call to creat(path, mode) when the length of a component of
path equals PCTS_NAME_MAX does not give an ENAMETOOLONG error.
Posix Ref: Component CREAT Assertion 5.3.2.4-49(C)
Test Strategy:
IF pathconf() returns a value of NAME_MAX <= PCTS_NAME_MAX, and not -1
CREATE a file with a filename of length NAME_MAX using creat()
VERIFY that creat() returned successfully
CREATE a file with a filename of length NAME_MAX+1 using creat()
VERIFY that creat() returned -1 and errno was set to ENAMETOOLONG
OTHERWISE
CREATE a file with a filename of length PCTS_NAME_MAX using creat()
VERIFY that creat() returned successfully
Test Information:
creat("<256 char path>", 0777) did not give correct results
RETURN VALUES: expected: 0, observed: -1
ERRNO VALUES: expected: 0 (NO ERROR), observed: 36 (ENAMETOOLONG)
####################################################