bug-gnulib
[Top][All Lists]
Advanced

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

Re: [bug-gzip] gzip-1.5 test failures on FreeBSD 9.0 and NetBSD 5.1


From: Paul Eggert
Subject: Re: [bug-gzip] gzip-1.5 test failures on FreeBSD 9.0 and NetBSD 5.1
Date: Wed, 20 Jun 2012 07:10:37 -0700
User-agent: Mozilla/5.0 (X11; Linux i686; rv:12.0) Gecko/20120430 Thunderbird/12.0.1

On 06/20/2012 06:38 AM, Nelson H. F. Beebe wrote:
> This time, the runs succeeded, without
> any infinite loops (though that could be because /usr/local/bin/zdiff
> is now the latest version).

OK, thanks, I've pushed the following change to gnulib
and it should percolate to gzip on the next sync.

>From 90e0b1373ff0d386a23e9598f783e92c5fd912e5 Mon Sep 17 00:00:00 2001
From: Paul Eggert <address@hidden>
Date: Wed, 20 Jun 2012 07:06:54 -0700
Subject: [PATCH] init.sh: do not rely on autoupated PWD

This addresses symptoms of the problem reported by Nelson H.F. Beebe in
<http://lists.gnu.org/archive/html/bug-gzip/2012-06/msg00008.html>.
Although Nelson's bug was not necessarily fixed by this patch,
it seems wise to make the change for safety.
* tests/init.sh (path_prepend_): Do not rely on PWD updating
automagically after 'cd'; this is not reliable on older shells.
(setup_): Fail if we cannot cd to temporary directory.
---
 ChangeLog     |   11 +++++++++++
 tests/init.sh |    5 ++---
 2 files changed, 13 insertions(+), 3 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 073a9c8..e0e827d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2012-06-20  Paul Eggert  <address@hidden>
+
+       init.sh: do not rely on autoupated PWD
+       This addresses symptoms of the problem reported by Nelson H.F. Beebe in
+       <http://lists.gnu.org/archive/html/bug-gzip/2012-06/msg00008.html>.
+       Although Nelson's bug was not necessarily fixed by this patch,
+       it seems wise to make the change for safety.
+       * tests/init.sh (path_prepend_): Do not rely on PWD updating
+       automagically after 'cd'; this is not reliable on older shells.
+       (setup_): Fail if we cannot cd to temporary directory.
+
 2012-06-19  Bruno Haible  <address@hidden>
 
        stat, fstat: Avoid warnings on mingw64.
diff --git a/tests/init.sh b/tests/init.sh
index f525a7c..5f6e638 100644
--- a/tests/init.sh
+++ b/tests/init.sh
@@ -411,8 +411,7 @@ path_prepend_ ()
     case $path_dir_ in
       '') fail_ "invalid path dir: '$1'";;
       /*) abs_path_dir_=$path_dir_;;
-      *) abs_path_dir_=`cd "$initial_cwd_/$path_dir_" && echo "$PWD"` \
-           || fail_ "invalid path dir: $path_dir_";;
+      *) abs_path_dir_=$initial_cwd_/$path_dir_;;
     esac
     case $abs_path_dir_ in
       *:*) fail_ "invalid path dir: '$abs_path_dir_'";;
@@ -448,7 +447,7 @@ setup_ ()
   pfx_=`testdir_prefix_`
   test_dir_=`mktempd_ "$initial_cwd_" "$pfx_-$ME_.XXXX"` \
     || fail_ "failed to create temporary directory in $initial_cwd_"
-  cd "$test_dir_"
+  cd "$test_dir_" || fail_ "failed to cd to temporary directory"
 
   # As autoconf-generated configure scripts do, ensure that IFS
   # is defined initially, so that saving and restoring $IFS works.
-- 
1.7.6.5




reply via email to

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