From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 4C2B03858CDB; Fri, 14 Jul 2023 16:20:20 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4C2B03858CDB DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1689351620; bh=Bjg1P6M88nYOZMaI2ZN2tPj6J/80/+ZJFuNf+/wmctc=; h=From:To:Subject:Date:From; b=qJmKDA04vpQCx94N7Ml41TDNFH6JmOfFztrNLakgbhUOeB1+n5TmieQT7wN50zBpZ Ac7l0qT3rr0LM5V2LengPDMTTREmc0XE7q8+nuOANUZFPfmfN6Lf5OkEpHuqf0lirC pKu0DGNHxO2P7xdJ5lis22uyqvqRYt/DDXjx+v3k= From: "marcel at codesourcery dot com" 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 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: testsuite X-Bugzilla-Version: 12.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: minor X-Bugzilla-Who: marcel at codesourcery dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://sourceware.org/bugzilla/show_bug.cgi?id=3D30637 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 fai= l: FAIL: gdb.base/compare-sections.exp: after run to main: compare-sections ... which results from the test case=20 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 secti= on of the image on the target differs from the corresponding section on the ho= st 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 inde= ed 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 --=20 You are receiving this mail because: You are on the CC list for the bug.=