[coreutils] Add upstream patch to fix test failures on aarch64

Peter Robinson pbrobinson at fedoraproject.org
Mon Dec 9 11:26:24 UTC 2013


commit a6b6d0c94b549a3a844334c407d4ae44f9cbb5e8
Author: Peter Robinson <pbrobinson at gmail.com>
Date:   Mon Dec 9 11:26:15 2013 +0000

    Add upstream patch to fix test failures on aarch64

 coreutils-aarch64-tests.patch |   62 +++++++++++++++++++++++++++++++++++++++++
 coreutils.spec                |    7 ++++-
 2 files changed, 68 insertions(+), 1 deletions(-)
---
diff --git a/coreutils-aarch64-tests.patch b/coreutils-aarch64-tests.patch
new file mode 100644
index 0000000..6d08ff0
--- /dev/null
+++ b/coreutils-aarch64-tests.patch
@@ -0,0 +1,62 @@
+From 970b2ddea2d47f3167f4166e646d414f235f04b1 Mon Sep 17 00:00:00 2001
+From: Pádraig Brady <P at draigBrady.com>
+Date: Sat, 07 Dec 2013 15:00:06 +0000
+Subject: tests: fix false failure on platforms using newfstatat
+
+* tests/ls/stat-free-color.sh: Add newfstatat to the list
+of syscalls to trace.  Also add all "stat" syscalls to the
+list of syscalls that we verify that strace supports.
+Also only create a single dangling symlink to check, since
+we already only check for a single "stat" call.
+Fixes http://bugs.gnu.org/16075 seen on AArch64
+---
+diff --git a/tests/ls/stat-free-color.sh b/tests/ls/stat-free-color.sh
+index 3aacf96..5fd5bea 100755
+--- a/tests/ls/stat-free-color.sh
++++ b/tests/ls/stat-free-color.sh
+@@ -18,12 +18,16 @@
+ 
+ . "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
+ print_ver_ ls
+-require_strace_ stat
++
++# Note this list of _file name_ stat functions must be
++# as cross platform as possible and so doesn't include
++# fstatat64 as that's not available on aarch64 for example.
++stats='stat,lstat,stat64,lstat64,newfstatat'
++
++require_strace_ $stats
+ require_dirent_d_type_
+ 
+-for i in 1 2 3; do
+-  ln -s nowhere dangle-$i || framework_failure_
+-done
++ln -s nowhere dangle || framework_failure_
+ 
+ # Disable enough features via LS_COLORS so that ls --color
+ # can do its job without calling stat (other than the obligatory
+@@ -53,17 +57,18 @@ 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
++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)
+ 
+-# Expect one or two stat calls.
++# Expect one stat call.
+ case $n_stat in
+-  1) ;;
++  0) skip_ 'No stat calls recognized on this platform' ;;
++  1) ;; # Corresponding to stat(".")
+   *) fail=1; head -n30 log* ;;
+ esac
+ 
+--
+cgit v0.9.0.2
diff --git a/coreutils.spec b/coreutils.spec
index 511ab2d..70fec8e 100644
--- a/coreutils.spec
+++ b/coreutils.spec
@@ -1,7 +1,7 @@
 Summary: A set of basic GNU tools commonly used in shell scripts
 Name:    coreutils
 Version: 8.21
-Release: 21%{?dist}
+Release: 22%{?dist}
 License: GPLv3+
 Group:   System Environment/Base
 Url:     http://www.gnu.org/software/coreutils/
@@ -16,6 +16,7 @@ Source106:  coreutils-colorls.csh
 Patch1: coreutils-8.21-install-strip.patch
 Patch2: coreutils-aarch64-longlong.patch
 Patch3: coreutils-cp-nopreserve-invalidargs.patch
+Patch4: coreutils-aarch64-tests.patch
 
 # Our patches
 #general patch to workaround koji build system issues
@@ -131,6 +132,7 @@ the old GNU fileutils, sh-utils, and textutils packages.
 %patch1 -p1 -b .strip
 %patch2 -p1 -b .aarch64
 %patch3 -p1 -b .nopres
+%patch4 -p1 -b .aarch64tests
 
 # Our patches
 %patch100 -p1 -b .configure
@@ -377,6 +379,9 @@ fi
 %{_sbindir}/chroot
 
 %changelog
+* Mon Dec  9 2013 Peter Robinson <pbrobinson at fedoraproject.org> 8.21-22
+- Add upstream patch to fix test failures on aarch64
+
 * Thu Nov 28 2013 Ondrej Vasik <ovasik at redhat.com> 8.21-21
 - turn on the multibyte path in the testsuite to cover
   i18n regressions


More information about the scm-commits mailing list