fileutils 4.1: tests/ls/follow-slink

Richard Dawe <[email protected]>
Newsgroups gmane.comp.gnu.fileutils.bugs
Message-ID <[email protected]>
Hello.

I'm trying to work out how tests/ls/follow-slink from fileutils 4.1 can
pass/fail, in particular the command:

    ls -L link 2> /dev/null && fail=1

This dereferences the link 'link'. It seems this 'ls' command is expected to
fail - presumably because the link is cyclic and some function will return
ELOOP.

'link' is a cyclic symlink created like this:

    ln -s link link || framework_failure=1

In the DJGPP port of 'ln', this does nothing. No symlink is created - this is
due to the DJGPP libc implementation of symlink(). So the 'ls -L' command
fails and the test passes.

Perhaps the test should do something like this?

    ln -s link link || framework_failure=1
    test -f link || framework_failure=1

Thanks, bye, Rich =]

PS: tests/ls/follow-slink from fileutils 4.1 is the same as in coreutils
4.5.3.

-- 
Richard Dawe [ http://www.phekda.freeserve.co.uk/richdawe/ ]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.