From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2AD1AC433F5 for ; Fri, 24 Aug 2018 23:20:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C560920836 for ; Fri, 24 Aug 2018 23:20:24 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C560920836 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=goodmis.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727556AbeHYC5H (ORCPT ); Fri, 24 Aug 2018 22:57:07 -0400 Received: from mail.kernel.org ([198.145.29.99]:60276 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726840AbeHYC5G (ORCPT ); Fri, 24 Aug 2018 22:57:06 -0400 Received: from gandalf.local.home (cpe-66-24-56-78.stny.res.rr.com [66.24.56.78]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 31BE320836; Fri, 24 Aug 2018 23:20:22 +0000 (UTC) Date: Fri, 24 Aug 2018 19:20:18 -0400 From: Steven Rostedt To: Masami Hiramatsu Cc: Shuah Khan , Ingo Molnar , linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 23/32] selftests/ftrace: Add function profiling stat testcase Message-ID: <20180824192018.40b9b015@gandalf.local.home> In-Reply-To: <153443760252.23257.5752638886588410084.stgit@devbox> References: <153443695002.23257.13628220023468200991.stgit@devbox> <153443760252.23257.5752638886588410084.stgit@devbox> X-Mailer: Claws Mail 3.16.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 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 17 Aug 2018 01:40:02 +0900 Masami Hiramatsu wrote: > Add a testcase for function profiling per-cpu statistics > interface. There is already func_profile.tc, but that is > mainly focusing on the combination of function-profiler > and function tracer. This testcase ensures trace_stat > per-cpu function statistics is correctly updated. > > Signed-off-by: Masami Hiramatsu > --- > .../ftrace/test.d/ftrace/func_profile_stat.tc | 23 ++++++++++++++++++++ > 1 file changed, 23 insertions(+) > create mode 100644 tools/testing/selftests/ftrace/test.d/ftrace/func_profile_stat.tc > > diff --git a/tools/testing/selftests/ftrace/test.d/ftrace/func_profile_stat.tc b/tools/testing/selftests/ftrace/test.d/ftrace/func_profile_stat.tc > new file mode 100644 > index 000000000000..1d2440d80ec3 > --- /dev/null > +++ b/tools/testing/selftests/ftrace/test.d/ftrace/func_profile_stat.tc > @@ -0,0 +1,23 @@ > +#!/bin/sh > +# SPDX-License-Identifier: GPL-2.0 > +# description: ftrace - function profiling > + > +[ ! -f function_profile_enabled ] && exit_unsupported > + > +: "Enable function profile" > +echo 1 > function_profile_enabled > + > +: "Profile must be updated" > +cp trace_stat/function0 $TMPDIR/ > +( echo "forked"; sleep 1 ) > +: "diff returns 0 if there is no difference" > +! diff trace_stat/function0 $TMPDIR/function0 > + > +echo 0 > function_profile_enabled > + > +: "Profile must NOT be updated" > +cp trace_stat/function0 $TMPDIR/ > +( echo "forked"; sleep 1 ) > +: "diff returns 0 if there is no difference" > +diff trace_stat/function0 $TMPDIR/function0 > + Can remove the last empty line from the file. Other than that... Acked-by: Steven Rostedt (VMware) -- Steve -- Steve