Received: by 2002:a89:288:0:b0:1f7:eeee:6653 with SMTP id j8csp554620lqh; Tue, 7 May 2024 07:20:14 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWvpdCUC9kRU/bIiyyY1/S81y1SfGXVt5RccW9kjQVL01SZNc73E3jgBwt01CxRiLyyitqhgHzgOfnXCGwYqpCfVXPx+R6hhl9R5inGGg== X-Google-Smtp-Source: AGHT+IGd79Mi49o9tqkf0Y/7n315EQTtt0nF4SWTrCy9d5nSCm8zlPw2T8/s51/rzadCuLA8w/D7 X-Received: by 2002:a17:906:d8e:b0:a59:a431:a8d6 with SMTP id m14-20020a1709060d8e00b00a59a431a8d6mr2167328eji.38.1715091614219; Tue, 07 May 2024 07:20:14 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715091614; cv=pass; d=google.com; s=arc-20160816; b=0swKitiAHgUpqDxyE2sXCSLI836PEY6rLF7WHJcz3Cq78wQPSrqkzZGdiyW/stKAzH DgYy6bMd2XTEBMdXtHTsdtB5NE0knQpLBiEUJKDjv/e6neiNjVziSglC0X9JPMNtMaRv tIzA7cY/N3zYrtKMdYK1vfLiHDrUJf6Vfw6N9Jp84kOTibYo4yl0zmF34HGRVJZ2ZGMv CrDBZEPncn0M7QkDO2FsfyAdnuGdiPLeUFbqjjOd2cqIb9tANcXjAtNJFMcGutI+qULa ijsAcDyYee621wAR499oFHgB1czY74BBEaAD9YnRrCJESGgDk2VCeSruoXFImGvVIckW +4Tw== 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=SIgps5XdV0XNwjZfT2uAI7g3mrspDldK9Qs8qQAfoa4=; b=F5QjK1+nGDfPddEvhONXX2RapAeEUtjMXoLQIWztXn6ECJnBq5rqA/WS5lLZMOn5ce qDNwaj/IcFY3W+zlkrnJ9298kFX19kbVV6rJDavpg2jivCRPSYFuK+My/mId7/rYAU7K dNRWkDOCKR9UsPVNR9XoJd6WFKANW2w5n3FDmatDzGKAOIdBXqnmWE9h9p/IU43/jwn4 AUKoqe87xj/gEuSNo2sSSm4F0MvAjhqcrDvAehPrVoxSf+/F4MbiX+sVIYpMD3bSXuAR oWetpu5yVrJ/A2ERg/3iRu/PdMgV8vK2ovSsjuhH9w8ZLDJc86QAnLuznCDvY2C7psm5 0j1A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=nccRYUNM; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-171547-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-171547-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id dc19-20020a170906c7d300b00a59b1dabc13si3628625ejb.895.2024.05.07.07.20.14 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 May 2024 07:20:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-171547-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=nccRYUNM; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-171547-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-171547-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 am.mirrors.kernel.org (Postfix) with ESMTPS id EBCF91F24B4A for ; Tue, 7 May 2024 14:20:13 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 04D6B160785; Tue, 7 May 2024 14:14:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="nccRYUNM" 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 24952168AEB; Tue, 7 May 2024 14:14:45 +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=1715091286; cv=none; b=B110DYa/zNudWwwO2OHbPgF6/Qw5RpVq2yaxvKdm1ilQYwGimGS5pCzWhlktoXZ2A0VObLz+lm1ExZxD3dAbrG+iS3dvp5r4jetuQRVP9D9bo8ZBXjA7DrdYwqPulIlUo9pyVaJ/OT6I9NyoF4OIhKSLJpVR2OGp2tOFdkYrhyk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715091286; c=relaxed/simple; bh=MTl3WOEWmkU7N1ZYT3IdZA3wW+cclx8nbkw1UKe91tQ=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version:Content-Type; b=fGoDnCQZhdez1sQRfJI0rPx2J6RiO94s08VlwaQ0n3sHZz537E3Lrn9Uhdcv6xm58IXevEr8Vm+47Xwq3tkzygvn/88XO0BrjsJHdpDWBbKZcdo/q06pQzuEuq5QYK3+qVWQTI9Ltx5K/BkUWXZ5TjLkOtFXzHnP6T4jSofjejo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=nccRYUNM; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id B9059C2BBFC; Tue, 7 May 2024 14:14:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1715091285; bh=MTl3WOEWmkU7N1ZYT3IdZA3wW+cclx8nbkw1UKe91tQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nccRYUNMYZUZ3ckhZQmcKIkPsvCgS+nOneFgPacIUgstkic9K/TBxC1IM4y4tnSOe 8gc61EiYewJu+vgf+aiRX+xudIWOMV2o5GinxgqDoX8bn2iFRydvpje5XbPlaadkMS ymCY6w1bbUIgWCx3rDe5JCp7ucmSK1Xl03QXv0v7MKiZopeB2e8R4aY8aN5D8wBB9z H0jamH8RVKjPJuV3ccipji8yCHQQi9t5s+OKLePGakX41KdJK9V8eMmrLu76eubPMb zmCCveCi8E8PpeSW1E5ckY5Y4eY/lWqUIhSiqDKJUuUMLCLXuR346cSrwAqvw4GAHT SeVXUDNBxib3Q== 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 v10 34/36] selftests/ftrace: Add a test case for repeating register/unregister fprobe Date: Tue, 7 May 2024 23:14:39 +0900 Message-Id: <171509127938.162236.8886546199937190169.stgit@devnote2> X-Mailer: git-send-email 2.34.1 In-Reply-To: <171509088006.162236.7227326999861366050.stgit@devnote2> References: <171509088006.162236.7227326999861366050.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