]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
testsuite, trace: add guards if In-Process Agent library is not found
authorStephan Rohr <stephan.rohr@intel.com>
Wed, 21 Feb 2024 09:55:37 +0000 (01:55 -0800)
committerStephan Rohr <stephan.rohr@intel.com>
Fri, 13 Sep 2024 11:05:13 +0000 (04:05 -0700)
commita1371f3288f2d84cea90a9157ed9a359226969e2
treedc188ba0a8708a7e238153b13ffac6c4d912501a
parent40422bbae1df369f4d013271bc7edeb6b30a3c44
testsuite, trace: add guards if In-Process Agent library is not found

Several tests in gdb.trace trigger TCL errors if the In-Process Agent
library is not found, e.g.:

  Running gdb/testsuite/gdb.trace/change-loc.exp ...
  ERROR: tcl error sourcing gdb/testsuite/gdb.trace/change-loc.exp.
  ERROR: error copying "gdb/gdb/testsuite/../../gdbserver/libinproctrace.so":
 no such file or directory
      while executing
  "file copy -force $fromfile $tofile"
      (procedure "gdb_remote_download" line 29)
      invoked from within
  "gdb_remote_download target $target_file"
      (procedure "gdb_download_shlib" line 6)
      invoked from within
  "gdb_download_shlib $file"
      (procedure "gdb_load_shlib" line 2)
      invoked from within
  "gdb_load_shlib $libipa"
      (file "gdb/testsuite/gdb.trace/change-loc.exp" line 354)
      invoked from within
  "source gdb/testsuite/gdb.trace/change-loc.exp"
      ("uplevel" body line 1)
      invoked from within
  "uplevel #0 source gdb/testsuite/gdb.trace/change-loc.exp"
      invoked from within
  "catch "uplevel #0 source $test_file_name""

Protect against this error by checking if the library is available.
14 files changed:
gdb/testsuite/gdb.arch/ftrace-insn-reloc.exp
gdb/testsuite/gdb.trace/basic-libipa.exp
gdb/testsuite/gdb.trace/change-loc.exp
gdb/testsuite/gdb.trace/ftrace-lock.exp
gdb/testsuite/gdb.trace/ftrace.exp
gdb/testsuite/gdb.trace/pending.exp
gdb/testsuite/gdb.trace/range-stepping.exp
gdb/testsuite/gdb.trace/strace.exp
gdb/testsuite/gdb.trace/trace-break.exp
gdb/testsuite/gdb.trace/trace-condition.exp
gdb/testsuite/gdb.trace/trace-enable-disable.exp
gdb/testsuite/gdb.trace/trace-mt.exp
gdb/testsuite/gdb.trace/tspeed.exp
gdb/testsuite/lib/trace-support.exp