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=-7.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,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 07EB9C38A24 for ; Thu, 7 May 2020 08:50:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D91C92075E for ; Thu, 7 May 2020 08:50:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1588841454; bh=7tsWrxdXE3Dkf/fRBkaSA0xfL/Hwp6Oa4BnHtxcuWks=; h=Date:From:To:Cc:Subject:In-Reply-To:References:List-ID:From; b=j1P58MyBzK1vhu/R/6eIPLrBlUNIPu8haG2IgDaR8IicDAPtvqLrPA0vQ7H7podjg NbIrxURaQ01lrBmkHcYxdJYbJGvirb6L7FpjThdxtLOHNiC1suCtS3zvM7XE9HviEX /0fCi/6RSMH6wBVZC17FgA8hPulIrZK8K3sY1zK4= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725819AbgEGIuy (ORCPT ); Thu, 7 May 2020 04:50:54 -0400 Received: from mail.kernel.org ([198.145.29.99]:51536 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725802AbgEGIuy (ORCPT ); Thu, 7 May 2020 04:50:54 -0400 Received: from devnote2 (NE2965lan1.rev.em-net.ne.jp [210.141.244.193]) (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 C76E22073A; Thu, 7 May 2020 08:50:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1588841453; bh=7tsWrxdXE3Dkf/fRBkaSA0xfL/Hwp6Oa4BnHtxcuWks=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=nZhEtho9UjJNo8bQxizkOOO+O9zeVSGktCMqk+19AhjJUTtwfcATxW0dFG8I6857L olRw6AFGAq6YbT3cvWWcpKD9opAPHTHiL+OijKC1PjiqKuWnvvMQ/w7AOELG4EwP0b EKiKBcYjALAeMbn+ziHUh3OYnTBw+d6xNZw9OoEQ= Date: Thu, 7 May 2020 17:50:49 +0900 From: Masami Hiramatsu To: Po-Hsu Lin Cc: linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, shuah@kernel.org, mingo@redhat.com, rostedt@goodmis.org, mhiramat@kernel.org, joel@joelfernandes.org Subject: Re: [PATCH] selftests/ftrace: mark irqsoff_tracer.tc test as unresolved if the test module does not exist Message-Id: <20200507175049.fba9420a538e6d81a7b48d60@kernel.org> In-Reply-To: <20200505101445.27063-1-po-hsu.lin@canonical.com> References: <20200505101445.27063-1-po-hsu.lin@canonical.com> X-Mailer: Sylpheed 3.5.1 (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-kselftest-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org On Tue, 5 May 2020 18:14:45 +0800 Po-Hsu Lin wrote: > The UNRESOLVED state is much more apporiate than the UNSUPPORTED state > for the absence of the test module, as it matches "test was set up > incorrectly" situation in the README file. > > A possible scenario is that the function was enabled (supported by the > kernel) but the module was not installed properly, in this case we > cannot call this as UNSUPPORTED. > > This change also make it consistent with other module-related tests > in ftrace. > > Signed-off-by: Po-Hsu Lin Looks good to me. Acked-by: Masami Hiramatsu Thanks! > --- > .../testing/selftests/ftrace/test.d/preemptirq/irqsoff_tracer.tc | 9 ++++++++- > 1 file changed, 8 insertions(+), 1 deletion(-) > > diff --git a/tools/testing/selftests/ftrace/test.d/preemptirq/irqsoff_tracer.tc b/tools/testing/selftests/ftrace/test.d/preemptirq/irqsoff_tracer.tc > index cbd1743..2b82c80e 100644 > --- a/tools/testing/selftests/ftrace/test.d/preemptirq/irqsoff_tracer.tc > +++ b/tools/testing/selftests/ftrace/test.d/preemptirq/irqsoff_tracer.tc > @@ -17,7 +17,14 @@ unsup() { #msg > exit_unsupported > } > > -modprobe $MOD || unsup "$MOD module not available" > +unres() { #msg > + reset_tracer > + rmmod $MOD || true > + echo $1 > + exit_unresolved > +} > + > +modprobe $MOD || unres "$MOD module not available" > rmmod $MOD > > grep -q "preemptoff" available_tracers || unsup "preemptoff tracer not enabled" > -- > 2.7.4 -- Masami Hiramatsu