public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug testsuite/30637] New: compare-sections.exp fails due to unfulfilled sections mismatch
@ 2023-07-14 16:20 marcel at codesourcery dot com
  2023-07-18  8:47 ` [Bug testsuite/30637] " marcel at codesourcery dot com
  0 siblings, 1 reply; 2+ messages in thread
From: marcel at codesourcery dot com @ 2023-07-14 16:20 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=30637

            Bug ID: 30637
           Summary: compare-sections.exp fails due to unfulfilled sections
                    mismatch
           Product: gdb
           Version: 12.1
            Status: UNCONFIRMED
          Severity: minor
          Priority: P2
         Component: testsuite
          Assignee: unassigned at sourceware dot org
          Reporter: marcel at codesourcery dot com
  Target Milestone: ---

Hi,

testing GDB 12 (and 13) on Nios II ELF, I recognized the following test fail:

   FAIL: gdb.base/compare-sections.exp: after run to main: compare-sections

... which results from the test case 

   gdb_test "compare-sections" \
        "MIS-MATCHED.*warning.*One or more sections.*does not match.*loaded
file"

in 'with_test_prefix "after run to main"' in compare-sections.exp.

If my understanding is correct, then it is expected that at least one section
of the image on the target differs from the corresponding section on the host
after running to main. Debugging the test binary manually I found that all
sections match and I wondered if the test assumption (the mismatch) is indeed
valid for non-PIE targets (when "is_pie" is false). Maybe "compare-sections"
should rather be handled like "compare-sections -r" which checks the match vs.
mismatch depending on is_pie (added in commit 34dafe9f39e)?

If my understanding is correct, then the attached patch seems to fix it.

Marcel

-- 
You are receiving this mail because:
You are on the CC list for the bug.

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

* [Bug testsuite/30637] compare-sections.exp fails due to unfulfilled sections mismatch
  2023-07-14 16:20 [Bug testsuite/30637] New: compare-sections.exp fails due to unfulfilled sections mismatch marcel at codesourcery dot com
@ 2023-07-18  8:47 ` marcel at codesourcery dot com
  0 siblings, 0 replies; 2+ messages in thread
From: marcel at codesourcery dot com @ 2023-07-18  8:47 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=30637

--- Comment #1 from Marcel Vollweiler <marcel at codesourcery dot com> ---
Created attachment 14979
  --> https://sourceware.org/bugzilla/attachment.cgi?id=14979&action=edit
Patch for compare-sections.exp

-- 
You are receiving this mail because:
You are on the CC list for the bug.

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

end of thread, other threads:[~2023-07-18  8:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-14 16:20 [Bug testsuite/30637] New: compare-sections.exp fails due to unfulfilled sections mismatch marcel at codesourcery dot com
2023-07-18  8:47 ` [Bug testsuite/30637] " marcel at codesourcery dot com

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