Received: by 2002:a05:7412:a9a3:b0:f9:327e:43ab with SMTP id o35csp93848rdh; Mon, 18 Dec 2023 05:28:21 -0800 (PST) X-Google-Smtp-Source: AGHT+IEzB3Cma1VnEE87c55WZULPKxSNJ9R2ATRs5SODlsME4vlSDRr0QFWnjeCCgaKuBezuMusV X-Received: by 2002:a17:902:b946:b0:1d2:ecd9:9088 with SMTP id h6-20020a170902b94600b001d2ecd99088mr7420381pls.42.1702906101120; Mon, 18 Dec 2023 05:28:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702906101; cv=none; d=google.com; s=arc-20160816; b=YCcWMPxRsDmjHxfZefstDNkGAlaZMuWbsE7IfRL4TohGrYoCUYMlI8JcN3zdMHYx5s /bZ0JAvc7v4JyFLjJWz3F9BFdfosCN2SHBEBnCLOtVNAD4vqs6hL5UsBwE7y7Lcisska rHQG5WjKqE/q/HMeXdCtM2mRUGO4cGn4CeMTFIolIzuNUcbxCTOKhi54QDToFaX04klq RVdP/82VPqlFowMcy4OEvwYT6AyWpi1bnifCH5Yabxwbz7Kc/EIYSnUN3gv48Zx+f3si Zr7/q2SQXG+iakCbwineInAs3WZYaGvl+O+jSHp3z327quzuHH1tZX2g4Evmmvuirc3y osJw== ARC-Message-Signature: i=1; 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:user-agent:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=mV5TwTTFofo7Hr0MUgPsm9fSGisdc/rZSPC/dKdQApI=; fh=SIgps5XdV0XNwjZfT2uAI7g3mrspDldK9Qs8qQAfoa4=; b=scPsRmDzZ7z7awypSpgSqa8ZSze+M4lC7PGoyeo4AbCSUYwqudtZNNAl5j8YtuuHJO LSzWapp7Q9bqgcOZGV45KvTHLfYLKyrO3Ftypbz+loB/g1ySiaxxTwJh+9vmyNsqggNI c0GyIXrBqzmXTn5BdLFIaaGY935j/HztpI+XzdLHiFTCdZORLiTwHURlNjxqZKt4tyTk xAyBeKovnfxBq12y7nixyW5tDKHs6rmRjZzWs5WkDcyPnsRhMRBnYLIH2khFjvlP0zYE zWknXA1cj7L4uEb+3YQYNKizWJhbAGMwxZp2gQLUEPSpxK1e3BY05WV4vhZKqTBlyRYK Qz6A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=C5sMvP7G; spf=pass (google.com: domain of linux-kernel+bounces-3740-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-3740-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id x24-20020a170902821800b001d34d365654si9386406pln.464.2023.12.18.05.28.20 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Dec 2023 05:28:21 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-3740-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=C5sMvP7G; spf=pass (google.com: domain of linux-kernel+bounces-3740-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-3740-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 693A1285360 for ; Mon, 18 Dec 2023 13:26:46 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5ABAC5D739; Mon, 18 Dec 2023 13:18:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="C5sMvP7G" X-Original-To: linux-kernel@vger.kernel.org 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 2F26E5D734; Mon, 18 Dec 2023 13:18:18 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 03B41C433C7; Mon, 18 Dec 2023 13:18:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1702905498; bh=MTl3WOEWmkU7N1ZYT3IdZA3wW+cclx8nbkw1UKe91tQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=C5sMvP7GzPhDpLv5HGPZVn1ptGtLtDHxPBVO6CeONjM+v/2RkHN5lv7JVOVthg16s QciwQfRI/hWrFLhU/7/RZJ2qo8jTQS9rXdQIQMmUfsBDpN/KIS4OjkNuQoa4KVSjpX N7BTK4im3Zt2e/BAEVcHywmiI+kN4GSJ/U6CozaWD7QlW+qGFB9RH8VMt31K811Yog uJ6TodoE2V1QndnlQehkv+m7/v3k37xieS2zrGSBBcAcdXwCiN3OHgWiyLtuBBknCR EyB/4wPbWXjpLW+LdYhlWKSZS4uozfQ3mJsX+ruMWYr0JIXJw0nhatHcIuVpDMa2z2 oCyLzlT7NTdSA== 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 v5 33/34] selftests/ftrace: Add a test case for repeating register/unregister fprobe Date: Mon, 18 Dec 2023 22:18:12 +0900 Message-Id: <170290549204.220107.14299745424689402677.stgit@devnote2> X-Mailer: git-send-email 2.34.1 In-Reply-To: <170290509018.220107.1347127510564358608.stgit@devnote2> References: <170290509018.220107.1347127510564358608.stgit@devnote2> 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: 8bit 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