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