bug-coreutils
[Top][All Lists]
Advanced

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

coreutils tests/misc/pwd patch for Solaris automounter


From: Paul Eggert
Subject: coreutils tests/misc/pwd patch for Solaris automounter
Date: Wed, 28 Jul 2004 12:24:46 -0700
User-agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux)

I installed this patch to fix a test-case bug encountered when running
"make test" under the Solaris automounter.

2004-07-28  Paul Eggert  <address@hidden>

        * tests/misc/pwd: Don't assume that Perl's getpwd agrees with our
        pwd when there are multiple names for the working directory
        (which can happen with an automounter, sigh).

Index: pwd
===================================================================
RCS file: /home/eggert/coreutils/cu/tests/misc/pwd,v
retrieving revision 1.1
retrieving revision 1.2
diff -p -u -r1.1 -r1.2
--- pwd 14 Jun 2004 17:19:46 -0000      1.1
+++ pwd 28 Jul 2004 19:23:07 -0000      1.2
@@ -8,12 +8,12 @@ $PERL -e 1 > /dev/null 2>&1 || {
   exit 77
 }
 
-pwd=`pwd`
+framework_failure=0
+pwd=`${BUILD_SRC_DIR?}/pwd` || framework_failure=1
 t0=`echo "$0"|sed 's,.*/,,'`.tmp; tmp=$t0/$$
 trap 'status=$?; cd $pwd; chmod -R u+rwx $t0; rm -rf $t0 && exit $status' 0
 trap '(exit $?); exit $?' 1 2 13 15
 
-framework_failure=0
 mkdir -p $tmp || framework_failure=1
 cd $tmp || framework_failure=1
 
@@ -25,6 +25,9 @@ fi
 ARGV_0=$0
 export ARGV_0
 
+CWD=$pwd/$tmp
+export CWD
+
 $PERL -w -- - <<\EOF
 
 # Show that pwd works even when the length of the resulting
@@ -34,8 +37,7 @@ use Cwd;
 
 (my $ME = $ENV{ARGV_0}) =~ s|.*/||;
 
-my $cwd = getcwd;
-chomp $cwd;
+my $cwd = $ENV{CWD};
 my $z = 'z' x 31;
 my $n = 256;
 my $expected = $cwd . ("/$z" x $n);




reply via email to

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