From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-1.mimecast.com (us-smtp-2.mimecast.com [205.139.110.61]) by sourceware.org (Postfix) with ESMTP id 8CAA0385E444 for ; Sun, 5 Jul 2020 22:59:28 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 8CAA0385E444 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-268-ScGRe9lTN0Kdx-6aRA74iQ-1; Sun, 05 Jul 2020 18:59:26 -0400 X-MC-Unique: ScGRe9lTN0Kdx-6aRA74iQ-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id B0FFCBFC0 for ; Sun, 5 Jul 2020 22:59:25 +0000 (UTC) Received: from f32-1.lan (ovpn-112-21.phx2.redhat.com [10.3.112.21]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8171D60BEC; Sun, 5 Jul 2020 22:59:25 +0000 (UTC) From: Kevin Buettner To: gdb-patches@sourceware.org Subject: [PATCH v4 11/14] xfail gdb.base/coredump-filter.exp test which now works without a binary Date: Sun, 5 Jul 2020 15:58:04 -0700 Message-Id: <20200705225807.2264705-12-kevinb@redhat.com> In-Reply-To: <20200705225807.2264705-1-kevinb@redhat.com> References: <20200705225807.2264705-1-kevinb@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-13.4 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Jul 2020 22:59:29 -0000 See comment in patch for a description of what this is about. In a nutshell, a certain memory access was expected to not work in order to PASS, but due to recent changes, the memory access now works causing the test to FAIL. gdb/testsuite/ChangeLog: * gdb.base/coredump-filter.exp (test_disasm): Call setup_xfail for test "disassemble function with corefile and without a binary". --- gdb/testsuite/gdb.base/coredump-filter.exp | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/gdb/testsuite/gdb.base/coredump-filter.exp b/gdb/testsuite/gdb.base/coredump-filter.exp index ff398f2b85..fd4e0352d8 100644 --- a/gdb/testsuite/gdb.base/coredump-filter.exp +++ b/gdb/testsuite/gdb.base/coredump-filter.exp @@ -96,6 +96,27 @@ proc test_disasm { core address should_fail } { } if { $should_fail == 1 } { + # As originally conceived, an attempt here to disassemble + # addresses in main() with the core file loaded, but with + # the executable not loaded shouldn't work . This was a + # good idea because it demonstrates that executable-backed + # memory was not dumped to the core file. However, this + # test now fails (i.e. now successfully disassembles + # addresses in main()) due to the fact that GDB loads the + # file-based mappings in Linux's NT_FILE note. So, even + # though the executable wasn't explicitly loaded, GDB will + # still be able to find the file-backed memory via the + # note (referencing the file) within the core file. The + # data in question is not actually stored in the core + # file, but is instead found in one of the files mentioned + # in the core file note. + # + # It's tempting to simply remove this test because it's + # apparently no longer useful. However, the idea behind + # the test is useful, so it's marked as xfail, along with + # this comment, as a reminder for someone to come up with + # a new approach. + setup_xfail "*-*-*" gdb_test "x/i \$pc" "=> $hex:\tCannot access memory at address $hex" \ "disassemble function with corefile and without a binary" } else { -- 2.26.2