From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id 526F43858027 for ; Mon, 7 Nov 2022 13:53:01 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 526F43858027 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1667829180; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Wy6Bs5HXf9zqaudINDG1WXCE+W2bwsCCiUgLfq68WZU=; b=TamAUkoDB94j6FQykwai3n9w4xUrBpW9M3LzBocjqRWe68UTVCvrbG8erFhlYKANAuIuhq pINh6noiRjmlazLc60ki/ERZzPOxUlIo3ioa7IpfZ04duCjgVr6qXccs0PpNhQoWGZURAO hL9zFvCkK7h7V/8ZBEx/soxB4etqikk= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-671-6_XKf3-yPau2gZR9x0FuXg-1; Mon, 07 Nov 2022 08:52:59 -0500 X-MC-Unique: 6_XKf3-yPau2gZR9x0FuXg-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 87B8D3C10EC7 for ; Mon, 7 Nov 2022 13:52:59 +0000 (UTC) Received: from fedora.redhat.com (ovpn-193-251.brq.redhat.com [10.40.193.251]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 02AD82027063; Mon, 7 Nov 2022 13:52:58 +0000 (UTC) From: Bruno Larsen To: gdb-patches@sourceware.org Cc: Bruno Larsen Subject: [PATCH v2 5/9] gdb/testsuite: allow for Clang style destructors on gdb.cp/m-static.exp Date: Mon, 7 Nov 2022 14:46:01 +0100 Message-Id: <20221107134604.596986-6-blarsen@redhat.com> In-Reply-To: <20221107134604.596986-1-blarsen@redhat.com> References: <20221107134604.596986-1-blarsen@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.4 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true X-Spam-Status: No, score=-12.2 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_H2,SPF_HELO_NONE,SPF_NONE,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: when running gdb.cp/m-static.exp using Clang, we get the following failures: print test1.~gnu_obj_1^M $6 = {void (gnu_obj_1 * const)} 0x555555555470 ^M (gdb) FAIL: gdb.cp/m-static.exp: simple object instance, print destructor ptype test1.~gnu_obj_1^M type = void (gnu_obj_1 * const)^M (gdb) FAIL: gdb.cp/m-static.exp: simple object instance, ptype destructor print test1.'~gnu_obj_1'^M $7 = {void (gnu_obj_1 * const)} 0x555555555470 ^M (gdb) FAIL: gdb.cp/m-static.exp: simple object instance, print quoted destructor This is because the test is expecting an extra integer parameter on the destructor. Looking at the debuginfo, it seems that there is nothing actually wrong with this output, so these tests were changed to test multiple possible regexps. --- gdb/testsuite/gdb.cp/m-static.exp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/gdb/testsuite/gdb.cp/m-static.exp b/gdb/testsuite/gdb.cp/m-static.exp index 979de23a44f..1239dbc0f1d 100644 --- a/gdb/testsuite/gdb.cp/m-static.exp +++ b/gdb/testsuite/gdb.cp/m-static.exp @@ -102,15 +102,16 @@ if { [is_aarch32_target] } { {type = void \(single_constructor \* const\)} \ "simple object class, ptype constructor" - gdb_test "print test1.~gnu_obj_1" \ - { = {void \(gnu_obj_1 \* const, int\)} 0x[0-9a-f]+ } \ + gdb_test "print test1.~gnu_obj_1"\ + { = {void \(gnu_obj_1 \* const(?:, int)?\)} 0x[0-9a-f]+ }\ "simple object instance, print destructor" - gdb_test "ptype test1.~gnu_obj_1" \ - {type = void \(gnu_obj_1 \* const, int\)} \ + + gdb_test "ptype test1.~gnu_obj_1"\ + {type = void \(gnu_obj_1 \* const(?:, int)?\)}\ "simple object instance, ptype destructor" gdb_test "print test1.'~gnu_obj_1'" \ - { = {void \(gnu_obj_1 \*( const)?, int\)} 0x[0-9a-f]+ } \ + { = {void \(gnu_obj_1 \*( const)?(?:, int)?\)} 0x[0-9a-f]+ } \ "simple object instance, print quoted destructor" gdb_test "ptype gnu_obj_1::'~gnu_obj_1'" \ -- 2.37.3