Subject: bug#16075: ls/stat-free-color.sh fails on AArch64 architecture

From: Marcin Juszkiewicz <[email-masked]>
Date: Fri, 06 Dec 2013 19:40:29 +0100

W dniu 06.12.2013 18:20, Pádraig Brady pisze:

> 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)

19:34 hrw@chroot-rawhide:coreutils-8.21.176-37e00$ patch <update.diff -p1
patching file tests/ls/stat-free-color.sh
19:34 hrw@chroot-rawhide:coreutils-8.21.176-37e00$ make check -C tests TESTS=ls/stat-free-color VERBOSE=yes
make: Wejście do katalogu `/home/hrw/test/coreutils-8.21.176-37e00/tests'
cd .. && make check TESTS=tests/ls/stat-free-color SUBDIRS=.
make[1]: Wejście do katalogu `/home/hrw/test/coreutils-8.21.176-37e00'
  GEN      public-submodule-commit
make  check-recursive
make[2]: Entering directory `/home/hrw/test/coreutils-8.21.176-37e00'
Making check in .
make[3]: Entering directory `/home/hrw/test/coreutils-8.21.176-37e00'
make  check-TESTS check-local
make[4]: Entering directory `/home/hrw/test/coreutils-8.21.176-37e00'
make[5]: Entering directory `/home/hrw/test/coreutils-8.21.176-37e00'
PASS: tests/ls/stat-free-color.sh
make[6]: Entering directory `/home/hrw/test/coreutils-8.21.176-37e00'
make  all-recursive
make[7]: Entering directory `/home/hrw/test/coreutils-8.21.176-37e00'
Making all in .
make[8]: Entering directory `/home/hrw/test/coreutils-8.21.176-37e00'
make[8]: Leaving directory `/home/hrw/test/coreutils-8.21.176-37e00'
make[7]: Leaving directory `/home/hrw/test/coreutils-8.21.176-37e00'
make[6]: Leaving directory `/home/hrw/test/coreutils-8.21.176-37e00'
============================================================================
Testsuite summary for GNU coreutils 8.21.176-37e00
============================================================================
# TOTAL: 1
# PASS:  1
# SKIP:  0
# XFAIL: 0
# FAIL:  0
# XPASS: 0
# ERROR: 0
============================================================================
make[5]: Leaving directory `/home/hrw/test/coreutils-8.21.176-37e00'
  GEN      check-README
  GEN      check-duplicate-no-install
  GEN      sc-avoid-builtin
  GEN      sc-avoid-io
  GEN      sc-avoid-non-zero
  GEN      sc-avoid-path
  GEN      sc-avoid-timezone
  GEN      sc-avoid-zeroes
  GEN      sc-exponent-grouping
  GEN      sc-lower-case-var
  GEN      check-texinfo
make[4]: Leaving directory `/home/hrw/test/coreutils-8.21.176-37e00'
make[3]: Leaving directory `/home/hrw/test/coreutils-8.21.176-37e00'
make[2]: Leaving directory `/home/hrw/test/coreutils-8.21.176-37e00'
make[1]: Opuszczenie katalogu `/home/hrw/test/coreutils-8.21.176-37e00'
make: Opuszczenie katalogu `/home/hrw/test/coreutils-8.21.176-37e00/tests'

All tests pass with this patch:
============================================================================
Testsuite summary for GNU coreutils 8.21.176-37e00
============================================================================
# TOTAL: 316
# PASS:  304
# SKIP:  12
# XFAIL: 0
# FAIL:  0
# XPASS: 0
# ERROR: 0
============================================================================
make[6]: Leaving directory `/home/hrw/test/coreutils-8.21.176-37e00/gnulib-tests'
make[5]: Leaving directory `/home/hrw/test/coreutils-8.21.176-37e00/gnulib-tests'
make[4]: Leaving directory `/home/hrw/test/coreutils-8.21.176-37e00/gnulib-tests'
make[3]: Leaving directory `/home/hrw/test/coreutils-8.21.176-37e00/gnulib-tests'
make[2]: Leaving directory `/home/hrw/test/coreutils-8.21.176-37e00/gnulib-tests'
make[1]: Leaving directory `/home/hrw/test/coreutils-8.21.176-37e00'
19:39 hrw@chroot-rawhide:coreutils-8.21.176-37e00$