[1/1] testsuite, threads: fix LD_LIBRARY_PATH in 'tls-sepdebug.exp'
Checks
Context |
Check |
Description |
linaro-tcwg-bot/tcwg_gdb_build--master-aarch64 |
success
|
Build passed
|
linaro-tcwg-bot/tcwg_gdb_build--master-arm |
success
|
Build passed
|
linaro-tcwg-bot/tcwg_gdb_check--master-aarch64 |
success
|
Test passed
|
linaro-tcwg-bot/tcwg_gdb_check--master-arm |
fail
|
Test failed
|
Commit Message
From: "Rohr, Stephan" <stephan.rohr@intel.com>
Some compilers (e.g. the Intel compiler) may dynamically link against
dependencies. The test uses the 'set env' command to set the
LD_LIBRARY_PATH to a test specific value. Update the 'set env' command
to also provide the users LD_LIBARY_PATH to gdb.
---
gdb/testsuite/gdb.threads/tls-sepdebug.exp | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
Comments
>>>>> "Stephan" == Stephan Rohr <stephan.rohr@intel.com> writes:
Stephan> +set ld_library_path $::env(LD_LIBRARY_PATH)
I think this will error if LD_LIBRARY_PATH isn't already in the
environment:
murgatroyd. tclsh
% global env
% set env(NOSUCHVAR)
can't read "env(NOSUCHVAR)": no such variable
Tom
@@ -65,16 +65,17 @@ if { [gdb_compile_pthreads \
}
set absdir [file dirname [standard_output_file ${binsharedbase}]]
+set ld_library_path $::env(LD_LIBRARY_PATH)
-foreach ld_library_path [list $absdir [relative_filename [pwd] $absdir]] \
+foreach library_path [list $absdir [relative_filename [pwd] $absdir]] \
name { absolute relative } {
with_test_prefix $name {
# Restart, but defer loading until after setting LD_LIBRARY_PATH.
clean_restart
-
- gdb_test_no_output "set env LD_LIBRARY_PATH=$ld_library_path" \
- "set env LD_LIBRARY_PATH"
+ gdb_test_no_output \
+ "set env LD_LIBRARY_PATH=$ld_library_path:$library_path" \
+ "set env LD_LIBRARY_PATH"
gdb_load ${binmainfile}