Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp4431624rdh; Wed, 29 Nov 2023 01:01:00 -0800 (PST) X-Google-Smtp-Source: AGHT+IFoYrcZ+7FisYOhc5qk/ReCU8RMWrFJy83uWCPBvWJ6CJcsVOaVbW6rSwFvdoaK1Ktd6237 X-Received: by 2002:a17:90b:3143:b0:285:ad29:409f with SMTP id ip3-20020a17090b314300b00285ad29409fmr11803095pjb.30.1701248460331; Wed, 29 Nov 2023 01:01:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701248460; cv=none; d=google.com; s=arc-20160816; b=X4upOrp8wHUrfhn+bcIlqEUsfmAHgr9FfGtNDGXuEyl05iNJlVtZ8IagzNCKOWbAWX W97k0ePC59QhYY5REH3+8trfBjVv1t8wAGUFkdpguQmpLlIDTX6efNF3rcjPEZd6OkpE b+qfxUs2YSYkYLy1Se57XBWeCKTHJMhA+Mo6CaDQq4q8NYaDybwu53F4FzAy9TMxgrVg p7oBrlsRqS8oPxiYV35zibnPlVJiIjm83w9TjXVC9+aN7OuV4cAza6dnqgR1ynp+Vmjr MjU9rwYw+hBvmLTbvDqynyG2US1H9pdsNaA+k0LOnZYMbHuPvdDMHmwGudpjJLRdk3th zlcw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to :organization:from:references:to:content-language:subject:user-agent :mime-version:date:message-id:dkim-signature; bh=Oqj8LUm0iLLSFWIzXvMKOKYDCzT6Uiu64nQWjjhhxb0=; fh=6nDkW49cP607V58Or+ur9oNslzydGCYApWVMBjqhYhw=; b=YGY191tIqrQN3xBfOYAsqVanprs7Oz5w5qW1vQsw2cds3579qB5CvIW59lXn+ilRcX LSsOpGg3HDXEl1QldtaT1635itSppMGibsNv72tgxgp/y17EKRFNOGJA6sTiEr0dxNIl pTukhpc107Q9qfr6H6JdmQv7Di4P5iQ/6BpcvAWyTxosMkkRR5zr7pQyXgY42QY3J7uL ZZCn9di/yMvQ4xfsgtGPnN8LFz9MNUVtSFHVDgUJQv0jAhg9wCeu+NxhXOQCNAo6kgkb R2usn+NOKF++YjJbxOP2BedtO34XTRGAjsJxkSyPzoGTiX1dBJW7EBydGbmPsIueHV0+ UHsg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=N2QjqL9A; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 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 lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id gc18-20020a17090b311200b00285929b6060si878900pjb.130.2023.11.29.01.00.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Nov 2023 01:01:00 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=N2QjqL9A; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id CF9A08041948; Wed, 29 Nov 2023 01:00:56 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232335AbjK2JAl (ORCPT + 99 others); Wed, 29 Nov 2023 04:00:41 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55618 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232336AbjK2JAi (ORCPT ); Wed, 29 Nov 2023 04:00:38 -0500 Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.115]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CCC31111; Wed, 29 Nov 2023 01:00:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1701248441; x=1732784441; h=message-id:date:mime-version:subject:to:references:from: in-reply-to:content-transfer-encoding; bh=29gtM7lRrs8xXEzW5BzN8a4ywpjYYsoTZjZd3DuYHwc=; b=N2QjqL9Ae+30BVIsQmcRfu//DEZXE/3dsu7GjP+xM8Jzs230EHMbhRDa FMBPkeZum6idCdBlgeP3JlkLk7kxHGsl8rjDiRkUsvFvoh4Iu66KUvtgJ ulSTMp0M9zDfINC+NCQycOcmAcC/6Q9zO1YbWjOq/uTmqiFD1UFS8Hjx0 3alc6jRfZ2odQeFALbAppbwYVJbmHu2M1MF1YDEQQqhc5Ee8bqqM6bJg9 OLqhCSrBkcSCGlRm0IBcAXJ4978j6oxlGoXplByglLoXNPBh9jWw62Kb5 EgovtZ5GtqUKvQXfBFLTUQ1qWMna+FKsj10VuSTLWr9E4irdBlrx9/Ng3 A==; X-IronPort-AV: E=McAfee;i="6600,9927,10908"; a="392873524" X-IronPort-AV: E=Sophos;i="6.04,235,1695711600"; d="scan'208";a="392873524" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Nov 2023 01:00:41 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10908"; a="762240382" X-IronPort-AV: E=Sophos;i="6.04,235,1695711600"; d="scan'208";a="762240382" Received: from ahunter6-mobl1.ger.corp.intel.com (HELO [10.0.2.15]) ([10.252.43.226]) by orsmga007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Nov 2023 01:00:37 -0800 Message-ID: Date: Wed, 29 Nov 2023 11:00:34 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v1 2/2] perf test: Add basic list test Content-Language: en-US To: Ian Rogers , Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Kan Liang , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org References: <20231129081004.1918096-1-irogers@google.com> <20231129081004.1918096-2-irogers@google.com> From: Adrian Hunter Organization: Intel Finland Oy, Registered Address: PL 281, 00181 Helsinki, Business Identity Code: 0357606 - 4, Domiciled in Helsinki In-Reply-To: <20231129081004.1918096-2-irogers@google.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Wed, 29 Nov 2023 01:00:57 -0800 (PST) On 29/11/23 10:10, Ian Rogers wrote: > Test that json output produces valid json. > > Signed-off-by: Ian Rogers > --- > tools/perf/tests/shell/list.sh | 29 +++++++++++++++++++++++++++++ > 1 file changed, 29 insertions(+) > create mode 100755 tools/perf/tests/shell/list.sh > > diff --git a/tools/perf/tests/shell/list.sh b/tools/perf/tests/shell/list.sh > new file mode 100755 > index 000000000000..286879a9837a > --- /dev/null > +++ b/tools/perf/tests/shell/list.sh > @@ -0,0 +1,29 @@ > +#!/bin/sh > +# perf list tests > +# SPDX-License-Identifier: GPL-2.0 > + > +set -e > +err=0 > + > +if [ "x$PYTHON" == "x" ] > +then > + if which python3 > /dev/null 'which' isn't always present. Maybe python3 --version >/dev/null 2>&1 && PYTHON=python3 > + then > + PYTHON=python3 > + elif which python > /dev/null > + then > + PYTHON=python > + else > + echo Skipping test, python not detected please set environment variable PYTHON. > + exit 2 > + fi > +fi > + > +test_list_json() { > + echo "Json output test" > + perf list -j | $PYTHON -m json.tool > + echo "Json output test [Success]" > +} > + > +test_list_json > +exit $err