From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 52886 invoked by alias); 27 May 2016 12:35:38 -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 52752 invoked by uid 89); 27 May 2016 12:35:36 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.9 required=5.0 tests=BAYES_00,KAM_LAZY_DOMAIN_SECURITY autolearn=no version=3.3.2 spammy=preceding X-HELO: usplmg21.ericsson.net Received: from usplmg21.ericsson.net (HELO usplmg21.ericsson.net) (198.24.6.65) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Fri, 27 May 2016 12:35:35 +0000 Received: from EUSAAHC002.ericsson.se (Unknown_Domain [147.117.188.78]) by usplmg21.ericsson.net (Symantec Mail Security) with SMTP id A3.0C.03614.FDE38475; Fri, 27 May 2016 14:34:39 +0200 (CEST) Received: from elxa4wqvvz1 (147.117.188.8) by smtps-am.internal.ericsson.com (147.117.188.78) with Microsoft SMTP Server (TLS) id 14.3.294.0; Fri, 27 May 2016 08:35:32 -0400 References: <1463504594-4419-1-git-send-email-antoine.tremblay@ericsson.com> User-agent: mu4e 0.9.17; emacs 24.4.1 From: Antoine Tremblay To: Pedro Alves CC: Antoine Tremblay , Subject: Re: [PATCH 1/4] Move trace conditions tests from ftrace.exp to trace-condition.exp In-Reply-To: Date: Fri, 27 May 2016 12:35:00 -0000 Message-ID: MIME-Version: 1.0 Content-Type: text/plain X-IsSubscribed: yes X-SW-Source: 2016-05/txt/msg00490.txt.bz2 Pedro Alves writes: > On 05/17/2016 06:03 PM, Antoine Tremblay wrote: >> This patch moves conditional tests that were done in ftrace.exp to >> trace-conditon.exp. > > Typo conditon.exp. > Fixed. >> >> Note that emit_ref is now tested by the anarg local variable there is no >> need to test the register directly. >> >> The test coverage remains the same. > > How did you determine it that it's the same? I've put an assert in each emit function and validated that they are all called before / after the move. > > E.g., seems like the <, >, etc., conditions in ftrace.exp use a > global variable, while the trace-condition.exp ones use constants. > That is not a problem since testing with a constant tests the < > on it's own. The reading of global variable used in ftrace is tested separately in trace-condition.exp. > I also notice that all tests in trace-condition.exp expect 10 frames > to be collected. If a condition's handling is broken and the > tracepoints ends up unconditional, will we ever notice? > That's a good point, that was pre-existing in trace-condition.exp I think it's mitigated partially by counter-cases like: test_tracepoints $trace_command "21 == 21" 10 test_tracepoints $trace_command "21 != 42" 10 But could be a problem with conditions like: test_tracepoints $trace_command "(0xabababab & 0x0000ffff) == 0xabab" 10 It could add counter cases to all true/false tests like : test_tracepoints $trace_command "(0xabababab & 0x0000ffff) == 0xffff" 0 And do that for the others. > Seems like we have counter-cases using the same operators > but that eval false, like (relative to your patch): > Yes indeed, as above. I'll do that in a patch preceding this one that will change the existing trace-condition.exp first. Thanks, Antoine