[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: coreutils-8.13.29-43a9 on Linux/SPARC64
From: |
Jim Meyering |
Subject: |
Re: coreutils-8.13.29-43a9 on Linux/SPARC64 |
Date: |
Sat, 08 Oct 2011 17:12:24 +0200 |
Bruno Haible wrote:
> On Linux/SPARC in 64-bit mode:
>
> FAIL: ls/stat-free-color
> FAIL: ls/stat-free-symlinks
> FAIL: mv/atomic
> FAIL: mv/atomic2
...
>
> The problem is apparently the 'strace' program on this platform. It works
> fine with 32-bit executables, but is unusable on 64-bit executables.
>
> On a 32-bit executable:
>
> $ strace /bin/ls --color=always .
> execve("/bin/ls", ["/bin/ls", "--color=always", "."], [/* 16 vars */]) = 0
> brk(0) = 0x36000
> uname({sys="Linux", node="gcc54", ...}) = 0
> access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or
> directory)
> access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or
> directory)
> open("/etc/ld.so.cache", O_RDONLY) = 3
> fstat64(3, {st_mode=S_IFREG|0644, st_size=48552, ...}) = 0
> ...
>
> On a 64-bit executable:
>
> $ strace ../src/ls --color=always .
> execve("../src/ls", ["../src/ls", "--color=always", "."], [/* 16 vars */]) = 0
>
> You can check against this situation by doing
>
> strace -o log-help ls --help >/dev/null || fail=1
> n_lines_help=$(wc -l < log-help)
> if test $n_lines_help = 0 || test $n_lines_help = 1; then
> ... skip the test ...
> fi
Nice. Thanks not just for the testing but also for
a test that I could use almost verbatim:
>From fc4c062ffaf28f5aba63b287f3e44f90dfc8d0cb Mon Sep 17 00:00:00 2001
From: Jim Meyering <address@hidden>
Date: Sat, 8 Oct 2011 17:11:10 +0200
Subject: [PATCH] tests: avoid false-positive failures on linux/sparc64
* tests/init.cfg (require_strace_): Detect a version of strace
that fails on linux/sparc64 for 64-bit executables. Report and
most of the suggested fix from Bruno Haible:
http://thread.gmane.org/gmane.comp.gnu.coreutils.general/1726/focus=1728
---
tests/init.cfg | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/tests/init.cfg b/tests/init.cfg
index 04abe4f..915f38a 100644
--- a/tests/init.cfg
+++ b/tests/init.cfg
@@ -128,6 +128,15 @@ require_strace_()
strace -qe "$1" echo > /dev/null 2>&1 ||
skip_ 'strace -qe "'"$1"'" does not work'
+
+ # On some linux/sparc64 systems, strace works fine on 32-bit executables,
+ # but prints only one line of output for every 64-bit executable.
+ strace -o log-help ls --help >/dev/null || framework_failure_
+ n_lines_help=$(wc -l < log-help)
+ rm -f log-help
+ if test $n_lines_help = 0 || test $n_lines_help = 1; then
+ skip_ 'strace produces no more than one line of output'
+ fi
}
require_setfacl_()
--
1.7.7.rc0.362.g5a14