diff mbox

[testsuite] Properly set ld_library_path in cilk-plus tests

Message ID ydda9gq9iqv.fsf@lokon.CeBiTec.Uni-Bielefeld.DE
State New
Headers show

Commit Message

Rainer Orth Nov. 27, 2013, 11:39 a.m. UTC
All 64-bit gcc.dg/atomic and c-c++-common/cilk-plus/CK execution tests
were FAILing on Solaris 10 and 11/x86:

ld.so.1: c11-atomic-exec-1.exe: fatal: /var/gcc/regression/trunk/10-gcc-gas/build/./gcc/libgcc_s.so.1: wrong ELF class: ELFCLASS32

ld.so.1: fib.exe: fatal: /var/gcc/regression/trunk/10-gcc-gas/build/i386-pc-solaris2.10/./libcilkrts/.libs/libcilkrts.so.5: wrong ELF class: ELFCLASS32

This happens because both cilk-plus.exp files override ld_library_path
instead of appending to it.  Fixed as follows by using the customary
method for setting ld_library_path.  Bootstrapped without regressions on
i386-pc-solaris2.1[01] and x86_64-unknown-linux-gnu, installed on
mainline.

	Rainer
 

2013-11-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

	* gcc.dg/cilk-plus/cilk-plus.exp: Append to ld_library_path.
	Call set_ld_library_path_env_vars.
	* g++.dg/cilk-plus/cilk-plus.exp: Likewise.

Comments

Jeff Law Nov. 27, 2013, 5:22 p.m. UTC | #1
On 11/27/13 04:39, Rainer Orth wrote:
> All 64-bit gcc.dg/atomic and c-c++-common/cilk-plus/CK execution tests
> were FAILing on Solaris 10 and 11/x86:
>
> ld.so.1: c11-atomic-exec-1.exe: fatal: /var/gcc/regression/trunk/10-gcc-gas/build/./gcc/libgcc_s.so.1: wrong ELF class: ELFCLASS32
>
> ld.so.1: fib.exe: fatal: /var/gcc/regression/trunk/10-gcc-gas/build/i386-pc-solaris2.10/./libcilkrts/.libs/libcilkrts.so.5: wrong ELF class: ELFCLASS32
>
> This happens because both cilk-plus.exp files override ld_library_path
> instead of appending to it.  Fixed as follows by using the customary
> method for setting ld_library_path.  Bootstrapped without regressions on
> i386-pc-solaris2.1[01] and x86_64-unknown-linux-gnu, installed on
> mainline.
>
> 	Rainer
>
>
> 2013-11-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
>
> 	* gcc.dg/cilk-plus/cilk-plus.exp: Append to ld_library_path.
> 	Call set_ld_library_path_env_vars.
> 	* g++.dg/cilk-plus/cilk-plus.exp: Likewise.
Thanks for taking care of this.  You're probably getting more cilk+ 
fallout than most because you do a lot of Solaris work.   Sorry about that.


jeff
Iyer, Balaji V Nov. 27, 2013, 5:24 p.m. UTC | #2
> -----Original Message-----
> From: Rainer Orth [mailto:ro@CeBiTec.Uni-Bielefeld.DE]
> Sent: Wednesday, November 27, 2013 6:39 AM
> To: gcc-patches@gcc.gnu.org
> Cc: Iyer, Balaji V
> Subject: [testsuite] Properly set ld_library_path in cilk-plus tests
> 
> All 64-bit gcc.dg/atomic and c-c++-common/cilk-plus/CK execution tests
> were FAILing on Solaris 10 and 11/x86:
> 
> ld.so.1: c11-atomic-exec-1.exe: fatal: /var/gcc/regression/trunk/10-gcc-
> gas/build/./gcc/libgcc_s.so.1: wrong ELF class: ELFCLASS32
> 
> ld.so.1: fib.exe: fatal: /var/gcc/regression/trunk/10-gcc-gas/build/i386-pc-
> solaris2.10/./libcilkrts/.libs/libcilkrts.so.5: wrong ELF class: ELFCLASS32
> 
> This happens because both cilk-plus.exp files override ld_library_path
> instead of appending to it.  Fixed as follows by using the customary method
> for setting ld_library_path.  Bootstrapped without regressions on i386-pc-
> solaris2.1[01] and x86_64-unknown-linux-gnu, installed on mainline.
> 
> 	Rainer
> 
> 
> 2013-11-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
> 
> 	* gcc.dg/cilk-plus/cilk-plus.exp: Append to ld_library_path.
> 	Call set_ld_library_path_env_vars.
> 	* g++.dg/cilk-plus/cilk-plus.exp: Likewise.

