[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: tests/ls/stat-free-colors.sh broken with glibc-2.22
From: |
Bernhard Voelker |
Subject: |
Re: tests/ls/stat-free-colors.sh broken with glibc-2.22 |
Date: |
Sun, 30 Aug 2015 23:04:24 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 |
On 08/29/2015 03:14 AM, Pádraig Brady wrote:
>> As we can't predict the number of stat() calls as before,
>> what shall we do to fix the test?
>
> Maybe something like:
>
> -strace -o log-help -e $stats ls --help >/dev/null || fail=1
> -n_lines_help=$(wc -l < log-help)
> +strace -o log-init -e $stats ls . >/dev/null || fail=1
> +n_lines_init=$(wc -l < log-init)
>
Thinking about it more, the test should verify that ls(1) doesn't
need more stat-like calls for a populated directory argument (with
regular files, symlinks, etc. below) than for an empty directory
argument, shouldn't it?
The new version of the test in the attached patch does exactly this.
Thanks & have a nice day,
Berny
0001-tests-avoid-FP-of-ls-stat-free-color.sh-with-newer-g.patch
Description: Text Data