Bug 28029 - debuginfod 2 tests UNTESTED
Summary: debuginfod 2 tests UNTESTED
Status: RESOLVED FIXED
Alias: None
Product: binutils
Classification: Unclassified
Component: binutils (show other bugs)
Version: 2.37
: P2 normal
Target Milestone: 2.38
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-06-30 08:03 UTC by Toolybird
Modified: 2022-01-19 05:48 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Last reconfirmed: 2021-07-01 00:00:00


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Toolybird 2021-06-30 08:03:04 UTC
I noticed this while test building latest git. Probably nothing to worry about but I'll mention it anyway.

2 tests in debuginfod.exp are showing as UNTESTED. These worked fine in 2.36.1:

UNTESTED: debuginfod (objdump not configured with debuginfod)
UNTESTED: debuginfod (readelf not configured with debuginfod)

Bisected to:

ecd65684f542be614adc56321c118d8985d35409 is the first bad commit
commit ecd65684f542be614adc56321c118d8985d35409
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Mon Mar 1 05:34:34 2021 -0800

    Warn for missing separate debug files only if needed
    
    We shouldn't warn missing separate debug files when debug info isn't
    needed.
    
            PR binutils/27486
            * dwarf.c (load_separate_debug_info): Issue warning only if
            do_debug_links is set.
            * testsuite/binutils-all/compress.exp: Run objdump and readelf
            with missing debug file.


Maybe the testsuite needs tweaking? Thanks.
Comment 1 Sourceware Commits 2021-07-01 13:11:07 UTC
The master branch has been updated by Nick Clifton <nickc@sourceware.org>:

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

commit 1b8d1f5f3861c04070bd5d249855b575e431f56b
Author: Nick Clifton <nickc@redhat.com>
Date:   Thu Jul 1 14:10:38 2021 +0100

    Partially fix debuginfod tests in binutils testsuite.
    
            PR 28029
            * testsuite/binutils-all/debuginfod.exp: Replace -wK with -wk.
Comment 2 Nick Clifton 2021-07-01 13:14:30 UTC
Hi Toolybird,

  I have checked in a partial fix for this problem.  But now one of the objdump tests is failing and I am not sure why...

Cheers
  Nick
Comment 3 Toolybird 2021-07-03 06:23:10 UTC
Thanks Nick.

I ran another bisection (taking your latest fix into account) which arrived at this:

ca0e11aa4ba877e180f7d40dcc5a89540740c501 is the first bad commit
commit ca0e11aa4ba877e180f7d40dcc5a89540740c501
Author: Nick Clifton <nickc@redhat.com>
Date:   Thu Mar 4 10:41:22 2021 +0000

    Gate the displaying of non-debug sections in separate debuginfo files.
    
            PR 27478

I think  I got the bisection right, but it was a little tricky due to having to cherry-pick the latest fix. Thanks.
Comment 4 Sourceware Commits 2022-01-18 00:57:14 UTC
The master branch has been updated by Alan Modra <amodra@sourceware.org>:

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

commit e2c0149e8b0ce12accb8f4b02cbbeff3e91e4737
Author: Alan Modra <amodra@gmail.com>
Date:   Mon Nov 22 10:16:01 2021 +1030

    PR28029, debuginfod tests
    
    binutils/NEWS says of the change in --process-links semantics:
      If other debug section display options are also enabled (eg
      --debug-dump=info) then the contents of matching sections in both the main
      file and the separate debuginfo file *will* be displayed.  This is because in
      most cases the debug section will only be present in one of the files.
    
    Implying that debug info is dumped without --process-links.  Indeed
    that appears to be the case for readelf.  This does the same for
    objdump.
    
            PR 28029
            * objdump.c (dump_bfd): Do not exit early when !is_mainfile
            && !processlinks, instead just exclude non-debug output.
            (dump_dwarf): Add is_mainfile parameter and pass to
            dump_dwarf_section.
            (dump_dwarf_section): Only display debug sections when
            !is_mainfile and !process_links.
Comment 5 Alan Modra 2022-01-19 05:48:44 UTC
Fixed