From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id uc79KlO6e2LOpQUAWB0awg (envelope-from ) for ; Wed, 11 May 2022 09:29:55 -0400 Received: by simark.ca (Postfix, from userid 112) id A6D971E220; Wed, 11 May 2022 09:29:55 -0400 (EDT) Authentication-Results: simark.ca; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=XpMQPthQ; dkim-atps=neutral X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RDNS_DYNAMIC,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 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 081291E00D for ; Wed, 11 May 2022 09:29:55 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id ABF3938438DE for ; Wed, 11 May 2022 13:29:54 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org ABF3938438DE DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1652275794; bh=jAVajR70W4qQvgg6Riw8gV5WRGZEXtakcxTajQbLQ3M=; h=To:Subject:In-Reply-To:References:Date:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=XpMQPthQdNgKWFnIkhA1xYsg8tb7xDFQKo6VrqZcq2bfJzKNr1kIA5B/17RYr+cOg 4mg6qOxlG2t0ljJt1JA0ykL5d44kpVAzrE6MIdv1036suzROe1VMp6lJzxcsN38LoU m1/jwU838ryNi8lmtnXwbBzsY/zux3U9c1cUeZwU= 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 99C2C384F025 for ; Wed, 11 May 2022 13:29:35 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 99C2C384F025 Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-331-HU-SJT_IN1OVOdV85l8bAg-1; Wed, 11 May 2022 09:29:32 -0400 X-MC-Unique: HU-SJT_IN1OVOdV85l8bAg-1 Received: by mail-wm1-f69.google.com with SMTP id 205-20020a1c02d6000000b003928cd3853aso2829264wmc.9 for ; Wed, 11 May 2022 06:29:32 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version; bh=jAVajR70W4qQvgg6Riw8gV5WRGZEXtakcxTajQbLQ3M=; b=Nvf5jh4dPrmKnMdXBeQcBBWBtefhFyhvKGjrqdQvWjThtwxCyLMFmxCVWvGHZofWCA kUcLyCvnHLXJMLawmJNCE8c1+qQsOpbGF4qE/um27vJVlygz7/resbvlMEzdSwVRhHBk K25YCrnvsOIkqk85GzNneef92lxFjRIOJTs1jwid2kZrdntMPF6JOkL2NXiR6TBjjU+x HN4KUoLIU5/TFiiNT8M3iErK/kvPu93u1VFMj3Cj0KIb3UFKK294yN+sX1uiRf76STpC VLldYzuw1n/lq91vxUHzG2Brr4p8pA14fZC6FfmjNsq8CAWZc6pGX1RRspH7ovrabS8L GIXA== X-Gm-Message-State: AOAM532fLXqa3/slnWjRrc5eTbVUIgcswrDLw1NEF3rnW7iBvkGSYb+T iPv5laIN1XuxxVZWD5nTRcmpX5ILl/usf8CVTGw5cVKEm8D9BBbo+Pjz8b0Ty1S5XUmExNsaigm HMdQidZ1v+KpFl6g0CLDx+A== X-Received: by 2002:adf:e94d:0:b0:20c:d4d3:c696 with SMTP id m13-20020adfe94d000000b0020cd4d3c696mr8286118wrn.136.1652275771829; Wed, 11 May 2022 06:29:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJycvGDp+RtK/Di5gXJGbIzIqYw8VKt2L7vEarAmQYQm9Gs8EYQ1iB2I5PP3fZRMDC+x/qZtBg== X-Received: by 2002:adf:e94d:0:b0:20c:d4d3:c696 with SMTP id m13-20020adfe94d000000b0020cd4d3c696mr8286104wrn.136.1652275771599; Wed, 11 May 2022 06:29:31 -0700 (PDT) Received: from localhost (host81-136-113-48.range81-136.btcentralplus.com. [81.136.113.48]) by smtp.gmail.com with ESMTPSA id v9-20020adff689000000b0020c5253d902sm1620592wrp.78.2022.05.11.06.29.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 May 2022 06:29:31 -0700 (PDT) To: Nils-Christian Kempke , gdb-patches@sourceware.org Subject: Re: [PATCH 18/18] gdb/testsuite: fixup common-block.exp for intel compilers In-Reply-To: <20220510142437.1397399-19-nils-christian.kempke@intel.com> References: <20220510142437.1397399-1-nils-christian.kempke@intel.com> <20220510142437.1397399-19-nils-christian.kempke@intel.com> Date: Wed, 11 May 2022 14:29:29 +0100 Message-ID: <87wnesjiyu.fsf@redhat.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain 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: Andrew Burgess via Gdb-patches Reply-To: Andrew Burgess Cc: JiniSusan.George@amd.com Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" Nils-Christian Kempke writes: > The order in which the variables in info common and info locals are > displayed is compiler (and dwarf) dependent. While all symbols should > be displayed the order is not fixed. > > I added a gdb_test_multiple that lets ifx and ifort pass in cases where > only the order differs. > --- > gdb/testsuite/gdb.fortran/common-block.exp | 38 ++++++++++++++++++++-- > 1 file changed, 35 insertions(+), 3 deletions(-) > > diff --git a/gdb/testsuite/gdb.fortran/common-block.exp b/gdb/testsuite/gdb.fortran/common-block.exp > index ac39a4a575..fc38b8d772 100644 > --- a/gdb/testsuite/gdb.fortran/common-block.exp > +++ b/gdb/testsuite/gdb.fortran/common-block.exp > @@ -54,8 +54,27 @@ gdb_test "whatis fo_o$suffix" "No symbol \"fo_o$suffix\" in current context." > gdb_test "ptype fo_o$suffix" "No symbol \"fo_o$suffix\" in current context." > gdb_test "p fo_o$suffix" "No symbol \"fo_o$suffix\" in current context." > > -gdb_test "info locals" "ix_x = 11\r\niy_y = 22\r\niz_z = 33\r\nix = 1\r\niy = 2\r\niz = 3" "info locals out" > -gdb_test "info common" "Contents of F77 COMMON block 'fo_o':\r\nix_x = 11\r\niy_y = 22\r\niz_z = 33\r\n\r\nContents of F77 COMMON block 'foo':\r\nix = 1\r\niy = 2\r\niz = 3" "info common out" > +gdb_test_multiple "info locals" "info locals out" { > + # gfortran > + -re "ix_x = 11\r\niy_y = 22\r\niz_z = 33\r\nix = 1\r\niy = 2\r\niz = 3.*$gdb_prompt $" { > + pass $gdb_test_name > + } You can use: -re -wrap "ix_x = 11\r\niy_y = 22\r\niz_z = 33\r\nix = 1\r\niy = 2\r\niz = 3" { ... } to avoid having to add the $gdb_prompt in all of these tests. Thanks, Andrew > + # ifx/ifort > + -re "ix = 1\r\niy = 2\r\niz = 3\r\nix_x = 11\r\niy_y = 22\r\niz_z = 33.*$gdb_prompt $" { > + pass $gdb_test_name > + } > +} > + > +gdb_test_multiple "info common" "info common out" { > + # gfortran > + -re "Contents of F77 COMMON block 'fo_o':\r\nix_x = 11\r\niy_y = 22\r\niz_z = 33\r\n\r\nContents of F77 COMMON block 'foo':\r\nix = 1\r\niy = 2\r\niz = 3.*$gdb_prompt $" { > + pass $gdb_test_name > + } > + # ifx/ifort > + -re "Contents of F77 COMMON block 'foo_?':\r\nix = 1\r\niy = 2\r\niz = 3\r\n\r\nContents of F77 COMMON block 'fo_o_?':\r\nix_x = 11\r\niy_y = 22\r\niz_z = 33.*$gdb_prompt $" { > + pass $gdb_test_name > + } > +} > > gdb_test "ptype ix" "type = $int4" "ptype ix out" > gdb_test "ptype iy" "type = $real4" "ptype iy out" > @@ -81,7 +100,20 @@ gdb_test "whatis fo_o$suffix" "No symbol \"fo_o$suffix\" in current context." "w > gdb_test "ptype fo_o$suffix" "No symbol \"fo_o$suffix\" in current context." "ptype fo_o$suffix in" > gdb_test "p fo_o$suffix" "No symbol \"fo_o$suffix\" in current context." "p fo_o$suffix in" > > -gdb_test "info locals" "ix = 11\r\niy2 = 22\r\niz = 33\r\nix_x = 1\r\niy_y = 2\r\niz_z2 = 3\r\niy = 5\r\niz_z = 55" "info locals in" > +gdb_test_multiple "info locals" "info locals in" { > + # gfortran > + -re "ix = 11\r\niy2 = 22\r\niz = 33\r\nix_x = 1\r\niy_y = 2\r\niz_z2 = 3\r\niy = 5\r\niz_z = 55.*$gdb_prompt $" { > + pass $gdb_test_name > + } > + # ifx > + -re "ix = 11\r\niy2 = 22\r\niz = 33\r\nix_x = 1\r\niy_y = 2\r\niz_z2 = 3\r\niz_z = 55\r\niy = 5.*$gdb_prompt $" { > + pass $gdb_test_name > + } > + # ifort > + -re "iz_z = 55\r\niy = 5\r\nix = 11\r\niy2 = 22\r\niz = 33\r\nix_x = 1\r\niy_y = 2\r\niz_z2 = 3.*$gdb_prompt $" { > + pass $gdb_test_name > + } > +} > gdb_test "info common" "Contents of F77 COMMON block 'fo_o':\r\nix = 11\r\niy2 = 22\r\niz = 33\r\n\r\nContents of F77 COMMON block 'foo':\r\nix_x = 1\r\niy_y = 2\r\niz_z2 = 3" "info common in" > > gdb_test "ptype ix" "type = $int4" "ptype ix in" > -- > 2.25.1 > > Intel Deutschland GmbH > Registered Address: Am Campeon 10, 85579 Neubiberg, Germany > Tel: +49 89 99 8853-0, www.intel.de > Managing Directors: Christin Eisenschmid, Sharon Heck, Tiffany Doon Silva > Chairperson of the Supervisory Board: Nicole Lau > Registered Office: Munich > Commercial Register: Amtsgericht Muenchen HRB 186928