Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1017173rwd; Wed, 7 Jun 2023 09:48:47 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6tD+ICe8OXxgUe2vHy0W2aXayu2lsizk6nalBkuc5q9+mGIMfp10K0QuH++Nu7YxHD4TM4 X-Received: by 2002:a05:6a20:4420:b0:106:92a:37ae with SMTP id ce32-20020a056a20442000b00106092a37aemr3549918pzb.30.1686156527482; Wed, 07 Jun 2023 09:48:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686156527; cv=none; d=google.com; s=arc-20160816; b=tY3/J+01gEJFBgbDI8niFM+lXhDpvR+OTPTu/NUN2NYyBHN7R4dbD4/vMtYZLAwDxb bKRad58DQCZoYwYip6dnHuyAbxn7y5SmiVrK/JuR2+zBaszZtcMm5ykvKeakERr9fo/T mZ1U6Oz4+xKjEyEPD0nUJhtww99OnQMVyCh2R/3+kZ75Xby8ScMQO8QqsImHMMib6TVd DiR6i+rvNKkU61hLpKB+4sCQdbXXuXdJFUzAJSAqkhsmuSv8qb8sV47r+f2B61SOMqhY pTM95iyPREPrFrsb7yaLNcqNSVivTU78W1Uy5fxK1I4geP0LiSv7Yy7ih86D5mtJsfgY QbCQ== 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 :dkim-signature; bh=1b7DR9mniE4FiYR21qvq3+qElyNJqb80Svl5hP+hsQk=; b=GwLfNIG1GvvPuJMNyIVzpUA71ftyeHcL5eYXjpqw8G3CezIWNKp+yqvIxdfDRrESbx DfvbSA02ilfnrP6XutKshntLlDYJ+uf1icU3JqUZD9gUFHvtfjTd1uAr18iIoz2f3L0q 3fsnrHJjf9gNS/VVhC8imnwUW/EeVUYtYmxVM5iqY3ZBNhzSb0xMmlNfYnftWToFoaS2 yiY4vMHQqT+F1swgzJ5i52vPxee6gE7CYfsyZhG06NyyrkmKGZaAE7pt8RPGPmqc2+z8 E34EMczaizBGoO+BYx/23kK7ztH+kZCRf9f492KB67QhWEWx0LxEO3EudJV5KxqIGa5k m8Yw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=ADxPRujg; 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=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s4-20020a637704000000b0053481e4c743si9130771pgc.171.2023.06.07.09.48.34; Wed, 07 Jun 2023 09:48:47 -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; dkim=pass header.i=@intel.com header.s=Intel header.b=ADxPRujg; 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=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231906AbjFGQ1m (ORCPT + 99 others); Wed, 7 Jun 2023 12:27:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49506 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231438AbjFGQ1d (ORCPT ); Wed, 7 Jun 2023 12:27:33 -0400 Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4554D1BFF; Wed, 7 Jun 2023 09:27:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1686155246; x=1717691246; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=mwsZmUxJwi+9RiW1rvq0psUPvV+FPhuABjckNf+s/B4=; b=ADxPRujgbN8HWVJtM/3mZcougAbby7OFQB2HNGUtmhGrHcLU40qBuVmh ZRXVNMnZDXy4prqT084+UHZk+9LW6jEkdrYfd2lGR2z4sNHlcDBuPqkp/ xQSLARp4ubgIIuDAd+cz+PPdSUzjRhcOjQ96rcEaWpB3Y8TOzhE7P+GQg iTRWPlmXWwjZOTWh190guf9bVhsL1LtA/cuYaGM63FWEw53K4bN7vn5O2 maOd7m1g9w4dTtWNYgEFdR/Cvw6ZW/w9O7S2gs9a14l9W+U517AxhQXdU PkssI/4OzASFiaDQR4f7Fa6tW+3Fogk+EQKWawt3YTsoU3JyQne7c0Vgo A==; X-IronPort-AV: E=McAfee;i="6600,9927,10734"; a="355892673" X-IronPort-AV: E=Sophos;i="6.00,224,1681196400"; d="scan'208";a="355892673" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Jun 2023 09:27:24 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10734"; a="774697683" X-IronPort-AV: E=Sophos;i="6.00,224,1681196400"; d="scan'208";a="774697683" Received: from kanliang-dev.jf.intel.com ([10.165.154.102]) by fmsmga008.fm.intel.com with ESMTP; 07 Jun 2023 09:27:23 -0700 From: kan.liang@linux.intel.com To: acme@kernel.org, mingo@redhat.com, peterz@infradead.org, irogers@google.com, namhyung@kernel.org, jolsa@kernel.org, adrian.hunter@intel.com, linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org Cc: ak@linux.intel.com, eranian@google.com, ahmad.yasin@intel.com, Kan Liang Subject: [PATCH 7/8] pert tests: Support metricgroup perf stat JSON output Date: Wed, 7 Jun 2023 09:26:59 -0700 Message-Id: <20230607162700.3234712-8-kan.liang@linux.intel.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20230607162700.3234712-1-kan.liang@linux.intel.com> References: <20230607162700.3234712-1-kan.liang@linux.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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 From: Kan Liang A new field metricgroup has been added in the perf stat JSON output. Support it in the test case. Signed-off-by: Kan Liang --- tools/perf/tests/shell/lib/perf_json_output_lint.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/perf/tests/shell/lib/perf_json_output_lint.py b/tools/perf/tests/shell/lib/perf_json_output_lint.py index b81582a89d36..5e9bd68c83fe 100644 --- a/tools/perf/tests/shell/lib/perf_json_output_lint.py +++ b/tools/perf/tests/shell/lib/perf_json_output_lint.py @@ -55,6 +55,7 @@ def check_json_output(expected_items): 'interval': lambda x: isfloat(x), 'metric-unit': lambda x: True, 'metric-value': lambda x: isfloat(x), + 'metricgroup': lambda x: True, 'node': lambda x: True, 'pcnt-running': lambda x: isfloat(x), 'socket': lambda x: True, @@ -70,6 +71,8 @@ def check_json_output(expected_items): # values and possibly other prefixes like interval, core and # aggregate-number. pass + elif count != expected_items and count >= 1 and count <= 5 and 'metricgroup' in item: + pass elif count != expected_items: raise RuntimeError(f'wrong number of fields. counted {count} expected {expected_items}' f' in \'{item}\'') -- 2.35.1