Received: by 2002:a05:7412:e794:b0:fa:551:50a7 with SMTP id o20csp2199036rdd; Fri, 12 Jan 2024 02:22:35 -0800 (PST) X-Google-Smtp-Source: AGHT+IGLED8Q11TN4wS/qSlShMO9w4iIoLC6D0B8/AekCZsjxP0dIvojO1BnscnCt2jZZI/NSr/H X-Received: by 2002:a17:903:41d1:b0:1d4:b4b8:90c3 with SMTP id u17-20020a17090341d100b001d4b4b890c3mr1230179ple.6.1705054954787; Fri, 12 Jan 2024 02:22:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1705054954; cv=none; d=google.com; s=arc-20160816; b=Fd7Afpw+YQcTR3A9D/KnwVokyCzAU6jg2eoghGSt3f5MIzxD1lwnAC2+zNhKLXraK6 1LpxrgVSwRA5VjvRARZlXfTdatouqsRjuRWpoQ/DvwCLHxBaSd+cI9oNSypwJjjKCEL6 j/O4APIquKs5vwjxj12GKrQ9+cLZxkJ53yd+OnTSAlQOfQZJ/wjJNSg0JjzoGYFcqDM8 MCJsCG5JrgS0bCFK6OezxlyRK4MfBAQYDsjxoV11kK0Oc4UEe1EmBh8rGOyM4AyeqaHQ wJBuguWROVXoDm6+sGhspjcNmudPpuYMfxDIwWRRbsWcedAet/2ZDOIOLRsyNdFj1Vyi GDZw== 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=VVMW+FNO4ORlp12TFF5CeGrHLFcAz7hEhNL/AZgsgruls/+hRKhHvbCmQarND6yl6I GaPhst8WyMUuJNjtt1B6L5BQvm6ukeiE6yCoIGjZ7YQKVQBqEa3zr+OYSJ+E9/ltWoTE Zk+8sCSIEIG6oS4/OWEzmbrh9t1Tdg9Jfy+KyPxbsnnRDRd0mZazFFDpJt40da/09qpr MGv0kwxj1hlpUsEYdhNCrz5xtKj5eryHrNE/D/n30b95mnwg4Ucfknoq9WQVmuPxihVR MJk/+wZHzcNwkUTGSn8e+QY/bXf2M1NqgISsXsd+MIlBIoEzqPtkRPv7385xSNsGZ4X+ aezQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=csJkroGg; spf=pass (google.com: domain of linux-kernel+bounces-24584-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-24584-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. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id p20-20020a170902b09400b001d54c615dd6si2949244plr.154.2024.01.12.02.22.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Jan 2024 02:22:34 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-24584-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=csJkroGg; spf=pass (google.com: domain of linux-kernel+bounces-24584-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-24584-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 6C07A28F8CA for ; Fri, 12 Jan 2024 10:22:34 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 224A2627FD; Fri, 12 Jan 2024 10:17:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="csJkroGg" 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 4F1ED67E63; Fri, 12 Jan 2024 10:17:47 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3F329C433C7; Fri, 12 Jan 2024 10:17:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1705054666; bh=MTl3WOEWmkU7N1ZYT3IdZA3wW+cclx8nbkw1UKe91tQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=csJkroGgBq1azwpb1XOb9cRStOMc4Q/al//mb/AMOWptfL9RsQRqpDzr+DYCpwg2g P5julnK6EjveKGaVzDmqg+pBEex5n5lCKh9R3oevfXqiloSUI7UrFHzzbLz+YPtSMN spsTXCGu8jK8id08AomrpJCyRI12fpNCtWJINYaw/AiarZ7jwdq48eRCZIwomD/sai 0d8ZXS2SqhuRmq5r3uK2bf7v5YIX++WiaCbgeKkIurURyRyHhARSO/Tf18yGKncin4 i2J6Wq52XWSq6kx1iQdQcUk+pXsdnAIyuPFY6WKHje4CaiLHyGQlre1bsFNZez3zs3 nT5QnA9x6StcA== 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 v6 35/36] selftests/ftrace: Add a test case for repeating register/unregister fprobe Date: Fri, 12 Jan 2024 19:17:41 +0900 Message-Id: <170505466094.459169.2134061568012803420.stgit@devnote2> X-Mailer: git-send-email 2.34.1 In-Reply-To: <170505424954.459169.10630626365737237288.stgit@devnote2> References: <170505424954.459169.10630626365737237288.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