public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] Disable debuginfod in printer tests [BZ #28757]
@ 2022-01-09 18:42 H.J. Lu
  2022-01-14  9:14 ` Florian Weimer
  0 siblings, 1 reply; 2+ messages in thread
From: H.J. Lu @ 2022-01-09 18:42 UTC (permalink / raw)
  To: libc-alpha

With gdb-11.1-6.fc35.x86_64, I got

FAIL: nptl/test-cond-printers
FAIL: nptl/test-condattr-printers
FAIL: nptl/test-mutex-printers
FAIL: nptl/test-mutexattr-printers
FAIL: nptl/test-rwlock-printers
FAIL: nptl/test-rwlockattr-printers

$ cat nptl/test-condattr-printers.out
Error: Response does not match the expected pattern.
Command: start
Expected pattern: main
Response:  Temporary breakpoint 1 at 0x11d5: file test-condattr-printers.c, line 43.
Starting program: /export/build/gnu/tools-build/glibc-cet-gitlab/build-x86_64-linux/nptl/test-condattr-printers

This GDB supports auto-downloading debuginfo from the following URLs:
https://debuginfod.fedoraproject.org/
Enable debuginfod for this session? (y or [n])

Disable debuginfod to avoid GDB messages.  This fixes BZ #28757.
---
 scripts/test_printers_common.py | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/scripts/test_printers_common.py b/scripts/test_printers_common.py
index 6406e3bac7..38121697bc 100644
--- a/scripts/test_printers_common.py
+++ b/scripts/test_printers_common.py
@@ -161,6 +161,17 @@ def init_test(test_bin, printer_files, printer_names):
             printer files.
     """
 
+    # Disable debuginfod to avoid GDB messages like:
+    #
+    # This GDB supports auto-downloading debuginfo from the following URLs:
+    # https://debuginfod.fedoraproject.org/
+    # Enable debuginfod for this session? (y or [n])
+    #
+    try:
+        test('set debuginfod enabled off')
+    except Exception:
+        pass
+
     # Load all the pretty printer files.  We're assuming these are safe.
     for printer_file in printer_files:
         test('source {0}'.format(printer_file))
-- 
2.34.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] Disable debuginfod in printer tests [BZ #28757]
  2022-01-09 18:42 [PATCH] Disable debuginfod in printer tests [BZ #28757] H.J. Lu
@ 2022-01-14  9:14 ` Florian Weimer
  0 siblings, 0 replies; 2+ messages in thread
From: Florian Weimer @ 2022-01-14  9:14 UTC (permalink / raw)
  To: H.J. Lu via Libc-alpha

* H. J. Lu via Libc-alpha:

> diff --git a/scripts/test_printers_common.py b/scripts/test_printers_common.py
> index 6406e3bac7..38121697bc 100644
> --- a/scripts/test_printers_common.py
> +++ b/scripts/test_printers_common.py
> @@ -161,6 +161,17 @@ def init_test(test_bin, printer_files, printer_names):
>              printer files.
>      """
>  
> +    # Disable debuginfod to avoid GDB messages like:
> +    #
> +    # This GDB supports auto-downloading debuginfo from the following URLs:
> +    # https://debuginfod.fedoraproject.org/
> +    # Enable debuginfod for this session? (y or [n])
> +    #
> +    try:
> +        test('set debuginfod enabled off')
> +    except Exception:
> +        pass

This looks okay, based on the discussion in
<https://bugzilla.redhat.com/show_bug.cgi?id=2026402>.  The ignored
exception should make this work on older GDB, too.

Reviewed-by: Florian Weimer <fweimer@redhat.com>

Thanks,
Florian


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-01-14  9:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-09 18:42 [PATCH] Disable debuginfod in printer tests [BZ #28757] H.J. Lu
2022-01-14  9:14 ` Florian Weimer

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