Thanks for catching this! Sorry I didn't catch it sooner. I am just getting myself familiar with the DejaGNU framework.

-Balaji V. Iyer.
Rainer Orth Nov. 28, 2013, 12:36 p.m. UTC | #3
Hi Balaji,

>> 2013-11-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
>> 
>> 	* gcc.dg/cilk-plus/cilk-plus.exp: Append to ld_library_path.
>> 	Call set_ld_library_path_env_vars.
>> 	* g++.dg/cilk-plus/cilk-plus.exp: Likewise.
>
> Thanks for catching this! Sorry I didn't catch it sooner. I am just getting
> myself familiar with the DejaGNU framework.

No worries.  DejaGnu is a complex beast and it's hard enough to wrap
your head around it.  Fortunately Mike alreay identified and fixed a
couple of other issues.

	Rainer
Rainer Orth Nov. 28, 2013, 12:37 p.m. UTC | #4
Hi Jeff,

>> 2013-11-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
>>
>> 	* gcc.dg/cilk-plus/cilk-plus.exp: Append to ld_library_path.
>> 	Call set_ld_library_path_env_vars.
>> 	* g++.dg/cilk-plus/cilk-plus.exp: Likewise.
> Thanks for taking care of this.  You're probably getting more cilk+ fallout
> than most because you do a lot of Solaris work.   Sorry about that.

no need to be sorry: that's what you get for working on a niche platform ;-)

	Rainer
diff mbox

Patch

# HG changeset patch
# Parent 293e24349ca8c7aa87bc32718eede5e185bca8c9
Properly set ld_library_path in cilk-plus tests

diff --git a/gcc/testsuite/g++.dg/cilk-plus/cilk-plus.exp b/gcc/testsuite/g++.dg/cilk-plus/cilk-plus.exp
--- a/gcc/testsuite/g++.dg/cilk-plus/cilk-plus.exp
+++ b/gcc/testsuite/g++.dg/cilk-plus/cilk-plus.exp
@@ -31,7 +31,8 @@  dg-finish
 
 set library_var [get_multilibs]
 # Pointing the ld_library_path to the Cilk Runtime library binaries. 
-set ld_library_path "${library_var}/libcilkrts/.libs"
+append ld_library_path ":${library_var}/libcilkrts/.libs"
+set_ld_library_path_env_vars
 
 global TEST_EXTRA_LIBS
 set TEST_EXTRA_LIBS "-L${library_var}/libcilkrts/.libs"
diff --git a/gcc/testsuite/gcc.dg/cilk-plus/cilk-plus.exp b/gcc/testsuite/gcc.dg/cilk-plus/cilk-plus.exp
--- a/gcc/testsuite/gcc.dg/cilk-plus/cilk-plus.exp
+++ b/gcc/testsuite/gcc.dg/cilk-plus/cilk-plus.exp
@@ -26,7 +26,8 @@  if { ![check_effective_target_cilkplus] 
 
 set library_var [get_multilibs]
 # Pointing the ld_library_path to the Cilk Runtime library binaries. 
-set ld_library_path "${library_var}/libcilkrts/.libs"
+append ld_library_path ":${library_var}/libcilkrts/.libs"
+set_ld_library_path_env_vars
 
 global TEST_EXTRA_LIBS
 set TEST_EXTRA_LIBS "-L${library_var}/libcilkrts/.libs"