From patchwork Tue Feb 6 15:13:58 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: 197507 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:168b:b0:106:860b:bbdd with SMTP id ma11csp1614263dyb; Tue, 6 Feb 2024 07:23:16 -0800 (PST) X-Google-Smtp-Source: AGHT+IGal3TKSYvmWujoPCBeSDUmB2rc7kkuNfRliKArXcTIXdmhLl7dkNhBzbG/Ej6BFyPoFPr/ X-Received: by 2002:a17:902:c115:b0:1d9:5934:ad7f with SMTP id 21-20020a170902c11500b001d95934ad7fmr1753237pli.29.1707232996101; Tue, 06 Feb 2024 07:23:16 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707232996; cv=pass; d=google.com; s=arc-20160816; b=uesNxu9ykeN4F27GrRV8tEHvM51JdG0Mga857DVAo4IfLOL0zn9NKVDYHcqfo8skpR W2G7zCZCAWaIetGO00UIEFlTz4dUBDciQaswwskMs5ByyOEr4gr/GZ+JORk0pNHAcu0Q i6bG4vXjgYoMmrhd3Lpd33R8EpdvbrDHuQAaUTgyBJDN+3batUCBhUe3DiKxAYKtHv6b GJrfqoDwhipE1/kthRha8LH7BKg+B+fVRDoJqZ1exBYQrR2Hy6JdHKwEMnnlqT57ZM1L 6CFp08COEG10nCwCAf7GBW1wroUPND9tuXQ9YUXfAgfwCx9AVgtFyAh+O2FVWLOEIkmH Fp4Q== 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=XPGcKBVPmC7SNeDie9JiXZCU+nF81dTFuLYSohFAvSQ=; b=Mbsm5f8hcL9Bt21hb8FVX1BkcQJP2ImmcmzRlfh8rMpTPAaNYWAWVMKP7NEpbOlwyv rrVApzIaqojgfavOGRORzAYPxRUZgjeXTrpNhB2h1EZz2VC2pNYWWOsrJLO6dfGUiK47 3V6pvJqXK3NL5NO3XAoto2mAhvJ0STxNlXUPibPUVrJvIg2J6oR66zMkM/kVLce3K8t6 WsbTdQ3IjuHoZXUV/CYYOQ/xpeijrkzAsqQ20fHp0cOyU3pTMHk0mpi0IV4f5FfS/sYz Q79er4ytn4qv5cd8Ei5m3q7dvJLvrCdyMAA6/LtGWG2HXnDLpV8k0cl7xovJDqnjSBY2 RklA==; 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-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-55221-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org X-Forwarded-Encrypted: i=1; AJvYcCVFvqf86C7JyxzdOA/bFu2yyK2QMX7buGf4IaGVEslyvoZWmyBLNMRqwE1Af0W3JmXE+8j2TLfWf4adI8a+IWZ8ag9AnQ== Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id h6-20020a170902f7c600b001d8dba2d29asi1809001plw.22.2024.02.06.07.23.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Feb 2024 07:23:16 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-55221-ouuuleilei=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=u5wpmdya; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-55221-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-55221-ouuuleilei=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 DAE532914D8 for ; Tue, 6 Feb 2024 15:23:15 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A65BC13D4F1; Tue, 6 Feb 2024 15:14:07 +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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790163546173663220 X-GMAIL-MSGID: 1790163546173663220 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