From nobody Sun Feb 8 15:58:42 2026 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 E05A9316918; Wed, 12 Nov 2025 13:13:05 +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=1762953186; cv=none; b=EjzyOhOgwrd8dpK0rhLjPZoNYD/lS8v7HqFYr2YOPxvhyovwSBNHfJrIaJi1JLWmBrjLnWyrnbZHMCpNgGmK9U6AoSyfFGjltxxJDokAml6wHLvfId2ykYWhqngBk6giL4D7taZFoA23C0ewiLn1tKCEE2jcnEdrv5NcjX+8MNM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762953186; c=relaxed/simple; bh=5BhmBWD+wfd+rrYTRM3269jsfIet1SdsHS2RmPQvEiQ=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type; b=h8BBAaOFDjZgzYWsDFxVZkEQHAd/JFQbKOAzBKpv/2fA5sHb50HlUNz0GWkoRku4L+3EBXrbxIgQWlb3dZ7YYyNgyh9ODmWORz/PQJEN8ZW+M22JJ3RySz76T5hmEClVcjdphFgccAGwYc3T2IQ3wi5lmW3R4r7cXctuFzeQHiI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=W0IDz1zZ; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="W0IDz1zZ" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8F9F2C4AF09; Wed, 12 Nov 2025 13:13:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1762953185; bh=5BhmBWD+wfd+rrYTRM3269jsfIet1SdsHS2RmPQvEiQ=; h=From:To:Cc:Subject:Date:From; b=W0IDz1zZpv/yynyI6FVqH5D3A1X74SUZjfiabCXC8eQ349BnzxsnTTVxV2jTwoMAl vmZ9oSJE3MfGx/iS2mKvGxhtB6hITyvrJiN5C4spPgVlaGIS8SSQ1oitrM5LWDi+vq H7uRPGnsvw5cmv2gTihxIlfBTbcOMg38ae56E3pXSWv/mLeji8vbENQEfdpNo26o6l RuvqXFR+yofoBkpOj54dX48MThX4IuQtivzau738o8EYeYMzVxCYbp5TX0Z/vFmvJH 9fwp5QPuklnxpaNedHnYe+kD2gCjw6bjAYJSL/6ZStVGRYVqrvhL1V/VwRCnUhS524 l5MRqJInZTeoQ== From: "Masami Hiramatsu (Google)" To: Steven Rostedt , Masami Hiramatsu , Shuah Khan , Heiko Carstens Cc: Mathieu Desnoyers , linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org Subject: [PATCH] selftests: tracing: Update fprobe selftest for ftrace based fprobe Date: Wed, 12 Nov 2025 22:13:01 +0900 Message-ID: <176295318112.431538.11780280333728368327.stgit@devnote2> X-Mailer: git-send-email 2.43.0 User-Agent: StGit/0.19 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="utf-8" Content-Transfer-Encoding: quoted-printable From: Masami Hiramatsu (Google) Since the ftrace fprobe is both fgraph and ftrace based implemented, the selftest needs to be updated. This does not count the actual number of lines, but just check the differences. Signed-off-by: Masami Hiramatsu (Google) --- .../ftrace/test.d/dynevent/add_remove_fprobe.tc | 18 ++++------------= -- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/tools/testing/selftests/ftrace/test.d/dynevent/add_remove_fpro= be.tc b/tools/testing/selftests/ftrace/test.d/dynevent/add_remove_fprobe.tc index 2506f464811b..47067a5e3cb0 100644 --- a/tools/testing/selftests/ftrace/test.d/dynevent/add_remove_fprobe.tc +++ b/tools/testing/selftests/ftrace/test.d/dynevent/add_remove_fprobe.tc @@ -28,25 +28,21 @@ test -d events/fprobes/myevent1 test -d events/fprobes/myevent2 =20 echo 1 > events/fprobes/myevent1/enable -# Make sure the event is attached and is the only one +# Make sure the event is attached. grep -q $PLACE enabled_functions cnt=3D`cat enabled_functions | wc -l` -if [ $cnt -ne $((ocnt + 1)) ]; then +if [ $cnt -eq $ocnt ]; then exit_fail fi =20 echo 1 > events/fprobes/myevent2/enable -# It should till be the only attached function -cnt=3D`cat enabled_functions | wc -l` -if [ $cnt -ne $((ocnt + 1)) ]; then - exit_fail -fi +cnt2=3D`cat enabled_functions | wc -l` =20 echo 1 > events/fprobes/myevent3/enable # If the function is different, the attached function should be increased grep -q $PLACE2 enabled_functions cnt=3D`cat enabled_functions | wc -l` -if [ $cnt -ne $((ocnt + 2)) ]; then +if [ $cnt -eq $cnt2 ]; then exit_fail fi =20 @@ -56,12 +52,6 @@ echo "-:myevent2" >> dynamic_events grep -q myevent1 dynamic_events ! grep -q myevent2 dynamic_events =20 -# should still have 2 left -cnt=3D`cat enabled_functions | wc -l` -if [ $cnt -ne $((ocnt + 2)) ]; then - exit_fail -fi - echo 0 > events/fprobes/enable echo > dynamic_events