public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] [gdb/testsuite] Fix regexp in gdb.arch/ftrace-insn-reloc.exp
@ 2023-03-17 18:25 Tom de Vries
  0 siblings, 0 replies; only message in thread
From: Tom de Vries @ 2023-03-17 18:25 UTC (permalink / raw)
  To: gdb-cvs

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=1b046c8eb920bd264d57d472e31a01a32bb5ae89

commit 1b046c8eb920bd264d57d472e31a01a32bb5ae89
Author: Tom de Vries <tdevries@suse.de>
Date:   Fri Mar 17 19:25:18 2023 +0100

    [gdb/testsuite] Fix regexp in gdb.arch/ftrace-insn-reloc.exp
    
    With test-case gdb.arch/ftrace-insn-reloc.exp and host board
    local-remote-host-notty and target board native-gdbserver I run into:
    ...
    (gdb) info sharedlibrary^M
    From To    Syms Read   Shared Object Library^M
    $hex $hex  Yes         /lib64/ld-linux-x86-64.so.2^M
    $hex $hex  Yes         /home/remote-host/libinproctrace.so^M
    $hex $hex  Yes         /lib64/libm.so.6^M
    $hex $hex  Yes         /lib64/libc.so.6^M
    $hex $hex  Yes         /lib64/libdl.so.2^M
    $hex $hex  Yes (*)     /usr/lib64/libstdc++.so.6^M
    $hex $hex  Yes (*)     /lib64/libgcc_s.so.1^M
    $hex $hex  Yes         /lib64/libpthread.so.0^M
    (*): Shared library is missing debugging information.^M
    (gdb) FAIL: gdb.arch/ftrace-insn-reloc.exp: IPA loaded
    ...
    due to trying to match libinproctrace.so using the target path, while the
    command lists it using the host path.
    
    Fix this by making the regexp less strict.
    
    Tested on x86_64-linux.

Diff:
---
 gdb/testsuite/gdb.arch/ftrace-insn-reloc.exp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gdb/testsuite/gdb.arch/ftrace-insn-reloc.exp b/gdb/testsuite/gdb.arch/ftrace-insn-reloc.exp
index b13438fda0e..7bc892263c7 100644
--- a/gdb/testsuite/gdb.arch/ftrace-insn-reloc.exp
+++ b/gdb/testsuite/gdb.arch/ftrace-insn-reloc.exp
@@ -53,7 +53,7 @@ if ![runto_main] {
 
 gdb_reinitialize_dir $srcdir/$subdir
 
-if { [gdb_test "info sharedlibrary" ".*${remote_libipa}.*" "IPA loaded"] != 0 } {
+if { [gdb_test "info sharedlibrary" ".*[file tail $libipa].*" "IPA loaded"] != 0 } {
     untested "could not find IPA lib loaded"
     return 1
 }

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-03-17 18:25 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-17 18:25 [binutils-gdb] [gdb/testsuite] Fix regexp in gdb.arch/ftrace-insn-reloc.exp Tom de Vries

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).