aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRohr, Stephan <stephan.rohr@intel.com>2024-01-29 07:05:40 -0800
committerStephan Rohr <stephan.rohr@intel.com>2024-09-23 23:59:48 -0700
commit7d5702b8fdee17a5b4597b2b03c93e97d5b4c136 (patch)
tree47eab0c6912f6e8c05b8f3129c79853d6a2a27d9
parent909fcd9bc8f7ddff92b284c58c50391ae7ea1fc2 (diff)
downloadgdb-7d5702b8fdee17a5b4597b2b03c93e97d5b4c136.zip
gdb-7d5702b8fdee17a5b4597b2b03c93e97d5b4c136.tar.gz
gdb-7d5702b8fdee17a5b4597b2b03c93e97d5b4c136.tar.bz2
testsuite, threads: fix LD_LIBRARY_PATH in 'tls-sepdebug.exp'
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. Approved-By: Tom Tromey <tom@tromey.com>
-rw-r--r--gdb/testsuite/gdb.threads/tls-sepdebug.exp13
1 files changed, 9 insertions, 4 deletions
diff --git a/gdb/testsuite/gdb.threads/tls-sepdebug.exp b/gdb/testsuite/gdb.threads/tls-sepdebug.exp
index 14a0c45..4a322e0 100644
--- a/gdb/testsuite/gdb.threads/tls-sepdebug.exp
+++ b/gdb/testsuite/gdb.threads/tls-sepdebug.exp
@@ -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}