ade71b1
commit 03e6e02e6a216cfb913f49b3be80d5088603864f
ade71b1
Author: H.J. Lu <hjl.tools@gmail.com>
ade71b1
Date:   Sun Jan 9 09:06:15 2022 -0800
ade71b1
ade71b1
    Disable debuginfod in printer tests [BZ #28757]
ade71b1
    
ade71b1
    With gdb-11.1-6.fc35.x86_64, I got
ade71b1
    
ade71b1
    FAIL: nptl/test-cond-printers
ade71b1
    FAIL: nptl/test-condattr-printers
ade71b1
    FAIL: nptl/test-mutex-printers
ade71b1
    FAIL: nptl/test-mutexattr-printers
ade71b1
    FAIL: nptl/test-rwlock-printers
ade71b1
    FAIL: nptl/test-rwlockattr-printers
ade71b1
    
ade71b1
    $ cat nptl/test-condattr-printers.out
ade71b1
    Error: Response does not match the expected pattern.
ade71b1
    Command: start
ade71b1
    Expected pattern: main
ade71b1
    Response:  Temporary breakpoint 1 at 0x11d5: file test-condattr-printers.c, line 43.
ade71b1
    Starting program: /export/build/gnu/tools-build/glibc-cet-gitlab/build-x86_64-linux/nptl/test-condattr-printers
ade71b1
    
ade71b1
    This GDB supports auto-downloading debuginfo from the following URLs:
ade71b1
    https://debuginfod.fedoraproject.org/
ade71b1
    Enable debuginfod for this session? (y or [n])
ade71b1
    
ade71b1
    Disable debuginfod to avoid GDB messages.  This fixes BZ #28757.
ade71b1
    
ade71b1
    Reviewed-by: Florian Weimer <fweimer@redhat.com>
ade71b1
    (cherry picked from commit 7de501f9418bf099e7104b63b0e4423257981b14)
ade71b1
ade71b1
diff --git a/scripts/test_printers_common.py b/scripts/test_printers_common.py
ade71b1
index 34a3df6e6bd8b363..53b6d30d40ce2622 100644
ade71b1
--- a/scripts/test_printers_common.py
ade71b1
+++ b/scripts/test_printers_common.py
ade71b1
@@ -161,6 +161,17 @@ def init_test(test_bin, printer_files, printer_names):
ade71b1
             printer files.
ade71b1
     """
ade71b1
 
ade71b1
+    # Disable debuginfod to avoid GDB messages like:
ade71b1
+    #
ade71b1
+    # This GDB supports auto-downloading debuginfo from the following URLs:
ade71b1
+    # https://debuginfod.fedoraproject.org/
ade71b1
+    # Enable debuginfod for this session? (y or [n])
ade71b1
+    #
ade71b1
+    try:
ade71b1
+        test('set debuginfod enabled off')
ade71b1
+    except Exception:
ade71b1
+        pass
ade71b1
+
ade71b1
     # Load all the pretty printer files.  We're assuming these are safe.
ade71b1
     for printer_file in printer_files:
ade71b1
         test('source {0}'.format(printer_file))