Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp599307pxb; Wed, 27 Oct 2021 08:48:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxCgmGN+K0Et/jHVabdi2BLe3CCHKCdghr3zDhTWGO1GBk9S/neZTO0GV8lfTp3xI8c5nV/ X-Received: by 2002:a17:906:f6c8:: with SMTP id jo8mr11220782ejb.305.1635349681241; Wed, 27 Oct 2021 08:48:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635349681; cv=none; d=google.com; s=arc-20160816; b=WgBpyDHpxCeCW8KFRuO9U3Jv/3SxSy2N6R116P5JJWymWCo1TXVBJ2ZtgswpMtRw4T WErLz8eNuJLwi5NCs52SGoqb39sp/e1y8WHsr1Q2UN9XeMHl5y0ZiWzb5jm09y7JTaEE 6XFi5sYztSYq+NQQA3ttWUgb+bJODL64uo6yrpwRJEwdSXCOK+xPsgiQprRNYr4GSxQL dvwngItLrQmNyVkGYU2r3s4fBRj1+cc7FoAbPFJUTwpXxHE1do8atbHTdSwK7pQdEUws W/CuDYfvArfFsAwp4KyJVLp2ngV+YX96F6vpqsYqrECSiNRaawZ3/04ILysl8CeL8Wpb h1hQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=gqWq8qOvvrsqJChz9ugs50LXBdVM6gSaY4r6uSIhgFs=; b=lVWnbuY4C36YZtURUaRVZBNLW9xJWJe+1iRH2RdlTAsQXJ/zXGmW9Bu4fYeD0f9eam LTU9S3t7OHj5eol6BpCXQD9GrEwH5PhMvBqarkZC6+NIuS0kff4If3CDwhqY1J92bfZN aE7K+dTER5rWZ7+eB1h8Y+1E1s+wZQyANn50DN8i7pkzDrtqbSt91yjhL2NH0TwKOAPz x/pKlci9G5qpuas5DUtjWudR8+OHWIeX5Rw/sZNljF3OYJazsiiwYrGoKnHIjP5/rMiR 9/H2GveK0s0BNTYekGwhcbs7TlRoNTEeoP8V6Qs2s8qzGVUI8CZWygdvqOJ3hwv0SGXj DQog== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=DBREyDU5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 11si221517edx.477.2021.10.27.08.47.36; Wed, 27 Oct 2021 08:48:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=DBREyDU5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236738AbhJ0Cgo (ORCPT + 99 others); Tue, 26 Oct 2021 22:36:44 -0400 Received: from mail.kernel.org ([198.145.29.99]:58080 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238214AbhJ0Cgo (ORCPT ); Tue, 26 Oct 2021 22:36:44 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id BAF0B60F0F; Wed, 27 Oct 2021 02:34:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1635302059; bh=tJuz9xU+39xdBxstvNh2Lqyyxlqzg73RtzfkS9+Mx50=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=DBREyDU5e++mtcWEZgz8YzaxZtExD++2IO7ykow899wUqCr8ulbm1Wjr9wgtaiA83 COG3pR0aXfKuPDapxFwMeUN2YiA083KMVzSOhkqJPcQNGsO1lNlbGlNl4hK3KaFPNq JOI3Y4X/KIrNCXyH8ZUWwpmhvwcHC+ePSAH9L3AQ2RwOWuRVd4+ZGcKvkl0y/Vh0Rf yNCJBGp+3UAdQS4KHq9WJ5BQ1+Rz1w3s4OL2dHfFuVABa33nCH+gT4PXedcLQjQ7uU 2PxBHj85C4m0V6ejXzBbiwYcOGl9ZqBVI/8BXx6jiltLrNVGYyeK1K+jloHXrQXYf2 qBQAg2vJw5HNw== Date: Wed, 27 Oct 2021 11:34:16 +0900 From: Masami Hiramatsu To: Kalesh Singh Cc: surenb@google.com, hridya@google.com, namhyung@kernel.org, kernel-team@android.com, Jonathan Corbet , Steven Rostedt , Ingo Molnar , Shuah Khan , Tom Zanussi , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org Subject: Re: [PATCH v4 7/8] tracing/selftests: Add tests for hist trigger expression parsing Message-Id: <20211027113416.fdad2adf8d162e67405e44ba@kernel.org> In-Reply-To: References: <20211025200852.3002369-1-kaleshsingh@google.com> <20211025200852.3002369-8-kaleshsingh@google.com> <20211026214311.583c728d90d41778c38201dd@kernel.org> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.32; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 26 Oct 2021 07:28:39 -0700 Kalesh Singh wrote: > On Tue, Oct 26, 2021 at 5:43 AM Masami Hiramatsu wrote: > > > > Hi Kalesh, > > > > On Mon, 25 Oct 2021 13:08:39 -0700 > > Kalesh Singh wrote: > > > > > Add tests for the parsing of hist trigger expressions; and to > > > validate expression evaluation. > > > > > > Signed-off-by: Kalesh Singh > > > Reviewed-by: Namhyung Kim > > > --- > > > > > > Changes in v3: > > > - Remove .sym-offset error check tests > > > > > > Changes in v2: > > > - Add Namhyung's Reviewed-by > > > - Update comment to clarify err_pos in "Too many subexpressions" test > > > > > > > > > .../testing/selftests/ftrace/test.d/functions | 4 +- > > > .../trigger/trigger-hist-expressions.tc | 72 +++++++++++++++++++ > > > 2 files changed, 74 insertions(+), 2 deletions(-) > > > create mode 100644 tools/testing/selftests/ftrace/test.d/trigger/trigger-hist-expressions.tc > > > > > > diff --git a/tools/testing/selftests/ftrace/test.d/functions b/tools/testing/selftests/ftrace/test.d/functions > > > index 000fd05e84b1..1855a63559ad 100644 > > > --- a/tools/testing/selftests/ftrace/test.d/functions > > > +++ b/tools/testing/selftests/ftrace/test.d/functions > > > @@ -16,13 +16,13 @@ reset_tracer() { # reset the current tracer > > > > > > reset_trigger_file() { > > > # remove action triggers first > > > - grep -H ':on[^:]*(' $@ | > > > + grep -H ':on[^:]*(' $@ | tac | > > > while read line; do > > > cmd=`echo $line | cut -f2- -d: | cut -f1 -d"["` > > > file=`echo $line | cut -f1 -d:` > > > echo "!$cmd" >> $file > > > done > > > - grep -Hv ^# $@ | > > > + grep -Hv ^# $@ | tac | > > > while read line; do > > > cmd=`echo $line | cut -f2- -d: | cut -f1 -d"["` > > > file=`echo $line | cut -f1 -d:` > > > > If this update has any meaning, please make a separate patch for this part. > > Hi Masami, > > Thanks for the feedback. The above change is to ensure we remove > triggers in the reverse order that we created them - important when > one trigger depends on another. Hi Kalesh, That's a good reason to make this an independent patch :) > I can split it out into a separate > patch and will add a README pattern check to the requires tag for > these tests. Thank you! -- Masami Hiramatsu