From patchwork Thu Sep 12 15:11:16 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: 13802289 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 11AD71BF32D; Thu, 12 Sep 2024 15:11:22 +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=1726153883; cv=none; b=gBKSO/VBzTXD0dVBKELqA/loDlYHXX+6BsFKKlrvj6V7nvXcHVW9AnLNt/w/LAIoPz5sVsHKGBA+i3RZqbfAIa50twxdqkGi4hL1FpGZ1di/l53zk4Lb/tND5UW7ctE2BqUn2wm0sKYxaiXSToBR4lwAamApvQ0aqS0fbclQ65A= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1726153883; c=relaxed/simple; bh=MTl3WOEWmkU7N1ZYT3IdZA3wW+cclx8nbkw1UKe91tQ=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version:Content-Type; b=Q3ICuAOSAsZaE8EO0xJabvO26Ka3XN4EIxS1qFoyT1IOQ6OLJZxguqjroj/msQbZe/JIxkgbsyI1jSj6DbhUO2LiOsGy7XYkcsQdr9gybUSnq/mj1mDJ4rrf8OQQMC90gulkJCvtZrm1HB4o6es6EcoqhoWJV5bArXHUZuBS5Mk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=uqnn4FmR; 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="uqnn4FmR" Received: by smtp.kernel.org (Postfix) with ESMTPSA id C988DC4CEC4; Thu, 12 Sep 2024 15:11:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1726153882; bh=MTl3WOEWmkU7N1ZYT3IdZA3wW+cclx8nbkw1UKe91tQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=uqnn4FmRoJUedhxoTlHcGh+zyGDWSgl34W2JvKsn8mTaI1OZA1oPZnAkMJ6MeeYf3 niJhj5uwlAAJZwnVL9tJyt26VtLgoBaVCsuu+sXikkwrN7ZGfQhgMVyinsG0rNGusn hN41KnvfrPniyKk8MixOgrOx/my7IMUTIY11N1GK9imM6iS7ZpAYi9mQy3A+RnHaYc sd9z2G9r1OHaMCH82IXR+6GqilrjSsSusb9wBHlfiGxlSNAS7YYWu+eFZ2507rP/+z EE40BUzsw9BzSsrpxQxiD+yXDHxmIR+0GOkFcSYuCdSRmMxhke8/Olq4BXZKgY/+wM cw4RqYT+MShfw== 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 , linux-arch@vger.kernel.org Subject: [PATCH v14 17/19] selftests/ftrace: Add a test case for repeating register/unregister fprobe Date: Fri, 13 Sep 2024 00:11:16 +0900 Message-Id: <172615387611.133222.8393926311847438879.stgit@devnote2> X-Mailer: git-send-email 2.34.1 In-Reply-To: <172615368656.133222.2336770908714920670.stgit@devnote2> References: <172615368656.133222.2336770908714920670.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