Received: by 2002:a05:7412:2a8a:b0:fc:a2b0:25d7 with SMTP id u10csp349564rdh; Wed, 7 Feb 2024 06:41:04 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVG5moVIeQetnxJv8qZXEis2ioMAZUhq32CfzuuONBn8Jjbp1EUDgls9nE+/QFMjeJH3jVmoIJ3OS4oYuFbGbMBUIZllXIQOO1xGYlAHQ== X-Google-Smtp-Source: AGHT+IH97c49XAjVjkruARb0+sd25BGf8gOQDC/0ludWfQb2OGqv6ITmBgAdcvIjKGvwjAyPQxC9 X-Received: by 2002:a17:903:11d2:b0:1d9:bf90:2f1b with SMTP id q18-20020a17090311d200b001d9bf902f1bmr5569037plh.53.1707316863931; Wed, 07 Feb 2024 06:41:03 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707316863; cv=pass; d=google.com; s=arc-20160816; b=D5H58Hb6NK3TW7QIJNQfUXdJXPjXin6skVbBT3NgIXT84urld6TGMYuLwp6ju2l2td 96w4HaBa6rvgJofzZTAseBWciBzQgUWtZGAvZTYQFF8RFvU6W+WZzQGNtubhoe/m+HgS XQe3vkVPctdg1mTGkx7r4JjQNDOcP/ec1OtX2Kh9tPJpr/qGdzVz6yE+TbIS/cuDCKNq ySSoH9Yo55EEisZ1r46c4nTc69mV1VyJCsAEl5oCQT7j4/7OHwQFk74s7k5mJfKpSjs0 FbYXxa7ibKmG8pUN8K7kA5U+dxv73fDEuxHxAGKYFZ30hSmwmX0R6hoCNh6jqGBkY+Wy VjIw== 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=kEXQloK9MxeOQYoKBwgRfV2cnaObIH4QWVkdsKRq6ZM=; fh=UoNGhNC09s6M6bykUN3niZfjiX4BvBngbdY/CoWy0wY=; b=v5gdjwLQudqKI6CskX2pnoQtdKyGnmzduW0P/HIdxSM4kMKCzLV2yDuQyvVHeIkIy5 Ptrv2rEgc3ox4ELZXXu1Orie6FHw/k9xppIhCkAwyAhH22zzVyO7JtCNT5Cct7qP0yew zy+wN8hrdSwBKLlEPX5+dwqclTs/z712FmUxNp0HeQRJALvMOQ7k36fcjdcAGDR1PXVL 2gv6m6gSwaZMmA2CC7wlYNpuVkmkji9tkSztgi5J7kwVIUXypBXayFPEdQsDTRUWRXvV t8ydDMI0UQefLAX9MsqZL9A4ms+GaE23lAKlfzBaebJAtapGD3x06z9I2OG92o9T4see uuvQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=lmF5if72; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-56630-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-56630-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org X-Forwarded-Encrypted: i=2; AJvYcCWd8281ay5zXK1Msg54E5DVdXFa3YqT6olftSxZVt7z6Ut59MfOBRztHMoAhqkN0IdJlwUwxreEv8W5qZ4sZflEXgOl/wtSKaXEhhuXYw== Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id e18-20020a17090301d200b001d6f295bc53si1942074plh.204.2024.02.07.06.41.03 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Feb 2024 06:41:03 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-56630-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=lmF5if72; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-56630-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-56630-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 78B24281840 for ; Wed, 7 Feb 2024 14:39:50 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 39DF27E762; Wed, 7 Feb 2024 14:39:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="lmF5if72" 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 5A2737E76E; Wed, 7 Feb 2024 14:39:43 +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=1707316783; cv=none; b=uyE0WvtDhKIbDBxfEoFIueYdELeaFvJIyGx0oRsnLhSBWDWltjU2Ul/HT5fijvjkmXK9kIo2qc1yGHJoClTsElQSzt1yWBkP5KoBTK9lZjHUNW19MRJ6qbta+6i4QpXXai9cZAdMUiX4RlRvwOMZrfcp50+grpP8jgYSe4q4JTA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707316783; c=relaxed/simple; bh=5SO8XoghfEJ9kt6J0CSha+AoXUiz+7SvGnwmVDAyX6o=; h=Date:From:To:Cc:Subject:Message-Id:In-Reply-To:References: Mime-Version:Content-Type; b=AvZ3aIJVw/aBzqKqqpauxhS/A+TfUC0FHXxZ2WQk//PkQkCuSVRcyLOoqokycZLkMczmjC1TjxJwLGqcnn9q7rwJtdnTlVgLhaFwVlxu7KBVN5a4xWU5zWtsM+gRSQ1GEfFHXdXMucDC0Q67Th8lDs6GE+xl4je/rUx+EP9zUz4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=lmF5if72; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 81471C433C7; Wed, 7 Feb 2024 14:39:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1707316782; bh=5SO8XoghfEJ9kt6J0CSha+AoXUiz+7SvGnwmVDAyX6o=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=lmF5if72zIVb9Y4JuAHa5pZkhAIxphHTiU26VGqeK3WZRkr/tYp/AHreDIJ6nmqSD ZQyUIpgcDfNdybc4kfqUVCrchug8p87A2no1u/JxXirMYmj3e+lqpHGPRkgfZJRCyc 43uYujwS+00u7lnUrpSUf97bUVzFI9kGQWkOra4s5Ng+Y/4YrGB9FQfPJykYbCBBK2 ZHJvVmcNnkl7IEyGEuVoGaTtYS/lMrpReHGkQjM2Ew6wVVkfkXPtNsEST/oLRjAX1g zc5zdE2Z9pYItOKUBsnEk95Y+oAf5DBObdFB+gb6q8GRT6dH2rDCdI9iJhmEUsc849 uckld7W2zOzyQ== Date: Wed, 7 Feb 2024 23:39:39 +0900 From: Masami Hiramatsu (Google) To: Ye Bin Cc: , , , Subject: Re: [PATCH v5 7/8] selftests/ftrace: add kprobe test cases for VFS type "%pd" and "%pD" Message-Id: <20240207233939.0450962199e2f1fdd8655540@kernel.org> In-Reply-To: <20240125073923.2252057-8-yebin10@huawei.com> References: <20240125073923.2252057-1-yebin10@huawei.com> <20240125073923.2252057-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 On Thu, 25 Jan 2024 15:39:22 +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..cf0599b90f1a > --- /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 > + > +: "Test argument %pd/%pD in README" > +grep -q "%pd/%pD" README No. This means, if the kernel doesn't support %pd/%pD, this test fails. But the latest version of the ftracetest will be used for testing stable kernels (which will not support this feature). So you should make test returning 'unsupported' for that case. You can add a requirement as # requires: kprobe_events "%pd/%pD":README (e.g. tools/testing/selftests/ftrace/test.d/dynevent/eprobes_syntax_errors.tc) Thank you, > + > +: "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 > +echo 0 > events/kprobes/testprobe/enable > +grep "dput" trace | grep -q "enable" > +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)