bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#11256: make check problems with coreutils 8.16 and earlier


From: Jim Meyering
Subject: bug#11256: make check problems with coreutils 8.16 and earlier
Date: Tue, 08 May 2012 11:02:21 +0200

Tim Mooney wrote:
...
> Regarding the overall issue of environment:  One thing that would help
> would be to enhance configure's search for a POSIX shell, so that if it
> finds bash as the POSIX shell, it automatically includes "--norc" when
> executing the tests.

I think your suggestion below will solve your remaining
"make check" failures.

> If you have any interest in it, I would consider supply a patch against
> the tests that checks to see if the invoking shell is bash, and if it is,
> it just runs "unalias -a" at the start of the test.

Thanks for the suggestion.
The file that needed the change comes from gnulib
and is about to be synced from there to coreutils.


>From e1bf1f165f3ad45f2e706aa8d147e2ddf2252b8d Mon Sep 17 00:00:00 2001
From: Jim Meyering <address@hidden>
Date: Tue, 8 May 2012 10:55:21 +0200
Subject: [PATCH] init.sh: don't let bash aliases interfere with tests

* tests/init.sh: Undefine any pre-defined aliases if the selected shell
is bash.  This avoids problems for those who alias standard commands to
non-conforming uses, like those reported in http://bugs.gnu.org/11256.
Suggested by Tim Mooney <address@hidden>.
---
 ChangeLog     | 8 ++++++++
 tests/init.sh | 3 +++
 2 files changed, 11 insertions(+)

diff --git a/ChangeLog b/ChangeLog
index f7d81ba..eae643f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2012-05-08  Jim Meyering  <address@hidden>
+
+       init.sh: don't let bash aliases interfere with tests
+       * tests/init.sh: Undefine any pre-defined aliases if the selected shell
+       is bash.  This avoids problems for those who alias standard commands to
+       non-conforming uses, like those reported in http://bugs.gnu.org/11256.
+       Suggested by Tim Mooney.
+
 2012-05-05  Bruno Haible  <address@hidden>

        nanosleep: Avoid guessing wrong when cross-compiling to Linux.
diff --git a/tests/init.sh b/tests/init.sh
index ae86714..d5cd294 100644
--- a/tests/init.sh
+++ b/tests/init.sh
@@ -207,6 +207,9 @@ else
   fi
 fi

+# If this is bash, turn off all aliases.
+test -n "$BASH_VERSION" && unalias -a
+
 test -n "$EXEEXT" && shopt -s expand_aliases

 # Enable glibc's malloc-perturbing option.
--
1.7.10.1.487.ga3935e6





reply via email to

[Prev in Thread] Current Thread [Next in Thread]