Received: by 2002:ab2:620c:0:b0:1ef:ffd0:ce49 with SMTP id o12csp1278667lqt; Tue, 19 Mar 2024 20:28:35 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVxtY2rcYtUFhB11YG46kWgjklC31g6Dog9l19zrPikQ1q6nZrWLxdod0hxYYv86AX6x3TvzLcI+LD04XDB6bmoj/WnOzUC1A9a5YYzOw== X-Google-Smtp-Source: AGHT+IG1ISSc4otl4HOejoCZQLdRMCyJE9bCCsxqU14dynmQipHBWOoSfRJoEbqFauDZIfeMk68/ X-Received: by 2002:a05:6402:1f8c:b0:568:9b15:112e with SMTP id c12-20020a0564021f8c00b005689b15112emr11409206edc.19.1710905315569; Tue, 19 Mar 2024 20:28:35 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710905315; cv=pass; d=google.com; s=arc-20160816; b=Ehgf7tZMbHkamVKF3JMlMq2QvOAwNAuDYRJp4xP22zv62dcIiAMFNXw3L4cJ2yUKVD khMya3STZf6xYMZubDenPcs+3c6u9NzxtEcUWMGG3wC/F2wWPvbbMcgEgsy5qSCjxYkw 7N9S920gE+ZMvEbj9RppV6OULmUPxGMF8LRb6I/EKo8+YozE/ebw6PEND7PQ4yXvYbYU tBH3NDLshCyz5vaUSUjnl+1XQwR9RkAxSpY8HSwQtZqRHdzcx8dUWHjnlc4bWxYu6t/y 3xaHNNT6k9Tq0HXL4X45IoGFnq4iIVdAU2mtJe1Ku0jDtjqHoC2Jjv4dEkOBBp3awqen MuyA== 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:references:in-reply-to:message-id :subject:cc:to:from:date:dkim-signature; bh=uoh6CeO9CJ/TAWx4HGjhRgjw7kkBGNZVILn9s5G9yJE=; fh=Cg71qZKzR4YfOJF8hZF4uwq7cJbJuaEt0vZOj81Q828=; b=v+2KE8sTLQB9A9fctpZVpxJ+Zk5JQxYApTim2v5MFfW9TwpVMQCwjiNiaNSSMjuakY emXnkgMlIbV5+npp7qAvO5mQS8asvi8rGOWkH7HtUuPsK21Cy4+kHvgyg7Dbn8hlu+eV 2Y9m6q4uisX1XlwaXTbytYPyw/MODFC287/KQErRGBINlj6jfpAeUfl8fiRxoQHa3e8O G7JQBMh8hVaL1v0ox4LuM2KEC86j/H61FmZA0f1znwDi4RXKnkTGgbDVz1ZEpPof4Eq2 hwQ2MMXXUegiJfPYPYwYmiQxB7vXI/0dXM1yGN972wOzZ866Ka0sEIgtg71rk1W8ZvBy E1Xw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=aJW7Gk2e; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-108408-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-108408-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 g12-20020a056402090c00b00568b43c9e42si4700166edz.412.2024.03.19.20.28.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Mar 2024 20:28:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-108408-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=aJW7Gk2e; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-108408-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-108408-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 4E5351F23986 for ; Wed, 20 Mar 2024 03:28:35 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 917F711712; Wed, 20 Mar 2024 03:28:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="aJW7Gk2e" 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 B901E10A26; Wed, 20 Mar 2024 03:28:26 +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=1710905306; cv=none; b=WbsU9PYs3ONr+CpqDG3whnm14XjgrJgTKdFOocwrUUa5gFzpaLmyaPlZsCTiTeLpMdXs6E7j284x1h2vIj2UxWpmnjRs/hxFsFznBPGrn1qln1Q4zp+OkXUlpLubR0Slel2G5XzR2EGT9VA27BIDynR3CGfOLSPfuoIos/qHvEQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710905306; c=relaxed/simple; bh=Bd719awzmUDesPXDyzTkf/a6fUS4L0Q2LSPYF3fDvK0=; h=Date:From:To:Cc:Subject:Message-Id:In-Reply-To:References: Mime-Version:Content-Type; b=eLKTj9f9/rLYz/xLkxWB0EX3kjE3F76a49pUqtOzemDch5/0FbX/W8EyquG+MNcGTtnDo5xdUsTPFtyWdGmEvO+PP7NJa8FtWrJXq8eDzIZwuqxThlgLMZHFCrx3yjz1q64nr3mxPxLUl3rW9p9o+CFIpb8ID4fWZ5y55NKasGM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=aJW7Gk2e; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id A338AC433F1; Wed, 20 Mar 2024 03:28:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1710905306; bh=Bd719awzmUDesPXDyzTkf/a6fUS4L0Q2LSPYF3fDvK0=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=aJW7Gk2eCPGCyej4zpPE6W4UK56SX7SY3GpX7VuxAUfjE6eDeuXP60BwA77XlEOhP 7h060w/OYXg/DLqcMh3R8dj2ofxEwHVLDrSx9CHysIvmvti7UV1K4T1XRwptfve6kK Yq+ThzUfRNf9aCoH6yfEQYn0VLB/7c4PrywcLN2VHgUAIzZmxD6KgzA1vlFCfRc14w bqpViOzuMYA+FaGSxHqS45Lke9bZtHx83QeVraOsm55WDpwM/NpAI1yzsteScLtCK6 FtlZdilujzDH2wVkKSOHrFokxvHJE0TeY76xj6rO7Hug27e47d2NmNtOisF8fFmFuI XZ7tFtGPSZAdg== Date: Wed, 20 Mar 2024 12:28:22 +0900 From: Masami Hiramatsu (Google) To: Ye Bin Cc: , , , Subject: Re: [PATCH v6 7/8] selftests/ftrace: add kprobe test cases for VFS type "%pd" and "%pD" Message-Id: <20240320122822.50fd238753278798881464ae@kernel.org> In-Reply-To: <20240315065540.1181879-8-yebin10@huawei.com> References: <20240315065540.1181879-1-yebin10@huawei.com> <20240315065540.1181879-8-yebin10@huawei.com> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.33; x86_64-pc-linux-gnu) 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=US-ASCII Content-Transfer-Encoding: 7bit Hi Ye, Sorry for replying late. On Fri, 15 Mar 2024 14:55:39 +0800 Ye Bin wrote: > This patch adds test cases for new print format type "%pd/%pD".The test cases > test the following items: > 1. Test README if add "%pd/%pD" type; > 2. Test "%pd" type for dput(); > 3. Test "%pD" type for vfs_read(); > > This test case require enable CONFIG_HAVE_FUNCTION_ARG_ACCESS_API configuration. > > Signed-off-by: Ye Bin > --- > .../ftrace/test.d/kprobe/kprobe_args_vfs.tc | 43 +++++++++++++++++++ > 1 file changed, 43 insertions(+) > create mode 100644 tools/testing/selftests/ftrace/test.d/kprobe/kprobe_args_vfs.tc > > diff --git a/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_args_vfs.tc b/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_args_vfs.tc > new file mode 100644 > index 000000000000..8bea9a75a331 > --- /dev/null > +++ b/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_args_vfs.tc > @@ -0,0 +1,43 @@ > +#!/bin/sh > +# SPDX-License-Identifier: GPL-2.0 > +# description: Kprobe event VFS type argument > +# requires: kprobe_events "%pd/%pD":README > + > +: "Test argument %pd/%pD in README" > +grep -q "%pd/%pD" README If you put this check in "# requires" line, you don't need to check it again. > + > +: "Test argument %pd with name" > +echo 'p:testprobe dput name=$arg1:%pd' > kprobe_events > +echo 1 > events/kprobes/testprobe/enable > +grep -q "1" events/kprobes/testprobe/enable So accessing "enable" file here, > +echo 0 > events/kprobes/testprobe/enable > +grep "dput" trace | grep -q "enable" and check it. OK, the test case itself looks good to me. Thanks, > +echo "" > kprobe_events > +echo "" > trace > + > +: "Test argument %pd without name" > +echo 'p:testprobe dput $arg1:%pd' > kprobe_events > +echo 1 > events/kprobes/testprobe/enable > +grep -q "1" events/kprobes/testprobe/enable > +echo 0 > events/kprobes/testprobe/enable > +grep "dput" trace | grep -q "enable" > +echo "" > kprobe_events > +echo "" > trace > + > +: "Test argument %pD with name" > +echo 'p:testprobe vfs_read name=$arg1:%pD' > kprobe_events > +echo 1 > events/kprobes/testprobe/enable > +grep -q "1" events/kprobes/testprobe/enable > +echo 0 > events/kprobes/testprobe/enable > +grep "vfs_read" trace | grep -q "enable" > +echo "" > kprobe_events > +echo "" > trace > + > +: "Test argument %pD without name" > +echo 'p:testprobe vfs_read $arg1:%pD' > kprobe_events > +echo 1 > events/kprobes/testprobe/enable > +grep -q "1" events/kprobes/testprobe/enable > +echo 0 > events/kprobes/testprobe/enable > +grep "vfs_read" trace | grep -q "enable" > +echo "" > kprobe_events > +echo "" > trace > -- > 2.31.1 > -- Masami Hiramatsu (Google)