From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19516 invoked by alias); 24 Sep 2009 16:52:44 -0000 Received: (qmail 19506 invoked by uid 22791); 24 Sep 2009 16:52:44 -0000 X-SWARE-Spam-Status: No, hits=-2.1 required=5.0 tests=AWL,BAYES_00,J_CHICKENPOX_34 X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 24 Sep 2009 16:52:38 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 2FB592BABE1; Thu, 24 Sep 2009 12:52:37 -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 Adm1umQ8derJ; Thu, 24 Sep 2009 12:52:37 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id E75812BABDC; Thu, 24 Sep 2009 12:52:36 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id 69FACF593C; Thu, 24 Sep 2009 09:52:34 -0700 (PDT) Date: Thu, 24 Sep 2009 16:52:00 -0000 From: Joel Brobecker To: Matt Rice Cc: gdb-patches@sourceware.org Subject: Re: gdb.objc/objcdecode.exp test error.. Message-ID: <20090924165234.GB2112@adacore.com> References: <8ba6bed40903051731s41c9183aha18af51113f3c0ea@mail.gmail.com> <20090306173345.GI3744@adacore.com> <200903061913.43419.pedro@codesourcery.com> <8ba6bed40903070407q3e91f0ffs6fc67b2b9c329081@mail.gmail.com> <8ba6bed40903080716k3fbeb56t5605aef1864b26a3@mail.gmail.com> <20090923231317.GA18470@adacore.com> <8ba6bed40909232348j47027093of7a2bafb8120e5ce@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8ba6bed40909232348j47027093of7a2bafb8120e5ce@mail.gmail.com> User-Agent: Mutt/1.5.18 (2008-05-17) Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2009-09/txt/msg00747.txt.bz2 > np, this is also duplicated in the 2 .exp files, > i should figure out if i can somehow include it from the gdb.objc? I'd say nah, let's keep it kiss for now. > well, theres a lot of tests that pass that just involve various setup > for the tests which fail, i think ideally, these would not be tests, > but e.g. if i just do send_gdb I seem to run into lots of timing > issues, i just kfailed the ones that do fail. It's fine for them to be tests, even if they are very simple minded and are not directly related to the issue we're trying to test. They are still part of the scenario, and if something goes wrong, then we get a FAIL. send_gdb should never ever be used in a testcase except under peculiar conditions that gdb_test_multiple does not handle already. The send_gdb thing is not all that evil, it's just that people tend to follow it up with an expect_gdb, which is usually incomplete, and always a maintenance issue. We can handle the change to lib/gdb.exp independently of the rest. @@ -474,6 +474,11 @@ proc gdb_continue_to_breakpoint {name {location_pattern .*}} { -re ".*$gdb_prompt $" { fail $full_name } + -re ".*A problem internal to GDB has been detected" { + fail "$full_name (GDB internal error)" + gdb_internal_error_resync + } + timeout { fail "$full_name (timeout)" } This is a perfect example of why send_gdb/expect_gdb is usually a bad idea. This should be replaced by gdb_test_multiple. The whole implementation can then be replaced by: gdb_test_mutiple "continue" $full_name { -re "Breakpoint .* (at|in) $location_pattern\r\n$gdb_prompt $" { pass $full_name } } It could also possibly be replaced by a simple call to gdb_test, but I think that gdb_test has a side-effect of appending a wildcard match at the end of the given regexp. So it would transform $location_pattern into $location_pattern followed by ".*". -- Joel