public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] gdb.debuginfod/fetch_src_and_symbols.exp: Fix "notice empty URL" test
@ 2022-04-21 12:48 Pedro Alves
  0 siblings, 0 replies; only message in thread
From: Pedro Alves @ 2022-04-21 12:48 UTC (permalink / raw)
  To: gdb-cvs

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

commit 9cf71b1354f6829a999b39a675a18c5a85f19e17
Author: Pedro Alves <pedro@palves.net>
Date:   Thu Apr 21 13:35:09 2022 +0100

    gdb.debuginfod/fetch_src_and_symbols.exp: Fix "notice empty URL" test
    
    The gdb_test_multiple pattern for the "notice empty URL" test in
    gdb.debuginfod/fetch_src_and_symbols.exp misses expecting the prompt.
    Fix it by using -re -wrap.
    
    Also, by using "confirm off", the message GDB prints if Debuginfod
    downloading is available doesn't contain "Enable debuginfod" any
    longer.  E.g.:
    
    ~~~
      (gdb) file testsuite/outputs/gdb.debuginfod/fetch_src_and_symbols/fetch_src_and_symbols
      Reading symbols from testsuite/outputs/gdb.debuginfod/fetch_src_and_symbols/fetch_src_and_symbols...
    
      This GDB supports auto-downloading debuginfo from the following URLs:
        <http://localhost:123>
      Enable debuginfod for this session? (y or [n])
    ~~~
    
    ~~~
      (gdb) with confirm off -- file testsuite/outputs/gdb.debuginfod/fetch_src_and_symbols/fetch_src_and_symbols
      Reading symbols from testsuite/outputs/gdb.debuginfod/fetch_src_and_symbols/fetch_src_and_symbols...
    
      This GDB supports auto-downloading debuginfo from the following URLs:
        <http://127.0.0.1:8000>
        <127.0.0.1:8000>
      Debuginfod has been disabled.
      To make this setting permanent, add 'set debuginfod enabled off' to .gdbinit.
      (No debugging symbols found in testsuite/outputs/gdb.debuginfod/fetch_src_and_symbols/fetch_src_and_symbols)
      (gdb)
    ~~~
    
    I handled that correctly in the other tests that use test_urls, but
    had forgotten to update the "notice empty URL" one.
    
    Change-Id: I00040c83466e1494b3875574eb009c571a1504bf

Diff:
---
 gdb/testsuite/gdb.debuginfod/fetch_src_and_symbols.exp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gdb/testsuite/gdb.debuginfod/fetch_src_and_symbols.exp b/gdb/testsuite/gdb.debuginfod/fetch_src_and_symbols.exp
index 6da9a86faa8..bd90bcd0cfe 100644
--- a/gdb/testsuite/gdb.debuginfod/fetch_src_and_symbols.exp
+++ b/gdb/testsuite/gdb.debuginfod/fetch_src_and_symbols.exp
@@ -310,7 +310,7 @@ proc local_url { } {
     # Disable confirmation to avoid having to deal with a query.  See
     # test_urls.
     gdb_test_multiple "with confirm off -- file $binfile" "notice empty URL" {
-	-re ".*Enable debuginfod.*" {
+	-re -wrap "This GDB supports auto-downloading.*" {
 	    fail $gdb_test_name
 	}
 	-re -wrap "" {


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

only message in thread, other threads:[~2022-04-21 12:48 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-21 12:48 [binutils-gdb] gdb.debuginfod/fetch_src_and_symbols.exp: Fix "notice empty URL" test Pedro Alves

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).