public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Re: Test failure in libgcj on mainline
@ 2004-11-27 13:44 John David Anglin
  2004-11-27 18:41 ` Ranjit Mathew
  0 siblings, 1 reply; 7+ messages in thread
From: John David Anglin @ 2004-11-27 13:44 UTC (permalink / raw)
  To: gcc-patches; +Cc: rmathew, aph, gcc

> Running /home/aph/gcc/gcc/libjava/testsuite/libjava.cni/cni.exp ...
> ERROR: tcl error sourcing /home/aph/gcc/gcc/libjava/testsuite/libjava.cni/cni.exp.
> ERROR: can't unset "env(SHLIB_PATH)": no such element in array

Sorry, this is caused by my recent LD_LIBRARY_PATH.  This didn't appear
in my testing.  There seems to be some difference in behavior of unsetenv
from one system to another.

The enclosed patch should fix the problem.  Tested on i686-pc-linux-gnu.
I will install as obvious.

Dave
-- 
J. David Anglin                                  dave.anglin@nrc-cnrc.gc.ca
National Research Council of Canada              (613) 990-0752 (FAX: 952-6602)

2004-11-26  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>

	* lib/target-libpath.exp (restore_ld_library_path_env_vars):
	Check existence of ld library path variables before unsetting.

Index: lib/target-libpath.exp
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/lib/target-libpath.exp,v
retrieving revision 1.2
diff -u -3 -p -r1.2 target-libpath.exp
--- lib/target-libpath.exp	25 Nov 2004 04:27:13 -0000	1.2
+++ lib/target-libpath.exp	27 Nov 2004 04:38:08 -0000
@@ -196,42 +196,42 @@ proc restore_ld_library_path_env_vars { 
 
   if { $orig_ld_library_path_saved } {
     setenv LD_LIBRARY_PATH "$orig_ld_library_path"
-  } else {
+  } elseif [info exists env(LD_LIBRARY_PATH)] {
     unsetenv LD_LIBRARY_PATH
   }
   if { $orig_ld_run_path_saved } {
     setenv LD_RUN_PATH "$orig_ld_run_path"
-  } else {
+  } elseif [info exists env(LD_RUN_PATH)] {
     unsetenv LD_RUN_PATH
   }
   if { $orig_shlib_path_saved } {
     setenv SHLIB_PATH "$orig_shlib_path"
-  } else {
+  } elseif [info exists env(SHLIB_PATH)] {
     unsetenv SHLIB_PATH
   }
   if { $orig_ld_libraryn32_path_saved } {
     setenv LD_LIBRARYN32_PATH "$orig_ld_libraryn32_path"
-  } else {
+  } elseif [info exists env(LD_LIBRARYN32_PATH)] {
     unsetenv LD_LIBRARYN32_PATH
   }
   if { $orig_ld_library64_path_saved } {
     setenv LD_LIBRARY64_PATH "$orig_ld_library64_path"
-  } else {
+  } elseif [info exists env(LD_LIBRARY64_PATH)] {
     unsetenv LD_LIBRARY64_PATH
   }
   if { $orig_ld_library_path_32_saved } {
     setenv LD_LIBRARY_PATH_32 "$orig_ld_library_path_32"
-  } else {
+  } elseif [info exists env(LD_LIBRARY_PATH_32)] {
     unsetenv LD_LIBRARY_PATH_32
   }
   if { $orig_ld_library_path_64_saved } {
     setenv LD_LIBRARY_PATH_64 "$orig_ld_library_path_64"
-  } else {
+  } elseif [info exists env(LD_LIBRARY_PATH_64)] {
     unsetenv LD_LIBRARY_PATH_64
   }
   if { $orig_dyld_library_path_saved } {
     setenv DYLD_LIBRARY_PATH "$orig_dyld_library_path"
-  } else {
+  } elseif [info exists env(DYLD_LIBRARY_PATH)] {
     unsetenv DYLD_LIBRARY_PATH
   }
 }

^ permalink raw reply	[flat|nested] 7+ messages in thread
* Test failure in libgcj on mainline
@ 2004-11-25 12:46 Andrew Haley
  2004-11-26 12:23 ` Ranjit Mathew
  0 siblings, 1 reply; 7+ messages in thread
From: Andrew Haley @ 2004-11-25 12:46 UTC (permalink / raw)
  To: gcc, java

This seems to be because SHLIB_PATH isn't being set.  I can trivially
fix this with the patch at the end of his mail, but I don't know that
is the right fix.


Running /home/aph/gcc/gcc/libjava/testsuite/libjava.cni/cni.exp ...
ERROR: tcl error sourcing /home/aph/gcc/gcc/libjava/testsuite/libjava.cni/cni.exp.
ERROR: can't unset "env(SHLIB_PATH)": no such element in array
    while executing
"unset env($var)"
    (procedure "unsetenv" line 3)
    invoked from within
"unsetenv SHLIB_PATH"
    (procedure "restore_ld_library_path_env_vars" line 37)
    invoked from within
"restore_ld_library_path_env_vars"
    (procedure "gcj_invoke" line 20)
    invoked from within
"gcj_invoke $main [file rootname $file].out {}"
    (procedure "gcj_cni_test_one" line 35)
    invoked from within
"gcj_cni_test_one $x"
    (procedure "gcj_cni_run" line 10)
    invoked from within
"gcj_cni_run
"
    (file "/home/aph/gcc/gcc/libjava/testsuite/libjava.cni/cni.exp" line 119)
    invoked from within
"source /home/aph/gcc/gcc/libjava/testsuite/libjava.cni/cni.exp"
    ("uplevel" body line 1)
    invoked from within
"uplevel #0 source /home/aph/gcc/gcc/libjava/testsuite/libjava.cni/cni.exp"
    invoked from within
"catch "uplevel #0 source $test_file_name""


Andrew.



Index: target-libpath.exp
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/lib/target-libpath.exp,v
retrieving revision 1.2
diff -u -r1.2 target-libpath.exp
--- target-libpath.exp	25 Nov 2004 04:27:13 -0000	1.2
+++ target-libpath.exp	25 Nov 2004 12:39:30 -0000
@@ -207,7 +207,7 @@
   if { $orig_shlib_path_saved } {
     setenv SHLIB_PATH "$orig_shlib_path"
   } else {
-    unsetenv SHLIB_PATH
+      catch { unsetenv SHLIB_PATH }
   }
   if { $orig_ld_libraryn32_path_saved } {
     setenv LD_LIBRARYN32_PATH "$orig_ld_libraryn32_path"

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2004-11-30  7:02 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-11-27 13:44 Test failure in libgcj on mainline John David Anglin
2004-11-27 18:41 ` Ranjit Mathew
2004-11-27 21:50   ` John David Anglin
2004-11-29 10:48     ` Ranjit Mathew
2004-11-30 13:55     ` Ranjit Mathew
  -- strict thread matches above, loose matches on Subject: below --
2004-11-25 12:46 Andrew Haley
2004-11-26 12:23 ` Ranjit Mathew

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).