coreutils
[Top][All Lists]
Advanced

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

Re: tests/du/slink.sh: what's the rationale?


From: Pádraig Brady
Subject: Re: tests/du/slink.sh: what's the rationale?
Date: Sun, 20 Jan 2013 12:34:28 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:13.0) Gecko/20120615 Thunderbird/13.0.1

On 01/20/2013 12:31 PM, Bernhard Voelker wrote:
On 01/20/2013 12:01 PM, Pádraig Brady wrote:
On 01/19/2013 10:33 PM, Bernhard Voelker wrote:
Does anyone remember the reason for adding this test?

tests/du/slink.sh:2:
    # Ensure that the size of a long-named-symlink is > 0.

I guess the rationale is to verify the symlink is not being resolved,
though you're right that symlink allocation is dependent on the
file system.

Thanks, yes, that sounds reasonable.

I suppose one could use a loopback ext2 file system
like in cp/cp-a-selinux.sh.

Probably, but this would require_root_, of course.
BTW: interestingly, it would fail on a loop-mounted EXT2 file system
(all the created links have 0 size there) while it would work on EXT4.

heh interesting


Wouldn't it then be better to make the test positive, i.e. prove that
a symlink which points to a 10k file does not show up as 10k in du?
... but stop, reading through tests/du, we have such tests already:
   * tests/deref-args.sh
   * tests/du/deref.sh
   * tests/du/no-deref.sh
All 3 tests above prove that dereferencing or not-dereferencing works
fine.

That makes me come to my initial question:

Is tests/du/slink.sh obsolete nowadays?

That test is problematic with various file systems, and the original
test case is already covered by other tests. I'd tend to simply
remove it.

+1

thanks for the detailed anlaysis,
Pádraig.



reply via email to

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