Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp942871lqp; Thu, 21 Mar 2024 23:59:02 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCW++6mdijRhZSQ+HsPVKN1g3EDyxV13MbM2ekFRneKL/xDidZA58XpHjqd0zp6nyZuHTNCWgtUUUTYa7gtxPygm6lvBzfcgskSEQfkM5g== X-Google-Smtp-Source: AGHT+IFSk3WaN7dkMV29+m/cqHmrznpXc6M7/yPxo3wXIU3Maj94zrB+in0W4ABRB5A/qFEhipIS X-Received: by 2002:a05:6214:d8d:b0:68f:cd87:be31 with SMTP id e13-20020a0562140d8d00b0068fcd87be31mr1869974qve.16.1711090742607; Thu, 21 Mar 2024 23:59:02 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711090742; cv=pass; d=google.com; s=arc-20160816; b=o8yUseEXG3ibybUWp7kKt7E37jY7+ymV2o3ZQqIVKegnW/br/hdQqFAbWf4fYFRkA+ T7lsmnW3KDNYlaaSAhRc00YfUlyBfs1rnSvKS4ebeLnl1vvizpy7CAKPBV0OncZWOjQx 5SwvabO8xmDjUGnMjOEbctbF5AqBYdjWwXCFipjPYrbjQLFeX9P4FpAoYw8ME/3eO2Uo XQOBrqzyWcoYcZia5/eSBbmqL/GsiLMMgIT7HuG4Zc+5sgM9HOeOPge2THaHvLmYTvOb FRdugitdGaRplBvJ1aWcvOCyN9D+EBufMZ7Tle3OGv50DVUKD7dFrOAh0fen90PxgWr9 OCCA== 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 :date:subject:cc:to:from; bh=qH2LgOs6HGP8lPbOIMOB4bsuglsWWackLGbg3Vw2ef8=; fh=Us/DORbzHj5XmgnBeJW+VlCBdo2pSXKHAejHonylCvY=; b=MvIxkNHRYpHYyn20CYANslVZK7Fr/eusVPO0fCuQDpSZHK2q8vzdW9nR+9tVTOlJxm FubqYfj1UdEth3d9VjDjZT/a7Ep6nkHNKntQEEEV9RaE/db0vTOHF5NtrRlJHpMnD1IW /bI9G/dqHCKh/Ar5aCwoemdpxMLPyy6dCr+QYN13YOnX3mholnE+drWKNDZl9xnzHHvk 6XkRo8bH09iuLBuItUdb5qykm4b4ufWwkPZdL8Oc/UgJhNZxjGr20KFAQrCd8HXELRk6 YZUOSGKrwjUDTzqT8O3EGiDByulDnHm7W3Tt2lsiOMiTqygPKijIb9+/zepk++NYdWxt dU+Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=huawei.com dmarc=pass fromdomain=huawei.com); spf=pass (google.com: domain of linux-kernel+bounces-111038-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-111038-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id c12-20020a05622a024c00b00430ea1a92d2si1353708qtx.619.2024.03.21.23.59.02 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Mar 2024 23:59:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-111038-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=huawei.com dmarc=pass fromdomain=huawei.com); spf=pass (google.com: domain of linux-kernel+bounces-111038-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-111038-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 5929E1C238EE for ; Fri, 22 Mar 2024 06:59:02 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 10F0810A35; Fri, 22 Mar 2024 06:58:57 +0000 (UTC) Received: from szxga03-in.huawei.com (szxga03-in.huawei.com [45.249.212.189]) (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 A8085B67D; Fri, 22 Mar 2024 06:58:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.249.212.189 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711090736; cv=none; b=Ql7AhIND5pmLGd4US6U3ysbm32bydJu95AOvWC5czw6Cgmvu+rN+7RH6FiQGsQo6CljgfSRLb8RkM8MbqN57Q041V+1lTRQ6P7lC/jBrlryZzbpMGA4VMkMK0dwqdebBcNj7YvPs5EGNCu5CctrTPFgCCpy6OjtCaz7WB1DeG0s= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711090736; c=relaxed/simple; bh=mm/LKOibx69xdWi9kZO3FwKzMXoZWR3O/2RiRcPvCZk=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=qbpb5Zc2MGqmgmhFYvEPBze1jO50XrWFq6SHxAdAQPdBTeAkNKM+AwT5hsbcqoWxjcMYIgZDaszTI/CEagcNxLyh0qU3b6oSTO9T9ACIp9fk45xOGGh/gsc6Qioz1VJLmyOUYGnzG9+qw6ZRzDS9vXjmFQ++k/uQuoUYqehw/Os= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com; spf=pass smtp.mailfrom=huawei.com; arc=none smtp.client-ip=45.249.212.189 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huawei.com Received: from mail.maildlp.com (unknown [172.19.163.48]) by szxga03-in.huawei.com (SkyGuard) with ESMTP id 4V1CPH5w44zNmJx; Fri, 22 Mar 2024 14:40:03 +0800 (CST) Received: from canpemm500010.china.huawei.com (unknown [7.192.105.118]) by mail.maildlp.com (Postfix) with ESMTPS id 1E5C018007A; Fri, 22 Mar 2024 14:41:59 +0800 (CST) Received: from huawei.com (10.175.127.227) by canpemm500010.china.huawei.com (7.192.105.118) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.35; Fri, 22 Mar 2024 14:41:58 +0800 From: Ye Bin To: , , , CC: , Subject: [PATCH v8 5/5] selftests/ftrace: add fprobe test cases for VFS type "%pd" and "%pD" Date: Fri, 22 Mar 2024 14:43:08 +0800 Message-ID: <20240322064308.284457-6-yebin10@huawei.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20240322064308.284457-1-yebin10@huawei.com> References: <20240322064308.284457-1-yebin10@huawei.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) To canpemm500010.china.huawei.com (7.192.105.118) This patch adds fprobe test cases for new print format type "%pd/%pD".The test cases test the following items: 1. Test "%pd" type for dput(); 2. 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/dynevent/fprobe_args_vfs.tc | 40 +++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 tools/testing/selftests/ftrace/test.d/dynevent/fprobe_args_vfs.tc diff --git a/tools/testing/selftests/ftrace/test.d/dynevent/fprobe_args_vfs.tc b/tools/testing/selftests/ftrace/test.d/dynevent/fprobe_args_vfs.tc new file mode 100644 index 000000000000..49a833bf334c --- /dev/null +++ b/tools/testing/selftests/ftrace/test.d/dynevent/fprobe_args_vfs.tc @@ -0,0 +1,40 @@ +#!/bin/sh +# SPDX-License-Identifier: GPL-2.0 +# description: Fprobe event VFS type argument +# requires: kprobe_events "%pd/%pD":README + +: "Test argument %pd with name for fprobe" +echo 'f:testprobe dput name=$arg1:%pd' > dynamic_events +echo 1 > events/fprobes/testprobe/enable +grep -q "1" events/fprobes/testprobe/enable +echo 0 > events/fprobes/testprobe/enable +grep "dput" trace | grep -q "enable" +echo "" > dynamic_events +echo "" > trace + +: "Test argument %pd without name for fprobe" +echo 'f:testprobe dput $arg1:%pd' > dynamic_events +echo 1 > events/fprobes/testprobe/enable +grep -q "1" events/fprobes/testprobe/enable +echo 0 > events/fprobes/testprobe/enable +grep "dput" trace | grep -q "enable" +echo "" > dynamic_events +echo "" > trace + +: "Test argument %pD with name for fprobe" +echo 'f:testprobe vfs_read name=$arg1:%pD' > dynamic_events +echo 1 > events/fprobes/testprobe/enable +grep -q "1" events/fprobes/testprobe/enable +echo 0 > events/fprobes/testprobe/enable +grep "vfs_read" trace | grep -q "enable" +echo "" > dynamic_events +echo "" > trace + +: "Test argument %pD without name for fprobe" +echo 'f:testprobe vfs_read $arg1:%pD' > dynamic_events +echo 1 > events/fprobes/testprobe/enable +grep -q "1" events/fprobes/testprobe/enable +echo 0 > events/fprobes/testprobe/enable +grep "vfs_read" trace | grep -q "enable" +echo "" > dynamic_events +echo "" > trace -- 2.31.1