bug-gnulib
[Top][All Lists]
Advanced

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

[PATCH] test-xalloc-die: avoid unwarranted test failure on OpenSolaris 5


From: Jim Meyering
Subject: [PATCH] test-xalloc-die: avoid unwarranted test failure on OpenSolaris 5.11
Date: Mon, 03 May 2010 18:33:40 +0200

Without this patch, diffutils' "make check" would fail on OpenSolaris 5.11
like this:  (note the unexpected "1> out" line in "err2"):

    ...
    + create_exe_shims_ ...
    + return 0
    + shift
    + test 0 != 0
    + export PATH
    + test-xalloc-die
    + 2> err + tr -d '\015'
    + 0< err
    + sed 's,.*test-xalloc-die[.ex]*:,test-xalloc-die:,'
    + 1> err2
    + compare - err2
    + 0<< \EOF
    test-xalloc-die: memory exhausted
    EOF
    + diff -u - err2
    --- -   2010-05-03 10:03:24.316371509 -0600
    +++ err2        2010-05-03 10:03:24.309479087 -0600
    @@ -1 +1,2 @@
    +1> out
     test-xalloc-die: memory exhausted
    + Exit 1
    + set +e
    ...
    ======================================
    1 of 1 test failed
    See gnulib-tests/test-suite.log


>From d3d059cf53625ddfe2ff4f64759131e846f83b94 Mon Sep 17 00:00:00 2001
From: Jim Meyering <address@hidden>
Date: Mon, 3 May 2010 18:30:38 +0200
Subject: [PATCH] test-xalloc-die: avoid unwarranted test failure on OpenSolaris 
5.11

* tests/test-xalloc-die.sh: Redirect stdout before stderr, (i.e.,
"> out 2> err", rather than "2> err > out").  Otherwise, with /bin/sh
on OpenSolaris 5.11 snv_134, we would end up with a stray "1> out"
line in the "err2" output file when running "make check" in verbose
mode (i.e., with set -x enabled).
---
 ChangeLog                |    9 +++++++++
 tests/test-xalloc-die.sh |    2 +-
 2 files changed, 10 insertions(+), 1 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 4378ddb..0ec11b9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2010-05-03  Jim Meyering  <address@hidden>
+
+       test-xalloc-die: avoid unwarranted test failure on OpenSolaris 5.11
+       * tests/test-xalloc-die.sh: Redirect stdout before stderr, (i.e.,
+       "> out 2> err", rather than "2> err > out").  Otherwise, with /bin/sh
+       on OpenSolaris 5.11 snv_134, we would end up with a stray "1> out"
+       line in the "err2" output file when running "make check" in verbose
+       mode (i.e., with set -x enabled).
+
 2010-05-03  Bruno Haible  <address@hidden>

        wctob: Fix for weird platforms.
diff --git a/tests/test-xalloc-die.sh b/tests/test-xalloc-die.sh
index 80d6208..375cd14 100755
--- a/tests/test-xalloc-die.sh
+++ b/tests/test-xalloc-die.sh
@@ -18,7 +18,7 @@

 . "${srcdir=.}/init.sh"; path_prepend_ .

-test-xalloc-die${EXEEXT} 2> err > out
+test-xalloc-die${EXEEXT} > out 2> err
 case $? in
   1) ;;
   *) Exit 1;;
--
1.7.1.335.g6845a




reply via email to

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