From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24137 invoked by alias); 9 Sep 2014 18:17:32 -0000 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 Received: (qmail 24127 invoked by uid 89); 9 Sep 2014 18:17:32 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.5 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,UNPARSEABLE_RELAY autolearn=ham version=3.3.2 X-HELO: layla.krisman.be Received: from layla.krisman.be (HELO layla.krisman.be) (176.31.208.35) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Tue, 09 Sep 2014 18:17:30 +0000 Received: from [127.0.0.1] (localhost [127.0.0.1]) with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (envelope-from ) id 1XRPvX-0005rz-Fh; Tue, 09 Sep 2014 20:14:05 +0200 From: Gabriel Krisman Bertazi To: Joel Brobecker Cc: gdb-patches@sourceware.org Subject: Re: [PING] [PATCH] Fix gdb.fortran/array-element.exp failures. In-Reply-To: <20140909154531.GJ28404@adacore.com> (Joel Brobecker's message of "Tue, 9 Sep 2014 08:45:31 -0700") References: <87zjgobth0.fsf@Argo.krisman.be> <8761jbbu6l.fsf@Argo.krisman.be> <87lhrv36pm.fsf@Argo.krisman.be> <87zjf3sqrd.fsf@krisman.be> <87r4048546.fsf_-_@krisman.be> <20140909130901.GG28404@adacore.com> <87d2b4c07h.fsf@anubis.Home> <20140909154531.GJ28404@adacore.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) Date: Tue, 09 Sep 2014 18:17:00 -0000 Message-ID: <87ppf4acb5.fsf@anubis.Home> MIME-Version: 1.0 Content-Type: text/plain X-IsSubscribed: yes X-SW-Source: 2014-09/txt/msg00244.txt.bz2 Joel Brobecker writes: > The problem is that this does not tell me what was wrong. Just that > some tests did not pass. Although your change seems OK at first glance, > I'd like to do know what it was that did not match, and why it's OK > stop trying to match it now. Joel, thanks for your clarification. Ok, so we got this situation: The original testcase sets a breakpoint at the label continue and resumes execution until we reach it. On the Fortran file, this means the inferior has iterated over the whole loop before reaching the breakpoint for the first time. Then, the original testcase issues another continue command, causing the inferior to finish the execution earlier than expected, since we still want to make a final test on whether we print the second element. This causes the two test failures. My guess is that the original author meant to break after each loop iteration, instead of going all the way until the continue label. Nevertheless, stepping over a single iteration or stopping after the entire loop has no impact on the test results. So, what my patch does is simply remove the second "continue" command that would prematurely end inferior's execution, so we can actually test whether both elements are printed correctly after executing the loop. Other than that, when I first submitted this patch, Sergio asked me to simplify the testcase, because it felt unusual. That is what the other modifications are about. I'll make sure to update the commit message to include part of this explanation to better clarify what this patch is really about. Thanks, -- Gabriel Krisman Bertazi