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: Bernhard Voelker
Subject: Re: tests/du/slink.sh: what's the rationale?
Date: Sun, 20 Jan 2013 13:31:44 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130105 Thunderbird/17.0.2

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.

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.

Have a nice day,
Berny



reply via email to

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