From patchwork Mon Jul 20 22:23:17 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joel Brobecker X-Patchwork-Id: 7768 Received: (qmail 22449 invoked by alias); 20 Jul 2015 22:23:31 -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 22440 invoked by uid 89); 20 Jul 2015 22:23:31 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.2 required=5.0 tests=AWL, BAYES_00, KAM_LAZY_DOMAIN_SECURITY, RCVD_IN_DNSWL_NONE autolearn=no version=3.3.2 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 (AES256-SHA encrypted) ESMTPS; Mon, 20 Jul 2015 22:23:21 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 28E7B28D4A; Mon, 20 Jul 2015 18:23:19 -0400 (EDT) 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 MVnhKcrvyQGI; Mon, 20 Jul 2015 18:23:19 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id E260F28B24; Mon, 20 Jul 2015 18:23:18 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id 75C5E40283; Mon, 20 Jul 2015 15:23:17 -0700 (PDT) Date: Mon, 20 Jul 2015 15:23:17 -0700 From: Joel Brobecker To: Sergio Durigan Junior Cc: Pierre-Marie de Rodat , Pedro Alves , GDB Patches Subject: Re: [PATCH] Share the "multi_line" helper among all Ada testcases Message-ID: <20150720222317.GH7406@adacore.com> References: <54FEDB92.9060808@adacore.com> <20150317200809.GD7494@adacore.com> <5509492C.5000604@redhat.com> <20150318141238.GE7494@adacore.com> <550C100D.5000500@adacore.com> <87oajas3pb.fsf@redhat.com> <55AD0A6E.6060604@adacore.com> <87r3o2rgeh.fsf@redhat.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <87r3o2rgeh.fsf@redhat.com> User-Agent: Mutt/1.5.23 (2014-03-12) > > --- a/gdb/testsuite/gdb.ada/info_exc.exp > > +++ b/gdb/testsuite/gdb.ada/info_exc.exp > > @@ -34,9 +34,7 @@ gdb_test "info exceptions" \ > > "program_error: $hex" \ > > "storage_error: $hex" \ > > "tasking_error: $hex" \ > > - ".*" \ > > - "const.aint_global_gdb_e: $hex" \ > > - ".*"] > > + "\(.*\r\n\)*const.aint_global_gdb_e: $hex\(.*\r\n\)*"] > > > > gdb_test "info exceptions task" \ > > [multi_line "All Ada exceptions matching regular expression > > \"task\":" \ I missed that answer, and came up with something very similar, which I checked in. Here it is: gdb/testsuite/ChangeLog: * gdb.ada/info_exc.exp: Adjust "info exceptions" expected output. Tested on x86_64-linux. I thought about using join directly with the relaxed end-of-line sequence to restore the original behavior, but then decided against it, because this expected output is stricter, and I think that's better. So I came up with the attached patch, which is another way of doing what Pierre Marie had done. From 8b558f797a3a63aaa8de119ddf53c8afdd1dc6eb Mon Sep 17 00:00:00 2001 From: Joel Brobecker Date: Mon, 20 Jul 2015 15:09:44 -0700 Subject: [PATCH] gdb.ada/info_exc.exp: Adjust expected output in "info exception" test. Since multi_line was moved to gdb.exp in a slightly stricter form, The gdb.ada/info_exc.exp:info exceptions test has been failing. This is because it now expects a new-line sequence at the end of each argument given to multi_line, including ".*". But the intent when writing the test was to signify "could-be-nothing-at-all". As a result, the test fails on x86_64-linux with a runtime built as recommended, because of that extra new-line sequence. gdb/testsuite/ChangeLog: * gdb.ada/info_exc.exp: Adjust "info exceptions" expected output. --- gdb/testsuite/ChangeLog | 4 ++++ gdb/testsuite/gdb.ada/info_exc.exp | 4 +--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 520f606..17af4fc 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2015-07-20 Joel Brobecker + + * gdb.ada/info_exc.exp: Adjust "info exceptions" expected output. + 2015-07-16 Jan Kratochvil * gdb.arch/i386-biarch-core.exp: Replace istarget diff --git a/gdb/testsuite/gdb.ada/info_exc.exp b/gdb/testsuite/gdb.ada/info_exc.exp index add83c5..d6ea5da 100644 --- a/gdb/testsuite/gdb.ada/info_exc.exp +++ b/gdb/testsuite/gdb.ada/info_exc.exp @@ -34,9 +34,7 @@ gdb_test "info exceptions" \ "program_error: $hex" \ "storage_error: $hex" \ "tasking_error: $hex" \ - ".*" \ - "const.aint_global_gdb_e: $hex" \ - ".*"] + ".*\[\r\n\]*const.aint_global_gdb_e: $hex\[\r\n\]*.*" ] gdb_test "info exceptions task" \ [multi_line "All Ada exceptions matching regular expression \"task\":" \ -- 2.1.4