Daniel Richard G. wrote:
> Currently, test-symlink and test-symlinkat are failing on z/OS:
> 
>     $ ./test-symlink
>     .../test-symlink.h:64: assertion 'errno == ENOTDIR || errno == ENOENT' 
> failed
>     CEE5207E The signal SIGABRT was received.
>     ABORT instruction
> 
>     $ ./test-symlinkat 
>     .../test-symlink.h:64: assertion 'errno == ENOTDIR || errno == ENOENT' 
> failed
>     CEE5207E The signal SIGABRT was received.
>     ABORT instruction
> 
> What happens in both cases is that errno == EINVAL. If I add that to the
> ASSERT() condition at lines 63 and 84 of test-symlink.h (as of a3fd683d),
> then these two tests pass.
> 
> IBM documents EINVAL as a possible return value for symlink():
> 
>     
> https://www.ibm.com/support/knowledgecenter/SSLTBW_2.2.0/com.ibm.zos.v2r1.bpxb100/sym.htm

The relevant spec here is POSIX:
http://pubs.opengroup.org/onlinepubs/9699919799/functions/symlink.html
Line 64 of test-symlink.h:64 corresponds to the case

  [ENOENT] or [ENOTDIR]
    The path2 argument contains at least one non- <slash> character and ends 
with one or more trailing <slash> characters. ...

> However, the GNU/Linux man pages for symlink() and symlinkat() make no
> mention of EINVAL.

When a facility is specified by POSIX, gnulib's tests try to go with the POSIX
spec, at least on non-glibc platforms. 

Bruno


Reply via email to