Received: by 2002:a05:7412:f584:b0:e2:908c:2ebd with SMTP id eh4csp1367062rdb; Mon, 4 Sep 2023 11:15:26 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHd6PHdeLmhsqmjZhcEV8wv/MJQdAaRxPb3lgG8xPWiroes7Gl/a1Nn7CgNbh6JPLzyjAP3 X-Received: by 2002:a05:6a00:10c3:b0:68c:f9d:83ed with SMTP id d3-20020a056a0010c300b0068c0f9d83edmr12821231pfu.34.1693851325928; Mon, 04 Sep 2023 11:15:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1693851325; cv=none; d=google.com; s=arc-20160816; b=oQFUK7QKiy/7k+/gKCzrN1Tuwn+rKQY6U/eEdgWL0st5vKaigWg7lBD/p2ET/58VeI NhZj9A7PvOOF9BSe92pW8RbcDAZ9r8XUre6p88L7S87h/A3PODuyctVg9DEY6EG+WAeo HR/7vJTqWF93hJ4iFDh95LRMViSihXvBnCihTrjSvk1ptSYfXf8CqNSGFWtkaIYz2LeE jIDgrllt5UeVgezV5h/On+b0pYEBkyEomec3YIorWZ0tVmHOu6iGHAn/Janvd94mQCka 7m9Zib8hvMi8d3UHRReSZCwJWaNmkZJZ+hj+HRxFb/U5elWyPCnLhMr8DCEDbr6qaOai IoGA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=dOut5YMNbnCbG2NolZrui6x/r8fJkvnDD66kJiQkd24=; fh=+V2NJRwYYldEteK9NYuSkp4iZMVHSlTgEsLCPEY32o0=; b=LcZ/ffRULYZAyd3BXGIeW3TUiuBu5e/ywUqep4/kZKALWCvYXhfc+WzrNz214iVlsU plV8bKJ6xJPhHlw2mZjD4FDr6IsrAtEJ8Jnka9mGb/ypBSZAD+tBgcERbszCUMWH0xlt wb9FB3P6LmZ5XwTta9tTEumn0l/rdFknhdNDMcJsP/r9MK8EcCGC5Qh0xBxSlntXWsPf u0cNxcPJje1Aidq/UNc1+H+lv35ocWZa2NW1PW4Mzhhnkpj/PLhxwSFr6ycLRVZrDbn1 fNTIoy2rGtkkenxxJL/wYSG7e0PLRkrCvX54IDnJj9P/bf4zzutHo9gg/8VrW2LU4qrp giLQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y20-20020a056a00191400b006870f6fd899si8170941pfi.166.2023.09.04.11.15.13; Mon, 04 Sep 2023 11:15:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1351036AbjIDChB (ORCPT + 99 others); Sun, 3 Sep 2023 22:37:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60480 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1350938AbjIDCg4 (ORCPT ); Sun, 3 Sep 2023 22:36:56 -0400 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4E0BB10A; Sun, 3 Sep 2023 19:36:53 -0700 (PDT) Received: from kwepemm600003.china.huawei.com (unknown [172.30.72.55]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4RfCNQ5RbTztS56; Mon, 4 Sep 2023 10:32:54 +0800 (CST) Received: from localhost.localdomain (10.67.174.95) by kwepemm600003.china.huawei.com (7.193.23.202) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.31; Mon, 4 Sep 2023 10:36:50 +0800 From: Yang Jihong To: , , , , , , , , , , , , , , , CC: Subject: [PATCH v8 6/6] perf test: Add perf_event_attr test for record dummy event Date: Mon, 4 Sep 2023 02:33:40 +0000 Message-ID: <20230904023340.12707-7-yangjihong1@huawei.com> X-Mailer: git-send-email 2.30.GIT In-Reply-To: <20230904023340.12707-1-yangjihong1@huawei.com> References: <20230904023340.12707-1-yangjihong1@huawei.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.67.174.95] X-ClientProxiedBy: dggems705-chm.china.huawei.com (10.3.19.182) To kwepemm600003.china.huawei.com (7.193.23.202) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org If only dummy event is recorded, tracking event is not needed. Add this test scenario. Test result: # ./perf test list 2>&1 | grep 'Setup struct perf_event_attr' 17: Setup struct perf_event_attr # ./perf test 17 -v 17: Setup struct perf_event_attr : --- start --- test child forked, pid 720198 running './tests/attr/test-record-dummy-C0' test child finished with 0 ---- end ---- Setup struct perf_event_attr: Ok Signed-off-by: Yang Jihong --- tools/perf/tests/attr/test-record-dummy-C0 | 55 ++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 tools/perf/tests/attr/test-record-dummy-C0 diff --git a/tools/perf/tests/attr/test-record-dummy-C0 b/tools/perf/tests/attr/test-record-dummy-C0 new file mode 100644 index 000000000000..83ca4e373acd --- /dev/null +++ b/tools/perf/tests/attr/test-record-dummy-C0 @@ -0,0 +1,55 @@ +[config] +command = record +args = --no-bpf-event -e dummy -C 0 kill >/dev/null 2>&1 +ret = 1 + +[event] +fd=1 +group_fd=-1 +cpu=0 +pid=-1 +flags=8 +type=1 +size=136 +config=9 +sample_period=4000 +# PERF_SAMPLE_IP | PERF_SAMPLE_TID | PERF_SAMPLE_TIME | +# PERF_SAMPLE_PERIOD +# + PERF_SAMPLE_CPU added by -C 0 +sample_type=391 +read_format=4 +disabled=0 +inherit=1 +pinned=0 +exclusive=0 +exclude_user=0 +exclude_kernel=0 +exclude_hv=0 +exclude_idle=0 +mmap=1 +comm=1 +freq=1 +inherit_stat=0 +enable_on_exec=0 +task=1 +watermark=0 +precise_ip=0 +mmap_data=0 +sample_id_all=1 +exclude_host=0 +exclude_guest=1 +exclude_callchain_kernel=0 +exclude_callchain_user=0 +mmap2=1 +comm_exec=1 +context_switch=0 +write_backward=0 +namespaces=0 +use_clockid=0 +wakeup_events=0 +bp_type=0 +config1=0 +config2=0 +branch_sample_type=0 +sample_regs_user=0 +sample_stack_user=0 -- 2.30.GIT