[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: possible test setup problem (LSB-OS)

hi Chris
I'll get some of the specifics later related to ftok. This does however
bring up an area where Linux is diverging from future POSIX
and the Single UNIX Specification in the definition of PATH_MAX.

This did not show up previously since we were running the tests in POSIX
mode, and POSIX has long had an ambiguity in the area about whether
the null byte is included in the PATH_MAX (it basically said both ways
in the 1990 text). The POSIX.1a draft (the amendment to POSIX.1-1990)
and XPG4 went with including the null byte in PATH_MAX, and the POSIX
1003.1-200x revision (Austin Group) and Single UNIX Specification Version
3 also continue this way.

When running in UNIX 98 mode, we pick up the XPG4 direction. This
will also be the future POSIX.1 mode when we revise the tests for
our Westwood release (for POSIX.1-2001 and SUSv3).

On Nov 20,  4:52pm in "possible test setup ", Christopher Yeoh wrote:
> While initially this looks like an implementation problem, tracing
> through the test it is testing a string of length PATH_MAX (including
> the null byte) expecting it to fail, while on linux PATH_MAX is set to
> the length excluding the null byte. From
> SRC/common/tsetlib/nametoolng.c:
> 		 * POSIX.1 allows PATH_MAX either to include or exclude
> 		 * the null byte, so we have to test PATH_MAX-1 for success
> 		 * and PATH_MAX+1 for failure (both excluding the null)
> 		 * in POSIX and XPG3 modes.  XPG4 says PATH_MAX includes
> 		 * the null byte, so test PATH_MAX-1 for success and
> 		 * PATH_MAX for failure in XPG4 mode.
> 		 */

Reply to: