[v2,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 |
success
|
Test passed
|
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 | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
Comments
>>>>> "Stephan" == Stephan Rohr <stephan.rohr@intel.com> writes:
Stephan> From: "Rohr, Stephan" <stephan.rohr@intel.com>
Stephan> Some compilers (e.g. the Intel compiler) may dynamically link against
Stephan> dependencies. The test uses the 'set env' command to set the
Stephan> LD_LIBRARY_PATH to a test specific value. Update the 'set env' command
Stephan> to also provide the users LD_LIBARY_PATH to gdb.
Ok. Thank you.
Approved-By: Tom Tromey <tom@tromey.com>
Tom
@@ -65,16 +65,21 @@ if { [gdb_compile_pthreads \
}
set absdir [file dirname [standard_output_file ${binsharedbase}]]
+if { [info exists ::env(LD_LIBRARY_PATH)] } {
+ set ld_library_path $::env(LD_LIBRARY_PATH)
+} else {
+ set 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}