[Top][All Lists]

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

bug#8909: tests/ls/stat-free-color: fails on OpenSuSE 11.4

From: Bernhard Voelker
Subject: bug#8909: tests/ls/stat-free-color: fails on OpenSuSE 11.4
Date: Tue, 21 Jun 2011 16:05:55 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv: Gecko/20110414 SUSE/3.1.10 Thunderbird/3.1.10

On 06/21/2011 03:41 PM, Jim Meyering wrote:
Bernhard Voelker wrote:
++ export LS_COLORS
+ strace -o log -e stat,lstat,stat64,lstat64 ls --color=always .
++ wc -l
+ n_lines=5
+ case $n_lines in
+ fail=1
How can I help?

Thanks for testing and the report.
If you apply the patch below and rerun the test like this,

     make check -C tests TESTS=ls/stat-free-color VERBOSE=yes

then the offending strace output should help understand where
the extra stat calls are coming from.

For reference, I get this single call on Fedora 15:

     stat(".", {st_mode=S_IFDIR|0700, st_size=4096, ...}) = 0

diff --git a/tests/ls/stat-free-color b/tests/ls/stat-free-color
index b1c4744..a1f6418 100755
--- a/tests/ls/stat-free-color
+++ b/tests/ls/stat-free-color
@@ -55,7 +55,7 @@ n_lines=$(wc -l<  log)
  # Expect one or two stat calls.
  case $n_lines in
    1|2) ;;
-  *) fail=1 ;;
+  *) fail=1; cat log;;

  Exit $fail


It might be useful to see the entire strace output, too.
To get that, remove the "-e stat,lstat,stat64,lstat64" argument
from the strace invocation, and rerun the test.

The output of both runs is attached.
stat("/usr/lib64/mpi/gcc/openmpi/lib64") and friends is the culprit.

I can't remember to have anything un-OpenSuSE-11.4-like in my toolchain.

To me it seems that the test should count the difference of the
number of stat,lstat,stat64,lstat64 calls when run
  a) as a dummy:  ls --color=always --help
  b) for ".":     ls --color=always .

Have a nice day,

Attachment: ls.stat-free-color.all.out
Description: Text document

Attachment: ls.stat-free-color.out
Description: Text document

reply via email to

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