From patchwork Mon Jan 8 09:41:18 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joel Brobecker X-Patchwork-Id: 25266 Received: (qmail 105168 invoked by alias); 8 Jan 2018 09:41:23 -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 105157 invoked by uid 89); 8 Jan 2018 09:41:23 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.2 spammy=heart X-HELO: rock.gnat.com Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 08 Jan 2018 09:41:21 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 076FD116FE5 for ; Mon, 8 Jan 2018 04:41:20 -0500 (EST) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id p+PO9przFTBb for ; Mon, 8 Jan 2018 04:41:19 -0500 (EST) Received: from tron.gnat.com (tron.gnat.com [IPv6:2620:20:4000:0:46a8:42ff:fe0e:e294]) by rock.gnat.com (Postfix) with ESMTP id EAFBE116F95 for ; Mon, 8 Jan 2018 04:41:19 -0500 (EST) Received: by tron.gnat.com (Postfix, from userid 4233) id E6FC250B; Mon, 8 Jan 2018 04:41:19 -0500 (EST) From: Joel Brobecker To: gdb-patches@sourceware.org Subject: [pushed/Ada] Relax expected output in gdb.ada/access_tagged_param.exp test Date: Mon, 8 Jan 2018 04:41:18 -0500 Message-Id: <1515404478-38666-1-git-send-email-brobecker@adacore.com> Hello, One of the tests in gdb.ada/access_tagged_param.exp verifies the value of the parameters being printed by GDB when stopping at a breakpoint inside procedure Pck.Inspect. In particular, one of these parameters is actually generated internally by the compiler, and does only indirectly depend on the user-level code. A recent change in AdaCore's compiler caused the code expansion to change a little bit, and as a result, the value of that parameter has changed from 2 to 3. This can be evindenced by looking at the code post expansion, using the -gnatDG command-line switch to generate the .dg files: $ gnatmake -g -gnatDG foo.adb $ vi foo.adb.dg We can see that the call to pck.inspect used to be: pck__inspect (P8b, objL => 2); With a recent version of GNAT Pro, it is now: pck__inspect (P9b, objL => 3); This change causes a spurious FAIL when running this testcase. The objL parameter being, at heart, a simple counter of the nesting level, this commit relaxes the expected output to accept any single- digit number. We could accept any decimal, but given the example program, I dout that number will reach double-digit level. If it does, we'll double-check that this is normal, and relax the expected output further. gdb/testsuite/ChangeLog: * gdb.ada/access_tagged_param.exp: Relax expected output for value of "ObjL" in "continue" to pck.inspect breakpoint test. Tested on x86_64-linux and pushed to master. Thanks, diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index baa0104..7f4d80d 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,5 +1,11 @@ 2018-01-08 Joel Brobecker + * gdb.ada/access_tagged_param.exp: Relax expected output + for value of "ObjL" in "continue" to pck.inspect breakpoint + test. + +2018-01-08 Joel Brobecker + * gdb.ada/arr_enum_idx_w_gap.exp * gdb.ada/arr_enum_idx_w_gap/foo_q418_043.adb diff --git a/gdb/testsuite/gdb.ada/access_tagged_param.exp b/gdb/testsuite/gdb.ada/access_tagged_param.exp index 598cf89..47b180d 100644 --- a/gdb/testsuite/gdb.ada/access_tagged_param.exp +++ b/gdb/testsuite/gdb.ada/access_tagged_param.exp @@ -37,4 +37,4 @@ gdb_breakpoint "pck.inspect" # the value of all the parameters. gdb_test "continue" \ - ".*Breakpoint $decimal, pck\\.inspect \\(obj=$hex, =2\\) at .*" + ".*Breakpoint $decimal, pck\\.inspect \\(obj=$hex, =\[1-9\]\\) at .*"