Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp1281375ybz; Wed, 29 Apr 2020 18:48:45 -0700 (PDT) X-Google-Smtp-Source: APiQypK2kcc0CkglE7JsMxPyys66Boyn+C6jLJqdckjVOd2mwvnM0XEqaL4QJo5Tea1qfJTU3xGU X-Received: by 2002:a17:906:bb07:: with SMTP id jz7mr518433ejb.317.1588211325708; Wed, 29 Apr 2020 18:48:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588211325; cv=none; d=google.com; s=arc-20160816; b=yF6ew3zGGMDISZKLUCfVTYDTqXW9BVuzg/rQoyJUzntkyiAOognBPxw/udsMJQuAsQ 6grUaIEuXHbUsQtDf+PJszWA4odECqRMbEuxmIznWMOR33fuDLFbzo0ffoulMQfYExcp LicsOs4dobeLGxVRojyU5wR+6HAdH22z8TT/6nQUDYTvEfYYAHg+iy2I1F+G7DzLrMAp 9SakDduBKwpzoZoEcz5/kpqEfjJvsgH51hnxDR48amhKi8NLNPhCz0vDPUbVoK9sTq0k 7RFxeh8MfFLYpncecTudZUXa/Ty2yeOBvMGpVWeqTGMeOll1Xrb1PnyrEo7Loozgv9Ku H1rw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version; bh=EVuhEfZpOX8zl0XrP5R3QxgNpzSuscXtdUcKEPTXcAw=; b=DXCId1o16egsD5gmpJjLaz878dax7TnIRCyb8tmhEsArAaIlZX8Spix88F9ell3Nb7 hVx1sEwa6DVpP0v2RNnjLejqg/VIfUC6Bj5LEZBFa9RGQdnKQLRNsZqH32MyhQfsjHIX +ULw1MPjEcbtw+VrletXz1APjEu6ZeGvWMe+2rWLPBmX3KOakLm8nT5V+VPAfEt7FjcC CKdxspnnqjDP9r8ocI2bXZXz3GZ1fX+g7Og8I0k6SpSRkVtMpLnJ1q1QoPtrHn3+D4Cw rfUox8+z2boJljnd+NL1mDwmOx23VUqDsRv21GkGgRRTtEz+fbkkInEeXb2MTzmFMvOL ddgA== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=canonical.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d23si4818286ejt.267.2020.04.29.18.48.22; Wed, 29 Apr 2020 18:48:45 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=canonical.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726661AbgD3Bqx (ORCPT + 99 others); Wed, 29 Apr 2020 21:46:53 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:53015 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726634AbgD3Bqw (ORCPT ); Wed, 29 Apr 2020 21:46:52 -0400 Received: from mail-lf1-f70.google.com ([209.85.167.70]) by youngberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1jTyHp-0003HT-Nw for linux-kernel@vger.kernel.org; Thu, 30 Apr 2020 01:46:49 +0000 Received: by mail-lf1-f70.google.com with SMTP id y19so1578838lfk.13 for ; Wed, 29 Apr 2020 18:46:49 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=EVuhEfZpOX8zl0XrP5R3QxgNpzSuscXtdUcKEPTXcAw=; b=Fz4Ti4iDh5kph9RZqk0q9nxAsTenuk5OFncwI3ifD+E+tIypivqo9EHsix7xn406mM L8NHRG5gYmaeNVD2/3fHabD+WADTj5dQ51GkHcR6T2JRCtDxNu45n3/MKZrFlEd5g6b5 1dT3MLOEAMxKK6W8p34qzZ4RZ5dAg3B/FpouGeD2bSPYE3gXVsifz19ZtmEbhdLi+KCu 5MHO4hzU0N0Rgj6JvkGvcjEN1qFRDc+uNbEqzXukfxxA5asXwtZzJ5la5mIrhlvXzhgn V4W83GUw3RsXqm8tZCxwOj9jqHpc8niC60aro3NFVbk1CxdwvqAvuPwV0il0wfamvovZ AX2w== X-Gm-Message-State: AGi0PuYls1jpSiLtwglHItUrtsrov336Pe4cJtOLERTsh3g+deyz3+I2 SC0pA9XG/xw2TIf9IJe8kjreF9c4l9QRy2TYxPA5FGMHEJMTZW77doJuk6MA86mhSS5eEXvV/nK IWW7zCra6PrHQcPfZbsxqzlnMT+4LWZn2WONYTiIkWxaTVOH9DQJkYUQW X-Received: by 2002:a05:6512:310d:: with SMTP id n13mr427922lfb.205.1588211209108; Wed, 29 Apr 2020 18:46:49 -0700 (PDT) X-Received: by 2002:a05:6512:310d:: with SMTP id n13mr427894lfb.205.1588211208743; Wed, 29 Apr 2020 18:46:48 -0700 (PDT) MIME-Version: 1.0 References: <20200429095044.24625-1-po-hsu.lin@canonical.com> <20200429122855.02594f33@gandalf.local.home> In-Reply-To: <20200429122855.02594f33@gandalf.local.home> From: Po-Hsu Lin Date: Thu, 30 Apr 2020 09:46:36 +0800 Message-ID: Subject: Re: [PATCH] selftests/ftrace: treat module requirement unmet situation as unsupported To: Steven Rostedt Cc: linux-kselftest@vger.kernel.org, mingo@redhat.com, shuah , Colin King , Masami Hiramatsu , Xiao Yang , linux-kernel@vger.kernel.org, Shuah Khan Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Apr 30, 2020 at 12:29 AM Steven Rostedt wrote: > > On Wed, 29 Apr 2020 17:50:44 +0800 > Po-Hsu Lin wrote: > > > When the required module for the test does not exist, use > > exit_unsupported instead of exit_unresolved to indicate this test is > > not supported. > > > > By doing this we can make test behaviour in sync with the > > irqsoff_tracer.tc test in preemptirq, which is also treating module > > existence in this way. Moreover, the test won't exit with a non-zero > > return value if the module does not exist. > > > > Fixes: 646f01ccdd59 ("ftrace/selftest: Add tests to test register_ftrace_direct()") > > Fixes: 4d23e9b4fd2e ("selftests/ftrace: Add trace_printk sample module test") > > Fixes: 7bc026d6c032 ("selftests/ftrace: Add function filter on module testcase") > > Fixes: af2a0750f374 ("selftests/ftrace: Improve kprobe on module testcase to load/unload module") > > I don't think this deserves the Fixes tags. Hello Steven, OK I will remove these Fixes tags and resubmit V2 if Masami agrees with this change. > > > Signed-off-by: Po-Hsu Lin > > --- > > tools/testing/selftests/ftrace/test.d/direct/ftrace-direct.tc | 2 +- > > tools/testing/selftests/ftrace/test.d/direct/kprobe-direct.tc | 2 +- > > tools/testing/selftests/ftrace/test.d/event/trace_printk.tc | 2 +- > > tools/testing/selftests/ftrace/test.d/ftrace/func_mod_trace.tc | 2 +- > > tools/testing/selftests/ftrace/test.d/kprobe/kprobe_module.tc | 2 +- > > I'm fine with these changes if Masami is. But it is Masami's call as his > infrastructure is more sensitive to the return calls than mine. I just run > the test and see what passes. I don't actually look at the return codes. Another thing to note is that this will also change the "# of unresolved" and "# of unsupported" in the summary at the end of the test report. Thanks Po-Hsu > > -- Steve > > > > 5 files changed, 5 insertions(+), 5 deletions(-) > > > > diff --git a/tools/testing/selftests/ftrace/test.d/direct/ftrace-direct.tc b/tools/testing/selftests/ftrace/test.d/direct/ftrace-direct.tc > > index d75a869..3d6189e 100644 > > --- a/tools/testing/selftests/ftrace/test.d/direct/ftrace-direct.tc > > +++ b/tools/testing/selftests/ftrace/test.d/direct/ftrace-direct.tc > > @@ -5,7 +5,7 @@ > > rmmod ftrace-direct ||: > > if ! modprobe ftrace-direct ; then > > echo "No ftrace-direct sample module - please make CONFIG_SAMPLE_FTRACE_DIRECT=m" > > - exit_unresolved; > > + exit_unsupported; > > fi > > > > echo "Let the module run a little" > > diff --git a/tools/testing/selftests/ftrace/test.d/direct/kprobe-direct.tc b/tools/testing/selftests/ftrace/test.d/direct/kprobe-direct.tc > > index 801ecb6..3d0e3ca 100644 > > --- a/tools/testing/selftests/ftrace/test.d/direct/kprobe-direct.tc > > +++ b/tools/testing/selftests/ftrace/test.d/direct/kprobe-direct.tc > > @@ -5,7 +5,7 @@ > > rmmod ftrace-direct ||: > > if ! modprobe ftrace-direct ; then > > echo "No ftrace-direct sample module - please build with CONFIG_SAMPLE_FTRACE_DIRECT=m" > > - exit_unresolved; > > + exit_unsupported; > > fi > > > > if [ ! -f kprobe_events ]; then > > diff --git a/tools/testing/selftests/ftrace/test.d/event/trace_printk.tc b/tools/testing/selftests/ftrace/test.d/event/trace_printk.tc > > index b02550b..dd8b10d 100644 > > --- a/tools/testing/selftests/ftrace/test.d/event/trace_printk.tc > > +++ b/tools/testing/selftests/ftrace/test.d/event/trace_printk.tc > > @@ -5,7 +5,7 @@ > > rmmod trace-printk ||: > > if ! modprobe trace-printk ; then > > echo "No trace-printk sample module - please make CONFIG_SAMPLE_TRACE_PRINTK=m" > > - exit_unresolved; > > + exit_unsupported; > > fi > > > > echo "Waiting for irq work" > > diff --git a/tools/testing/selftests/ftrace/test.d/ftrace/func_mod_trace.tc b/tools/testing/selftests/ftrace/test.d/ftrace/func_mod_trace.tc > > index 1a4b4a4..26dc06a 100644 > > --- a/tools/testing/selftests/ftrace/test.d/ftrace/func_mod_trace.tc > > +++ b/tools/testing/selftests/ftrace/test.d/ftrace/func_mod_trace.tc > > @@ -13,7 +13,7 @@ echo '*:mod:trace_printk' > set_ftrace_filter > > if ! modprobe trace-printk ; then > > echo "No trace-printk sample module - please make CONFIG_SAMPLE_TRACE_PRINTK= > > m" > > - exit_unresolved; > > + exit_unsupported; > > fi > > > > : "Wildcard should be resolved after loading module" > > diff --git a/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_module.tc b/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_module.tc > > index d861bd7..4e07c69 100644 > > --- a/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_module.tc > > +++ b/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_module.tc > > @@ -8,7 +8,7 @@ rmmod trace-printk ||: > > if ! modprobe trace-printk ; then > > echo "No trace-printk sample module - please make CONFIG_SAMPLE_TRACE_PRINTK= > > m" > > - exit_unresolved; > > + exit_unsupported; > > fi > > > > MOD=trace_printk >