bug-gnulib
[Top][All Lists]
Advanced

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

Re: z/OS and symlink()


From: Bruno Haible
Subject: Re: z/OS and symlink()
Date: Tue, 28 Feb 2017 16:47:11 +0100
User-agent: KMail/5.1.3 (Linux/4.4.0-64-generic; KDE/5.18.0; x86_64; ; )

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

[Prev in Thread] Current Thread [Next in Thread]