coreutils
[Top][All Lists]
Advanced

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

Re: [PATCH] df: avoid stat() for dummy file systems with -l


From: Bernhard Voelker
Subject: Re: [PATCH] df: avoid stat() for dummy file systems with -l
Date: Wed, 2 Aug 2017 23:28:18 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0

On 08/01/2017 04:49 PM, Kamil Dudka wrote:
> Consider the following example:
> 
> # mount -t proc none /opt
> # mount -t tmpfs none /opt
> 
> Now unpached df does not list the /opt entry:
> 
> # df | grep opt
> 
> ... but after your patch, it does:
> 
> # df | grep opt
> none             2005384        0   2005384   0% /opt

[read it again]

hah, that is (another?) df bug because the tmpfs mounted on /opt
should be shown in the default output.
This proves that our tests lack some important cases
WRT over-mounting and suppressing duplicate mounts.

The test 'tests/df/skip-duplicates.sh' has become quite complicated
over the time.  IMO it would be good to simplify that, e.g. by
changing the LD_PRELOAD snippet so that the mtab entries can be
passed via stdin.  By this, each test case could pass it's own
specific test data to df(1).
TBH I'm not sure I will have time for this in the near future.
Anybody else?

Have a nice day,
Berny



reply via email to

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