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=-8.3 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=unavailable 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 8BCBFC606C7 for ; Mon, 8 Jul 2019 19:07:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4A952216FD for ; Mon, 8 Jul 2019 19:07:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389522AbfGHTHE (ORCPT ); Mon, 8 Jul 2019 15:07:04 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:53298 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728461AbfGHTHE (ORCPT ); Mon, 8 Jul 2019 15:07:04 -0400 Received: from 1.general.cascardo.us.vpn ([10.172.70.58] helo=calabresa) by youngberry.canonical.com with esmtpsa (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.76) (envelope-from ) id 1hkYyc-0002yW-96; Mon, 08 Jul 2019 19:07:02 +0000 Date: Mon, 8 Jul 2019 16:06:57 -0300 From: Thadeu Lima de Souza Cascardo To: Steven Rostedt Cc: linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, Ingo Molnar , Masami Hiramatsu , Shuah Khan Subject: Re: [PATCH] selftests/ftrace: avoid failure when trying to probe a notrace function Message-ID: <20190708190656.GR4306@calabresa> References: <20190708181933.10286-1-cascardo@canonical.com> <20190708145618.6649f397@gandalf.local.home> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190708145618.6649f397@gandalf.local.home> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jul 08, 2019 at 02:56:18PM -0400, Steven Rostedt wrote: > On Mon, 8 Jul 2019 15:19:33 -0300 > Thadeu Lima de Souza Cascardo wrote: > > > Check that the function is on available_filter_functions. If it's not, > > mark the test as unresolved, instead of failing it. > > > > Actually, I sent this out a while ago: > > http://lkml.kernel.org/r/20190322150923.1b58eca5@gandalf.local.home > > Does that fix it for you? > > -- Steve Yes, that fix it for me, let me reply to the original message. Thanks! Cascardo. > > > > Signed-off-by: Thadeu Lima de Souza Cascardo > > --- > > tools/testing/selftests/ftrace/test.d/kprobe/kprobe_eventname.tc | 1 + > > 1 file changed, 1 insertion(+) > > > > diff --git a/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_eventname.tc b/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_eventname.tc > > index 3fb70e01b1fe..e4dff034da12 100644 > > --- a/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_eventname.tc > > +++ b/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_eventname.tc > > @@ -26,6 +26,7 @@ test -d events/kprobes2/event2 || exit_failure > > > > FUNC=`grep -m 10 " [tT] .*\.isra\..*$" /proc/kallsyms | tail -n 1 | cut -f 3 -d " "` > > [ "x" != "x$FUNC" ] || exit_unresolved > > +grep -n "$FUNC" available_filter_functions || exit_unresolved > > echo "p $FUNC" > kprobe_events > > EVENT=`grep $FUNC kprobe_events | cut -f 1 -d " " | cut -f 2 -d:` > > [ "x" != "x$EVENT" ] || exit_failure >