From patchwork Wed Dec 26 14:03:02 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philippe Waroquiers X-Patchwork-Id: 30844 Received: (qmail 39895 invoked by alias); 26 Dec 2018 14:03:25 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 39797 invoked by uid 89); 26 Dec 2018 14:03:24 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-27.6 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 spammy=Create, cancel, Also, properly X-HELO: mailsec117.isp.belgacom.be Received: from mailsec117.isp.belgacom.be (HELO mailsec117.isp.belgacom.be) (195.238.20.113) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 26 Dec 2018 14:03:21 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=skynet.be; i=@skynet.be; q=dns/txt; s=securemail; t=1545833002; x=1577369002; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=AHNidKAsk0We1Ddy8Ul9DV/iwKLVcEgr2ZJJ3+LwuGU=; b=dfSNLTgyzHoZAsM2zlffWFOJPn+klXpbBlrmODfxZCTPlV+DjBTNqnNl VHRghU55rxWCu0PYD9foDluzUOgRmw==; Received: from 184.205-67-87.adsl-dyn.isp.belgacom.be (HELO md.home) ([87.67.205.184]) by relay.skynet.be with ESMTP/TLS/DHE-RSA-AES128-GCM-SHA256; 26 Dec 2018 15:03:10 +0100 From: Philippe Waroquiers To: gdb-patches@sourceware.org Cc: Philippe Waroquiers Subject: [RFAv2 2/4] Fix gdb.ada/rename_subscript_param.exp by using more unique names. Date: Wed, 26 Dec 2018 15:03:02 +0100 Message-Id: <20181226140304.19594-3-philippe.waroquiers@skynet.be> In-Reply-To: <20181226140304.19594-1-philippe.waroquiers@skynet.be> References: <20181226140304.19594-1-philippe.waroquiers@skynet.be> MIME-Version: 1.0 X-IsSubscribed: yes The test fails due to conflict between boolean 'b'and some 'b' in atnat.h: (gdb) print b Multiple matches for b [0] cancel [1] b at ../sysdeps/ieee754/dbl-64/atnat.h:106 [2] b at ../sysdeps/ieee754/dbl-64/atnat.h:106 [3] b at ../sysdeps/ieee754/dbl-64/atnat.h:106 > FAIL: gdb.ada/rename_subscript_param.exp: print b before changing its value (timeout) Fix by renaming 'b' to 'rename_subscript_param_b. Also, change 'before' to 'after' in the gdb_test message that prints the value after changing it. The test however still fails for me, probably because the Debian stable Ada compiler is too old, and does not properly generate debug info for this renamining: (gdb) print rename_subscript_param_b No definition of "rename_subscript_param_b" in current context. (gdb) FAIL: gdb.ada/rename_subscript_param.exp: print rename_subscript_param_b before changing its value Note: if the compiler would generate the correct debug info, the test should succeed with the name B. However, waiting for this fix, changing the name ensures that the test fails directly, instead of causing a timeout. 2018-12-26 Philippe Waroquiers * gdb.ada/rename_subscript_param/pkg.adb (B): Rename to Rename_Subscript_Param_B. All users updated. --- gdb/testsuite/gdb.ada/rename_subscript_param.exp | 8 ++++---- gdb/testsuite/gdb.ada/rename_subscript_param/pkg.adb | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/gdb/testsuite/gdb.ada/rename_subscript_param.exp b/gdb/testsuite/gdb.ada/rename_subscript_param.exp index 9188bf0fa5..79370cfca2 100644 --- a/gdb/testsuite/gdb.ada/rename_subscript_param.exp +++ b/gdb/testsuite/gdb.ada/rename_subscript_param.exp @@ -26,9 +26,9 @@ clean_restart ${testfile} set bp_location [gdb_get_line_number "BREAK" ${testdir}/pkg.adb] runto "pkg.adb:$bp_location" -gdb_test "print b" \ +gdb_test "print rename_subscript_param_b" \ " = false" \ - "print b before changing its value" + "print rename_subscript_param_b before changing its value" set bp_location [gdb_get_line_number "Do_Nothing" ${testdir}/pkg.adb] gdb_test "break pkg.adb:$bp_location" \ @@ -39,6 +39,6 @@ gdb_test "cont" \ "Breakpoint \[0-9\]+, pkg.flip \\(.*" \ "Continuing to breakpoint on call to Do_Nothing" -gdb_test "print b" \ +gdb_test "print rename_subscript_param_b" \ " = true" \ - "print b before changing its value" + "print rename_subscript_param_b after changing its value" diff --git a/gdb/testsuite/gdb.ada/rename_subscript_param/pkg.adb b/gdb/testsuite/gdb.ada/rename_subscript_param/pkg.adb index cdbcd36ea5..c03fe16ad8 100644 --- a/gdb/testsuite/gdb.ada/rename_subscript_param/pkg.adb +++ b/gdb/testsuite/gdb.ada/rename_subscript_param/pkg.adb @@ -21,9 +21,9 @@ package body Pkg is -- Create a new scope to check that the scope match algorithm is fine in -- the front-end. declare - B : Boolean renames Bits (I); + Rename_Subscript_Param_B : Boolean renames Bits (I); begin - B := not B; -- BREAK + Rename_Subscript_Param_B := not Rename_Subscript_Param_B; -- BREAK Do_Nothing (Bits'Address); end; end Flip;