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

Previous Next

Package: coreutils;

Reported by: Bernhard Voelker <mail <at> bernhard-voelker.de>

Date: Tue, 21 Jun 2011 09:01:02 UTC

Severity: normal

Done: Jim Meyering <jim <at> meyering.net>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Jim Meyering <jim <at> meyering.net>
To: Bernhard Voelker <mail <at> bernhard-voelker.de>
Cc: 8909 <at> debbugs.gnu.org
Subject: bug#8909: tests/ls/stat-free-color: fails on OpenSuSE 11.4
Date: Tue, 21 Jun 2011 15:41:47 +0200
Bernhard Voelker wrote:
...
> LS_COLORS='rs=0:di=01;34:ln=01;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=00:su=00:sg=00:ca=00:tw=00:ow=00:st=00:ex=00:mh=00:'
> ++ export LS_COLORS
> + strace -o log -e stat,lstat,stat64,lstat64 ls --color=always .
> color-without-stat
> dangle-1
> dangle-2
> dangle-3
> log
> ++ 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;;
 esac

 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.




This bug report was last modified 13 years and 335 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.