bug-coreutils
[Top][All Lists]
Advanced

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

Re: Test failure as root for package GNU coreutils revision 5.93


From: Paul Eggert
Subject: Re: Test failure as root for package GNU coreutils revision 5.93
Date: Wed, 29 Mar 2006 00:57:29 -0800
User-agent: Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux)

Pierre Vinet <address@hidden> writes:

> + chown --no-dereference 0:1 slink
> ++ ls -n slink
> + set _ lrwxr-xr-x 1 0 502 1 Mar 21 18:38 slink '->' f
> + shift
> + test 0:502 = 0:1
> + fail=1

This is a tricky one.  'chown --no-dereference 0:1 slink' is supposed
to do nothing without any complaint "if the system does not support
user or group IDs for symbolic links" -- that's the POSIX requirement.

Darwin does not provide an lchown function, so I suppose one could
argue that this means "the system does not support user or group IDs
for symbolic links".  And yet you can see those IDs; ls -l is showing
them.  So perhaps "chown --no-dereference 0:1 slink" should fail
on Darwin.

However, the argument against having "chown --no-dereference 0:1
slink" fail is that there is no portable way to tell whether "the
system does not support user or group IDs for symbolic links", other
than trying to invoke lchown and seeing whether it fails with
EOPNOTSUPP.  (Which is what chown already does.)

So I'd call this a bug in the test suite.  It should not assume that
"chown --no-dereference 0:1 slink" must succeed, even for root.
On some file systems and/or implementations, it will fail.




reply via email to

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