Received: by 2002:a89:413:0:b0:1fd:dba5:e537 with SMTP id m19csp952807lqs; Fri, 14 Jun 2024 10:08:34 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXR/9+bf+ykit4rk/VQG7qMz13P5LT5npS608OQt4/YJjaOd34I6Z0dAMtLzylWKE9l7EpimmaGF04RxIBeEAedHc5RWNZchL0XDMZuBA== X-Google-Smtp-Source: AGHT+IErxI7O3FozhDLaNKdih0SzGiNA8DT+7WAEMLIgwWeQ05y67JiQ/Vkarr4AtEj58OfGmHwA X-Received: by 2002:a17:90a:c086:b0:2c3:40b7:1f6d with SMTP id 98e67ed59e1d1-2c4da9cb711mr4350187a91.0.1718384914703; Fri, 14 Jun 2024 10:08:34 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718384914; cv=pass; d=google.com; s=arc-20160816; b=urJQZsb+i7FQ5XJl9iOMAP4v14dQZ7+0YWW2UbOSj99mo87qpMbyvP0YH0akFWWuPX 2p8E4PpCGdahxZA/W/ylowCH9OTA+SRDjezcPPugcDqaeHiQCS283Ye+BC95J0HjfypV abNfWy7t6OQ25ZjsFDkA2w0hOsoHjyyW1Q/hp9qbQsV5U0U+coDx+sRTLP32TXjn3B8R wzpIDpZIhhCKwHgGRdHsm7sDyozawFg8WLBPNE3nO68CvYBpMKBgjZCpZS3INTsvU7Sr ooaMjaUOBXqOO7wHROJg7VR/vWFH1R82b5GaFXgBX4t4nYk6l0TQ8bfeAOqsqXaW2VNN 96fg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :subject:cc:to:from:date; bh=ErMAP9dcH0SDHOgyoWuM1+MG+RrQeaxAmesXiCeMa1Y=; fh=nD5kxsbDKCZnqwjz9OyAylJDBKGDSN0etw6d49DpHKQ=; b=CtS1H2UIjmPOMjzVYf/SuSaIf+piTwnZxjWvz+5EswFxCT5Pf6nGdksFOIHTRTOJUY CcaoxydQEfGdeVTbIQEzxdVITwqC7mfhbfMVsRvwcVcRdeiGVGlbKKooyHHp3z+3/5AP iyN+lUetzhLcsNNX0zJszamcnOkx/YSvQ7wEW4Tjp4pZj2y6euFOB5lucs0/LObfuOJp NZw56EePU0jg718ZPt2nFEbBeNNeFGCd9xC5RJVX4MyzF8fXmbAjlLDVUM6NmMb6uTjM ku2xNJF5kB0u0SYNLKgnr+9BHltwoZPjN5I4D1JfdfgIfzOr4QLl5R1QUHAK5w+yVmHQ FFoQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-215288-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-215288-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id 98e67ed59e1d1-2c4c47b036esi4101973a91.165.2024.06.14.10.08.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Jun 2024 10:08:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-215288-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-215288-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-215288-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 55BDFB255C7 for ; Fri, 14 Jun 2024 16:43:34 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2A54F193091; Fri, 14 Jun 2024 16:43:26 +0000 (UTC) Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8BD6D181B91; Fri, 14 Jun 2024 16:43:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718383405; cv=none; b=hcrjxva/fwxfgr4uRsQY4wmZGoTfBV9md7JTNoMuVq2DuKUvIA0/iocPYXGyZQsW0yMFpD8T6Xm75PArQLrhWfM4PxGfg8ig/WL0vdYZNd4n007qdcAmAZ6siGis0aPQtGk5yHvKE28DjKH4nGaqPArS4Z8XaL+HRL90kt8wCaM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718383405; c=relaxed/simple; bh=jjK16E41dr1jwYKnMEUEtk5I3mLh25F5pNmx0OCJsxY=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=GVBjYXJV1wQ2VESIhP8uWLLipygj/VkPcE4Gux+jG5bULqLwZh5gKKjP3h7bG6y4G3hVQYuARAw1HsisNWYl4gSCLbKZMT8xr+ZO2hEL4W8vgMVbDMfU9Fo9kf87xA56jjit8PwuvXuKOuV1jN10Q95p3gUMD/kv/IbR8h3M6dU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1109AC2BD10; Fri, 14 Jun 2024 16:43:23 +0000 (UTC) Date: Fri, 14 Jun 2024 12:43:22 -0400 From: Steven Rostedt To: LKML , Linux trace kernel Cc: Masami Hiramatsu , Mathieu Desnoyers , Ingo Molnar , Shuah Khan , Shuah Khan , linux-kselftest@vger.kernel.org Subject: Re: [PATCH] selftests/ftrace: Fix test to handle both old and new kernels Message-ID: <20240614124322.36ad7652@rorschach.local.home> In-Reply-To: <20240515013620.098cb37a@rorschach.local.home> References: <20240515013620.098cb37a@rorschach.local.home> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-pc-linux-gnu) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Shuah, Can you take this through your tree? Thanks, -- Steve On Wed, 15 May 2024 01:36:20 -0400 Steven Rostedt wrote: > From: "Steven Rostedt (Google)" > > The function "scheduler_tick" was renamed to "sched_tick" and a selftest > that used that function for testing function trace filtering used that > function as part of the test. > > But the change causes it to fail when run on older kernels. As tests > should not fail on older kernels, add a check to see which name is > available before testing. > > Fixes: 86dd6c04ef9f2 ("sched/balancing: Rename scheduler_tick() => sched_tick()") > Signed-off-by: Steven Rostedt (Google) > --- > .../ftrace/test.d/ftrace/func_set_ftrace_file.tc | 9 ++++++++- > 1 file changed, 8 insertions(+), 1 deletion(-) > > diff --git a/tools/testing/selftests/ftrace/test.d/ftrace/func_set_ftrace_file.tc b/tools/testing/selftests/ftrace/test.d/ftrace/func_set_ftrace_file.tc > index 073a748b9380..263f6b798c85 100644 > --- a/tools/testing/selftests/ftrace/test.d/ftrace/func_set_ftrace_file.tc > +++ b/tools/testing/selftests/ftrace/test.d/ftrace/func_set_ftrace_file.tc > @@ -19,7 +19,14 @@ fail() { # mesg > > FILTER=set_ftrace_filter > FUNC1="schedule" > -FUNC2="sched_tick" > +if grep '^sched_tick\b' available_filter_functions; then > + FUNC2="sched_tick" > +elif grep '^scheduler_tick\b' available_filter_functions; then > + FUNC2="scheduler_tick" > +else > + exit_unresolved > +fi > + > > ALL_FUNCS="#### all functions enabled ####" >