possible test setup problem (LSB-OS)
Hi Andrew,
I have a question regarding TEST_XPG and perhaps it being set wrong
for our test runs. For the test /tset/LSB.os/ipc/ftok_L/T.ftok_L-7 we
get an error like this on different platforms and distributions:
A call to ftok() with path name too long did not fail
Expected Return: -1, errno ENAMETOOLONG
Actual Return: -16524275, errno 2(ENOENT)
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.
*/
len2 = len1;
#if !(TEST_XPG > 3)
len2++;
#endif
len1--;
So my question comes down to what XPG mode should we be running in,
and if its wrong how do we change it?
Regards,
Chris
--
cyeoh@au.ibm.com
IBM OzLabs Linux Development Group
Canberra, Australia
Reply to: