public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "marcel at codesourcery dot com" <sourceware-bugzilla@sourceware.org>
To: gdb-prs@sourceware.org
Subject: [Bug testsuite/30637] New: compare-sections.exp fails due to unfulfilled sections mismatch
Date: Fri, 14 Jul 2023 16:20:19 +0000	[thread overview]
Message-ID: <bug-30637-4717@http.sourceware.org/bugzilla/> (raw)

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.

             reply	other threads:[~2023-07-14 16:20 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-14 16:20 marcel at codesourcery dot com [this message]
2023-07-18  8:47 ` [Bug testsuite/30637] " marcel at codesourcery dot com

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-30637-4717@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=gdb-prs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).