From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id 2IdQIm1TJ2IGNQAAWB0awg (envelope-from ) for ; Tue, 08 Mar 2022 08:00:29 -0500 Received: by simark.ca (Postfix, from userid 112) id 8A27D1F3CA; Tue, 8 Mar 2022 08:00:29 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,NICE_REPLY_A,RDNS_DYNAMIC, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (ip-8-43-85-97.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 0C3F01EE1F for ; Tue, 8 Mar 2022 08:00:29 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 9BE2A385AC34 for ; Tue, 8 Mar 2022 13:00:28 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9BE2A385AC34 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1646744428; bh=2sT9JEsbdZDgMJTp/yAI2RXf0wUU3GCIPAwGlYKkzM4=; h=Date:Subject:To:References:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=VwCbu+nVc9FyRuwn3FP5a/BJ+rAYL4gvfrcmRMY3OAgds7i4tNaTlGJPNZFNiWMo1 AjnqgNyzrvBHzwKgk7cmxAkFrub8j4UIxAmSqarGNtkkG5LShJm+py1VMPikkjHdZp cLyWW5zhq03nxXSEvnQzgwNq59xGmctK+Ofqqfxo= Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id 77EC13857417 for ; Tue, 8 Mar 2022 12:58:51 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 77EC13857417 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-636-2LSeDZbFN8-A9MCz8gJ6vg-1; Tue, 08 Mar 2022 07:58:47 -0500 X-MC-Unique: 2LSeDZbFN8-A9MCz8gJ6vg-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id ECDD61091DA1; Tue, 8 Mar 2022 12:58:46 +0000 (UTC) Received: from [10.97.116.42] (ovpn-116-42.gru2.redhat.com [10.97.116.42]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A022D76C26; Tue, 8 Mar 2022 12:58:44 +0000 (UTC) Message-ID: Date: Tue, 8 Mar 2022 09:58:41 -0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.6.0 Subject: Re: [PATCH 09/11] gdb/testsuite: don't test gdb.base/msym-bp-shl with clang To: Pedro Alves , gdb-patches@sourceware.org References: <20220126195053.69559-1-blarsen@redhat.com> <20220126195053.69559-10-blarsen@redhat.com> In-Reply-To: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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: , From: Bruno Larsen via Gdb-patches Reply-To: Bruno Larsen Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" On 3/2/22 16:33, Pedro Alves wrote: > On 2022-01-26 19:50, Bruno Larsen via Gdb-patches wrote: >> Clang will optimize away the static function in one of the files, and >> the test is here to specifically test GDB's behavior when that function >> is present, so it makes no sense to have this test run with that >> compiler. > > Please expand this info to include a snippet of the failing test. > Also, it's best if the the body of the commit log, doesn't assume the subject is read > as part of it. You will notice that if you read the body in isolation, without the > subject line, and also without the diff context, the commit log is vague as is. Oh, ok. Will do! > >> --- >> gdb/testsuite/gdb.base/msym-bp-shl.exp | 7 +++++++ >> 1 file changed, 7 insertions(+) >> >> diff --git a/gdb/testsuite/gdb.base/msym-bp-shl.exp b/gdb/testsuite/gdb.base/msym-bp-shl.exp >> index 42adcb191dd..95d5c393505 100644 >> --- a/gdb/testsuite/gdb.base/msym-bp-shl.exp >> +++ b/gdb/testsuite/gdb.base/msym-bp-shl.exp >> @@ -22,6 +22,13 @@ if {[skip_shlib_tests]} { >> return 0 >> } >> >> +# clang will optimize away the static foo, making a single breakpoint >> +# so there is no point testing it here. > > Uppercase Clang. > > The patch doesn't give enough info to understand why this is the best approach. > I could imagine using atttribute used to make sure the function isn't optimized > away, as alternative approach, for example. Please make the case for the approach > taken. Doh! I forgot that attribute((used)) worked for functions as well, I'll do that instead, since it also works. > >> +if {[test_compiler_info {clang-*-*}]} { >> + untested "clang only compiles one foo" >> + return >> +} >> + >> standard_testfile msym-bp-shl-main.c msym-bp-shl-main-2.c msym-bp-shl-lib.c >> set srcfile ${srcdir}/${subdir}/${srcfile} >> set srcfile2 ${srcdir}/${subdir}/${srcfile2} > -- Cheers! Bruno Larsen