From patchwork Sun Aug 18 12:51:01 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Masami Hiramatsu (Google)" X-Patchwork-Id: 13767418 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 BA5877604F; Sun, 18 Aug 2024 12:51:06 +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=1723985466; cv=none; b=Xjk6Yj1dPZuw6S5El3aOQVkW/N1vf+k7Pg+k/xr3ukKO0KPhduhzjkVjSGWw/R/S45Q0MbdLI9OyszRmpOxbu+TAxukNlfie3QJAkGkKG3QGsSbdGXaKD75EzaSBzCMIHkLxygbiSxFyhw+p/a6bybR703Gn32vngJfgqjcSK5E= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723985466; c=relaxed/simple; bh=MTl3WOEWmkU7N1ZYT3IdZA3wW+cclx8nbkw1UKe91tQ=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version:Content-Type; b=lp18CUeG0FwK2atI75tsdM6XC2o4t9bPhnOoK1YzzGsTCEOd0Op94zodObf+VCpwDfVQXn5NF3WedeFB/xi6xO1a/OPkQQKYBDKhuJ0lbVkuK5XJ1Lu7dL2NwEjtN5itowDbiIh319ZfRr98BSw3LKkQNRDqJZ8G3VkjSt6mgL4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=EonjtNI6; 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="EonjtNI6" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 26B06C32786; Sun, 18 Aug 2024 12:51:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1723985466; bh=MTl3WOEWmkU7N1ZYT3IdZA3wW+cclx8nbkw1UKe91tQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=EonjtNI6s9XF1U1HrpSAhvfQqTsL4B78EDJqtucy3LyG0xyoGIFR6JNYZ5iRi7sPN YV1MGJS/z1/FTXOK4bMJ/EAs/gx1E0+zp8XiDZELixCem3c7OfUemWdiFOgfAJvECx UkcPA7bgc7mRZKJ3oIs4FTL2K+IxkQqP60RN9xnEEIjA+FfmilVvtzCwZ6kJSb+uk5 6cNwHEjsZRH7q03oA6+M/yFGFnYbckwG3eRuX4/06HxoAxfVJqOmRD1zF96XE6vB+b SPUU4wWVPcOTCJroin5euIr/Re5BZ8XrAeCoGphgUnm+v2LguErGCl9dcMKSFnB666 dXrp+LC9U+PcQ== From: "Masami Hiramatsu (Google)" To: Alexei Starovoitov , Steven Rostedt , Florent Revest Cc: linux-trace-kernel@vger.kernel.org, LKML , Martin KaFai Lau , bpf , Sven Schnelle , Alexei Starovoitov , Jiri Olsa , Arnaldo Carvalho de Melo , Daniel Borkmann , Alan Maguire , Mark Rutland , Peter Zijlstra , Thomas Gleixner , Guo Ren Subject: [PATCH v13 18/20] selftests/ftrace: Add a test case for repeating register/unregister fprobe Date: Sun, 18 Aug 2024 21:51:01 +0900 Message-Id: <172398546115.293426.3819835460896690383.stgit@devnote2> X-Mailer: git-send-email 2.34.1 In-Reply-To: <172398527264.293426.2050093948411376857.stgit@devnote2> References: <172398527264.293426.2050093948411376857.stgit@devnote2> User-Agent: StGit/0.19 Precedence: bulk X-Mailing-List: bpf@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Masami Hiramatsu (Google) This test case repeats define and undefine the fprobe dynamic event to ensure that the fprobe does not cause any issue with such operations. Signed-off-by: Masami Hiramatsu (Google) --- .../test.d/dynevent/add_remove_fprobe_repeat.tc | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 tools/testing/selftests/ftrace/test.d/dynevent/add_remove_fprobe_repeat.tc diff --git a/tools/testing/selftests/ftrace/test.d/dynevent/add_remove_fprobe_repeat.tc b/tools/testing/selftests/ftrace/test.d/dynevent/add_remove_fprobe_repeat.tc new file mode 100644 index 000000000000..b4ad09237e2a --- /dev/null +++ b/tools/testing/selftests/ftrace/test.d/dynevent/add_remove_fprobe_repeat.tc @@ -0,0 +1,19 @@ +#!/bin/sh +# SPDX-License-Identifier: GPL-2.0 +# description: Generic dynamic event - Repeating add/remove fprobe events +# requires: dynamic_events "f[:[/][]] [%return] []":README + +echo 0 > events/enable +echo > dynamic_events + +PLACE=$FUNCTION_FORK +REPEAT_TIMES=64 + +for i in `seq 1 $REPEAT_TIMES`; do + echo "f:myevent $PLACE" >> dynamic_events + grep -q myevent dynamic_events + test -d events/fprobes/myevent + echo > dynamic_events +done + +clear_trace