From mboxrd@z Thu Jan 1 00:00:00 1970 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 AFC0FC83003 for ; Wed, 7 Jun 2023 16:27:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231532AbjFGQ1g (ORCPT ); Wed, 7 Jun 2023 12:27:36 -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 Precedence: bulk List-ID: X-Mailing-List: linux-perf-users@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