From patchwork Thu Jun 1 09:00:13 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ajay Kaher X-Patchwork-Id: 13263191 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D8880C7EE2A for ; Thu, 1 Jun 2023 09:02:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232557AbjFAJCd (ORCPT ); Thu, 1 Jun 2023 05:02:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57440 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232540AbjFAJCR (ORCPT ); Thu, 1 Jun 2023 05:02:17 -0400 Received: from DM4PR02CU002.outbound.protection.outlook.com (mail-centralusazon11013010.outbound.protection.outlook.com [52.101.64.10]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A69BF192; Thu, 1 Jun 2023 02:01:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BW9rSuoVZzQ56h1txT6VWGrd6OW89vz4ypTBxmWqA7c48jSZBKKJSYo5ExOYEMnqQgLQw5YXN69gdrnVmKYIQLRGRS7UIiI6GeQZWsmBcVS+kGlrefgz39CS1/jdwJIrVGh3ZQPt1MociHszbLS2QhrcG1fR5O+EL5t9R2fUQS1jwxfpbsh2XsbPuBqSSl4dch8TM/sxjSoYyNv+91Z+/XZsXWm7lh3zoiRyARvxN1rp99dCfFobpC+gGT/bKDj0gwfp3FkUGkU1rKvOaaKm9Anzw0iCsY5iyR1MoW1EPxxz0dk2liHpZhnk9GVGcp3qfNIRuk1mo7LIe9Kl014vdg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=H9bnRNg1BLztg/RndOvyjdrwv2dOtmc68BkZNs0p/m8=; b=FQgYYjhmT1a5zXp8Vk+pxe/JXwWshZAj9rCLMTDLCd97Vkn2xdDRqlSILXUCEcJ8pDhfQeothu08zyeu470NKSbJFBS3LJXISfNb0z+SPTsQ1d4lUXN/eNU+9VxNTRv1R3s61SbrC6uoCRp+uAqz49WnJVAlAmUNX/uw847heo8WIkC727UMpsdo432qbInaAs5WxTCuPzEYEZ6vhGs3DRapLfXnX5jxQkcA5/6nWBQj8h++ia3osU5+2yOVz+K+t0C96VTPAu7pfozcucYQVkt2atBYnQ90dWuwXnmO4wPeqocJ1okwMEMInEGsm1ZHLGPyjHEYbxEvkaHXt4oQCQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=vmware.com; dmarc=pass action=none header.from=vmware.com; dkim=pass header.d=vmware.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vmware.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=H9bnRNg1BLztg/RndOvyjdrwv2dOtmc68BkZNs0p/m8=; b=ivdUw5iNXO8DxA6oOuPXrCb6TjF1qXqNSM+I79/dEAH/0yB/+QspgRuU1Q3lLJShDMPOM38D2HBCtKSYZUGwkQWZQj2u/bx16keqxtAyJV0dHxHgTB8iC1YHNRxYgpjusotsOhCpQyeEwMe9SJlDHlkE/AIOEfRNfyXOhPu7Hsg= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=vmware.com; Received: from PH0PR05MB8703.namprd05.prod.outlook.com (2603:10b6:510:bd::5) by MW4PR05MB8617.namprd05.prod.outlook.com (2603:10b6:303:120::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6455.22; Thu, 1 Jun 2023 09:01:15 +0000 Received: from PH0PR05MB8703.namprd05.prod.outlook.com ([fe80::5631:475a:58d4:cf66]) by PH0PR05MB8703.namprd05.prod.outlook.com ([fe80::5631:475a:58d4:cf66%6]) with mapi id 15.20.6455.020; Thu, 1 Jun 2023 09:01:15 +0000 From: Ajay Kaher To: rostedt@goodmis.org, mhiramat@kernel.org, shuah@kernel.org Cc: linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, chinglinyu@google.com, namit@vmware.com, srivatsa@csail.mit.edu, amakhalov@vmware.com, vsirnapalli@vmware.com, tkundu@vmware.com, er.ajay.kaher@gmail.com, Ajay Kaher Subject: [PATCH v3 10/10] test: ftrace: fix kprobe test for eventfs Date: Thu, 1 Jun 2023 14:30:13 +0530 Message-Id: <1685610013-33478-11-git-send-email-akaher@vmware.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1685610013-33478-1-git-send-email-akaher@vmware.com> References: <1685610013-33478-1-git-send-email-akaher@vmware.com> X-ClientProxiedBy: SJ0PR03CA0181.namprd03.prod.outlook.com (2603:10b6:a03:2ef::6) To PH0PR05MB8703.namprd05.prod.outlook.com (2603:10b6:510:bd::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PH0PR05MB8703:EE_|MW4PR05MB8617:EE_ X-MS-Office365-Filtering-Correlation-Id: ffb13d27-3ef1-46b9-b132-08db627ec141 X-LD-Processed: b39138ca-3cee-4b4a-a4d6-cd83d9dd62f0,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: r7EsGjq3XoPnkYQxI5OpWWVVTCUGxXVXPdauEY10ptvfMm0C66ypqIUA9c4aCGNN+vAeNTkaLx311PEH5xL8lEZG4eLWPmKwruyT3NOWsnXjilfIJLe1YsTfxruWJKbqEF6hVkJ7aj1y67jR9/ug8DjoCGwoCG6qSqXbKd6d2TWOLN5QFaj3AWP81aFlqicwtkhA9T9vT7/Jr58qn/aWsgUci1ZEIr+UbnPKbb6OmhSfHniOnxiDIjnxy43fXp85uvgT6cVs7T+ySNFWisrdHcXZtWqvWRvtIy6qkCSLoVHIZYb3X45wnFoki1ofv1+5dPbwcCFVBuq1NKEAPJJnBWimHa5mqjh4FM45CXl37GHpmPackBigvRj5bM/KTCz3K60muufMQqbFXjIdLNgkS8hQIzPVC1qy8hV6YQ57S/cOurx0F5bg/GP1fvYv2nYX4SBceuztbYfOJJ3CsqinmJKN0NZMgUYs19uhDyyEQDXFqMRR0/8KVkW6QbeHOJnGe7FmZvDPFrooNR2Jn9jwSzeywMIXNM17spCb0nR0CvuT+Q+0fJub4S1Bwdq7X+SpdGrfMJHhrxLtlq7Zzr2qd8RV/zhaYk33zvAAsb7+cR3QWiCUKalF7YLCqhIIiWLo X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PH0PR05MB8703.namprd05.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(396003)(39860400002)(346002)(136003)(376002)(366004)(451199021)(52116002)(6486002)(186003)(5660300002)(41300700001)(107886003)(36756003)(8676002)(38100700002)(8936002)(26005)(6506007)(38350700002)(83380400001)(4326008)(66946007)(2906002)(66556008)(478600001)(66476007)(2616005)(6512007)(86362001)(316002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: /t9ccRGjdmE27Jrlrw7K0DkVhVg+KFMZgiplvlxVX6jw63sQPxeHsaChyitmsrMiiZK8yrFB+Lnb9OmpB5UDB4PP4ASIPEc658g+HsYGXIw3GRBOJbN51nQzZb5BiqM5xUzHP1Pwj5gp1c5wcaPGsqeHcKiOyR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BRqO7dnB5PEVrkXSEMTzhwdWO1OVJyLauGB/WvTUbLRGYjBOBpPm2goY1qqheeFl9GZDzc6aR8JHdwy+C5uaSH5kgLdCKH6IyQyZVKpX9ckAgRHwW6XN/LI1hMPkspvg0RdZz+X0edhOiT7G0X51idxos9HUwAE0BDXScniR4sk9Ws9sv3ka0d4MhP+zGGBSrjKsz3WfXG3nW7jSVW56HjrvvBZniPiyl1v370Athm6N33DY3dO3vUs4ordMQMBPSlDguPhdZLoNuAKB5BkUD5IvrzMQ0hz7AZzmLs/No4mTuLj0QkZRGjxQ57lA/lTuWaGum1dWowde0/8T+AbCC7kI4HUHrqbJJLiMpb90o6agqgyK X-OriginatorOrg: vmware.com X-MS-Exchange-CrossTenant-Network-Message-Id: ffb13d27-3ef1-46b9-b132-08db627ec141 X-MS-Exchange-CrossTenant-AuthSource: PH0PR05MB8703.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Jun 2023 09:01:15.2284 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: b39138ca-3cee-4b4a-a4d6-cd83d9dd62f0 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: vSaCirSIiqjd5eMB5T+b+dkaluRY2BMpjRFRQUAIGemE8LPMzC3rPu4rEQZFJsJJNZebdRcqiwmOOId1bGEGSQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW4PR05MB8617 Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org kprobe_args_char.tc, kprobe_args_string.tc has validation check for tracefs_create_dir, for eventfs it should be eventfs_create_dir. Signed-off-by: Ajay Kaher Co-developed-by: Steven Rostedt (VMware) Signed-off-by: Steven Rostedt (VMware) Tested-by: Ching-lin Yu Acked-by: Masami Hiramatsu (Google) --- .../selftests/ftrace/test.d/kprobe/kprobe_args_char.tc | 4 ++-- .../selftests/ftrace/test.d/kprobe/kprobe_args_string.tc | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_args_char.tc b/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_args_char.tc index 285b4770e..523cfb645 100644 --- a/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_args_char.tc +++ b/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_args_char.tc @@ -34,14 +34,14 @@ mips*) esac : "Test get argument (1)" -echo "p:testprobe tracefs_create_dir arg1=+0(${ARG1}):char" > kprobe_events +echo "p:testprobe eventfs_add_dir arg1=+0(${ARG1}):char" > kprobe_events echo 1 > events/kprobes/testprobe/enable echo "p:test $FUNCTION_FORK" >> kprobe_events grep -qe "testprobe.* arg1='t'" trace echo 0 > events/kprobes/testprobe/enable : "Test get argument (2)" -echo "p:testprobe tracefs_create_dir arg1=+0(${ARG1}):char arg2=+0(${ARG1}):char[4]" > kprobe_events +echo "p:testprobe eventfs_add_dir arg1=+0(${ARG1}):char arg2=+0(${ARG1}):char[4]" > kprobe_events echo 1 > events/kprobes/testprobe/enable echo "p:test $FUNCTION_FORK" >> kprobe_events grep -qe "testprobe.* arg1='t' arg2={'t','e','s','t'}" trace diff --git a/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_args_string.tc b/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_args_string.tc index a4f8e7c53..b9f8c3f8b 100644 --- a/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_args_string.tc +++ b/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_args_string.tc @@ -37,14 +37,14 @@ loongarch*) esac : "Test get argument (1)" -echo "p:testprobe tracefs_create_dir arg1=+0(${ARG1}):string" > kprobe_events +echo "p:testprobe eventfs_add_dir arg1=+0(${ARG1}):string" > kprobe_events echo 1 > events/kprobes/testprobe/enable echo "p:test $FUNCTION_FORK" >> kprobe_events grep -qe "testprobe.* arg1=\"test\"" trace echo 0 > events/kprobes/testprobe/enable : "Test get argument (2)" -echo "p:testprobe tracefs_create_dir arg1=+0(${ARG1}):string arg2=+0(${ARG1}):string" > kprobe_events +echo "p:testprobe eventfs_add_dir arg1=+0(${ARG1}):string arg2=+0(${ARG1}):string" > kprobe_events echo 1 > events/kprobes/testprobe/enable echo "p:test $FUNCTION_FORK" >> kprobe_events grep -qe "testprobe.* arg1=\"test\" arg2=\"test\"" trace