bug-gnulib
[Top][All Lists]
Advanced

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

[PATCH 1/2] tests: fix logic bug in init.sh


From: Eric Blake
Subject: [PATCH 1/2] tests: fix logic bug in init.sh
Date: Tue, 24 May 2011 10:23:18 -0600

If the shell test loop first finds a marginal then a good shell, the
variable $gl_set_x_corrupts_stderr is still set to true and needlessly
drops $VERBOSE logging.

* tests/init.sh: (gl_set_x_corrupts_stderr_): Clear for successful
shell.

Signed-off-by: Eric Blake <address@hidden>
---
 ChangeLog     |    6 ++++++
 tests/init.sh |    5 ++++-
 2 files changed, 10 insertions(+), 1 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index b7be3f3..2047b73 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2011-05-24  Eric Blake  <address@hidden>
+
+       tests: fix logic bug in init.sh
+       * tests/init.sh: (gl_set_x_corrupts_stderr_): Clear for successful
+       shell.
+
 2011-05-24  Jim Meyering  <address@hidden>

        opendir-safer.c: don't clobber errno; don't close negative FD
diff --git a/tests/init.sh b/tests/init.sh
index 71c6516..294dcdd 100644
--- a/tests/init.sh
+++ b/tests/init.sh
@@ -167,7 +167,10 @@ else
     st_=$?

     # $re_shell_ works just fine.  Use it.
-    test $st_ = 10 && break
+    if test $st_ = 10; then
+      gl_set_x_corrupts_stderr_=false
+      break
+    fi

     # If this is our first marginally acceptable shell, remember it.
     if test "$st_:$marginal_" = 9: ; then
-- 
1.7.4.4




reply via email to

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