GNU bug report logs -
#16075
ls/stat-free-color.sh fails on AArch64 architecture
Previous Next
Full log
Message #11 received at 16075 <at> debbugs.gnu.org (full text, mbox):
On 12/06/2013 04:48 PM, Bernhard Voelker wrote:
> On 12/06/2013 04:50 PM, Marcin Juszkiewicz wrote:
>> Test checks for use of stat,lstat,stat64,lstat64 syscalls. But on
>> AArch64 it is using statfs64 and newfstatat calls so test fails.
>>
>> log and log-help attached
>>
>> Commands used:
>> strace -o log ls --color=always >/dev/null
>> strace -o log-help ls --help >/dev/null
>
> Thanks for the bug report.
> Does adding both system calls as in the following patch help?
>
> Thanks & have a nice day,
> Berny
>
>
> diff --git a/tests/ls/stat-free-color.sh b/tests/ls/stat-free-color.sh
> index 3aacf96..145c566 100755
> --- a/tests/ls/stat-free-color.sh
> +++ b/tests/ls/stat-free-color.sh
> @@ -53,10 +53,11 @@ eval $(dircolors -b color-without-stat)
> # To avoid counting those, first get a baseline count by running
> # ls with only the --help option. Then, compare that with the
> # invocation under test.
> -strace -o log-help -e stat,lstat,stat64,lstat64 ls --help >/dev/null || fail=1
> +stats='stat,lstat,stat64,lstat64,statfs64,newfstatat'
> +strace -o log-help -e "$stats" ls --help >/dev/null || fail=1
> n_lines_help=$(wc -l < log-help)
>
> -strace -o log -e stat,lstat,stat64,lstat64 ls --color=always . || fail=1
> +strace -o log -e "$stats" ls --color=always . || fail=1
> n_lines=$(wc -l < log)
>
> n_stat=$(expr $n_lines - $n_lines_help)
That would probably work, though perhaps we should
make this test a bit more general with something like the following?
Also Marcin, could you try out the latest snapshot (which will
also need the patch applied). It has another aarch64 specific patch included,
and it would be great to verify it on this platform.
Two birds with one stone and all that. Simple test instructions at:
http://lists.gnu.org/archive/html/coreutils/2013-12/msg00062.html
diff --git a/tests/ls/stat-free-color.sh b/tests/ls/stat-free-color.sh
index 3aacf96..4dd7ae7 100755
--- a/tests/ls/stat-free-color.sh
+++ b/tests/ls/stat-free-color.sh
@@ -53,11 +53,11 @@ eval $(dircolors -b color-without-stat)
# To avoid counting those, first get a baseline count by running
# ls with only the --help option. Then, compare that with the
# invocation under test.
-strace -o log-help -e stat,lstat,stat64,lstat64 ls --help >/dev/null || fail=1
-n_lines_help=$(wc -l < log-help)
+strace -o log-help ls --help >/dev/null || fail=1
+n_lines_help=$(grep 'stat.*(' log-help | wc -l)
-strace -o log -e stat,lstat,stat64,lstat64 ls --color=always . || fail=1
-n_lines=$(wc -l < log)
+strace -o log ls --color=always . || fail=1
+n_lines=$(grep 'stat.*(' log | wc -l)
n_stat=$(expr $n_lines - $n_lines_help)
This bug report was last modified 11 years and 218 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.