Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp3127848rdb; Tue, 6 Feb 2024 07:57:39 -0800 (PST) X-Google-Smtp-Source: AGHT+IGbj2wO6qGYpDPet0bvqb73dPkoU0KC2cklHP8I8vgSTeEYZ50FgzwwIe9tuTS/0mjVOcHE X-Received: by 2002:a05:6a20:8e23:b0:19c:b4f1:596f with SMTP id y35-20020a056a208e2300b0019cb4f1596fmr2266329pzj.22.1707235059189; Tue, 06 Feb 2024 07:57:39 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707235059; cv=pass; d=google.com; s=arc-20160816; b=ygBMXFek7OYy88mRlF8sdidXgw2Jm6qoN5/MHHYCJv5TpLhzqNYQZJtLGPNeH7RCQ1 yCSbb2LF/qimytN7YgazAIauumexHr2GBcQnQ+nzLYSrSoG6++d6dr/zytoSyV29nojO Beo+Gy5fg59kbg521cQXaqFI+ikW3Ugr3HUIhIeP0FcifIyg0Wk+cW8JdW+fkVYoyAPv NgNG29nfy50e8RSPBnuS700rJI4WyXEUHdY9FyRmCt0inJMbolTQ32YyLWwQOK4HjCpc pEGaxgPye2FikdO8Qaeu8iynp130k/aO8eG2OzNLn4ZcREU3c5Ym1Zh3jG6TPOhx4rzr wunw== 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:user-agent:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=mV5TwTTFofo7Hr0MUgPsm9fSGisdc/rZSPC/dKdQApI=; fh=i1r9UDBgG3sYohs4/JIZigplxl4bPIsMP8U2s/RJ9X0=; b=ECfSpGeIpj9XK5Onp6Cj3zOAPtuzDB6TaQjRLIE7pOvX/IjmptfYuChcke13lqS18l +LtSCpA55uBm+Z3iAcIVn1kqqdiZXZ/UNgvuiFcOwJIIoDYL01xAKXDZOnsUwmmqvVzS BbEAHyRnSXtyUsH1PM+kO/avcpSHl3MSuD41XhsY6DZ7FUBmgUhhNwg5ttD/DdnRT+/s YIbNnT02tQMZ7T1l4Ai8KlWJ84rkn4WM2/fHjel56mKTCa44MjlYnyYJ6N9ovpbo5OSu 1f/9yX0w09cA33DyYVPFK4d3wYzVqkaVsNwuI9ZWndrUUYRYHmb0rJegUBEaWeLNfLs4 PpcA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=u5wpmdya; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-55221-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-55221-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org X-Forwarded-Encrypted: i=1; AJvYcCUXdkj5FAW8rCrwi1eQCkqeZifqQbj+m4HPa5X7aIPEtQFjU/2B53coAXAxuGAwg+yhxBQF6N7ZzYy7fsV8PzXF376ATvItzeR2+iNGLw== Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id a12-20020a631a0c000000b005dc1a0a9860si1836218pga.269.2024.02.06.07.57.38 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Feb 2024 07:57:39 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-55221-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=u5wpmdya; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-55221-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-55221-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id C4EB1B240FC for ; Tue, 6 Feb 2024 15:23:08 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D8EDC134CD7; Tue, 6 Feb 2024 15:14:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="u5wpmdya" 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 0A31F13665D; Tue, 6 Feb 2024 15:14: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=1707232445; cv=none; b=g78jd08lTn+sf2JkubVWD22v2HW3Cv/nOmBvUINNJjWqxdJ4EXsmZlA8+H+DAmge36wR4PKlUWma5q0e8gDfvbpWHu53AH5b+zAhIFPkrtCqt/1jjoVA5SEGJwcsm1VYrP4H3tIaZhn+3CQIkzStAGCOMqNdhv+hC9bjr3DJITU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707232445; c=relaxed/simple; bh=MTl3WOEWmkU7N1ZYT3IdZA3wW+cclx8nbkw1UKe91tQ=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version:Content-Type; b=outArACtuycZSlEvzRAQaCTaEjhycXhZMUyB5Yji50PqX7FXuG31Qy/Cv+gndK0Ssjohgcpcc9PPw3kseLqgpn4LpQxgV7ooCRalrxyIxw1AbBdhXGuZ8dPAn/U2ceBFLK5FwxSSOjTtV5ytXGmPeUcnlIzm91j0AiLqPDVJ0b8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=u5wpmdya; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 20024C433F1; Tue, 6 Feb 2024 15:14:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1707232444; bh=MTl3WOEWmkU7N1ZYT3IdZA3wW+cclx8nbkw1UKe91tQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=u5wpmdyaGXwrtkPli2doQMGJemTKJgn1aQaqSl3zgtbMeQ6KbP7eRwMcaIMLfHCWO ObIksb/42fVqgUWuTTeUGnGXhYau30D7aL9PR9T++ff/AXL6lueUA5oiN8ymWd/eQt P8DdIIfygMlg8hfJbYEf9HKAPSmIKQkC5lRUcynLM81GDgWxKP43ZBCTkIMZ3id+P+ M/sVgnr3rwlzFFUHK3/ZeYHucAxRoKem0ZQaIGkauYfjHlvY/ZvEdviR8vuMuvmKej DC/DsOVqvGd/5yFon0ur91iFEnFMxquijASYt0eNAX9TTDBIalIbrKpsNbQXbYORhp z+qsTm/tZdwrw== 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 v7 35/36] selftests/ftrace: Add a test case for repeating register/unregister fprobe Date: Wed, 7 Feb 2024 00:13:58 +0900 Message-Id: <170723243869.502590.8138799732080228760.stgit@devnote2> X-Mailer: git-send-email 2.34.1 In-Reply-To: <170723204881.502590.11906735097521170661.stgit@devnote2> References: <170723204881.502590.11906735097521170661.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