Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp4412585rdh; Wed, 29 Nov 2023 00:11:27 -0800 (PST) X-Google-Smtp-Source: AGHT+IFPIDX0LdhH9yWwxzjOjMSD+dw+XouN/EZMGFQZJwnZgVOpP0+BbHugz5GC2IFox7s8EYvf X-Received: by 2002:a05:6870:a9aa:b0:1fa:3dee:ec38 with SMTP id ep42-20020a056870a9aa00b001fa3deeec38mr13650614oab.12.1701245487223; Wed, 29 Nov 2023 00:11:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701245487; cv=none; d=google.com; s=arc-20160816; b=ThQAn5twFrAXk/EaFMUl8svbgLH1f9z43QhleTjxqYNp1+MRXcrJGJ6CcyYiYds96Y bszB8zmVfkuxT2SzFW2ZDHyJQLIWDqHBY72XJnpwNdPWCKG2Cc6v3dd4SSVAFyqg5ziD zoFQPQQ0ZkugZPZZ9CWvxAV0sAaiySLyG37EFQZI0gR/6xrVIAgxNwtO6DfQ4P6rETTO btV9gzeUpCQtvBcr2NEbznwhdtne8osZjefbNGKN3GuTUSNPusJMwvwCE+T5SrF3kb4D p2mY8gHmsCyottWpa/YX2mzVyjyHxKAX3jHdRJwcyb+IMu2QbbSkh8malp3orMcqiXKT phVQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:from:subject:references:mime-version :message-id:in-reply-to:date:dkim-signature; bh=pfx1JC4eBOGrcYnY6xicCWpxUTppoeccvNEbp92VzIk=; fh=OxO30iphCJ5T7Q0u7v9RAoN8TrpFE3bNOof1u+XBh30=; b=P2OKT460pIg2OL6laZEYBoXtaL/2BehDIBIDLvkX5GXhqVV/qCSLCDgjimjk04lJMg RCI2j6wGRNKat/2JIch6m0PnnAzqA4FFTfLl9fCJsCg5NxH2Kwga3z1xSfxz/MpU/nQH kNELXxWcaozQw04x0jVvOhPezR6Xm1q8ztEOYaUFMrkXS+o+t7wGp5nqwpZaSgUOT3xC pWmFQVYfOrAqw6wt6Axhfner7LTX8w0yZlgoKsr7g9kHL5QCyj66irxa+HQuxyW/b09J 4FdyByjZNVMkRY5h1jteiqZfP9YXH+w+MrEZuqXqW9f5I/wahKaTyhof1OZE8C5hWWY3 sOzg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=c1+LsFpW; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id 83-20020a630056000000b005a1d8816535si13741722pga.5.2023.11.29.00.11.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Nov 2023 00:11:27 -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=@google.com header.s=20230601 header.b=c1+LsFpW; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 11C76806E3D1; Wed, 29 Nov 2023 00:11:03 -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 S229517AbjK2IK2 (ORCPT + 99 others); Wed, 29 Nov 2023 03:10:28 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57738 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229513AbjK2IK1 (ORCPT ); Wed, 29 Nov 2023 03:10:27 -0500 Received: from mail-yw1-x1149.google.com (mail-yw1-x1149.google.com [IPv6:2607:f8b0:4864:20::1149]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AEB5F10F0 for ; Wed, 29 Nov 2023 00:10:32 -0800 (PST) Received: by mail-yw1-x1149.google.com with SMTP id 00721157ae682-5cd1172b815so5415367b3.0 for ; Wed, 29 Nov 2023 00:10:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1701245432; x=1701850232; darn=vger.kernel.org; h=to:from:subject:references:mime-version:message-id:in-reply-to:date :from:to:cc:subject:date:message-id:reply-to; bh=pfx1JC4eBOGrcYnY6xicCWpxUTppoeccvNEbp92VzIk=; b=c1+LsFpWXVZa9f0P5WSJVas0Ky1Ns9z08OWReCQPUx8UbCCItqqEjvqKl9VaEWy/T8 +KVwuU6p8GeqL84vzu9l2ePUgs154JheZQq+kFRA6eb0XGF5SQqR0fKtljCEUlxCO4mn D4n8LB1H18QLEMUBV05lbnVllpkBtSl++Ankn+zpMLqLcPQw8UfhBeVdNAwdhXCe45ex bEN5J6Fx4j9jRZ+mKczV96Bz0+gYWgXpqBsQAdNXYxkeg+mJLCuCUnULQ0Y28bc4K4rF dJ4RyLAfPIzZ79PeyQ1kmBlcAId4DIzHFFuVS2qe4AzRYdC1nBJDRbe2b4byUD/na57w HnVA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701245432; x=1701850232; h=to:from:subject:references:mime-version:message-id:in-reply-to:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=pfx1JC4eBOGrcYnY6xicCWpxUTppoeccvNEbp92VzIk=; b=hemnjsavLDh1k1cGvt7WF4Qo9y2Afvaubd8AZhQxelFQFnBgHpU+KL5HmsxwsC/3mz ghqCHhLFOc7ahYCQZtKt35mJ/S/rM79Nqzxp/JlHFeqNypqZSYBVNSuvF3lsF0FQC7FN CeApoZKOpyLCSWECnaSZJqLGvE2ugEo+sAg0+YJp/kcIE9fWnrXWGUL3HNhOUw65ehPj xZ8Y0uDcgTpZp0dlkjcQIEjAgLMkA6yZ4w+2z+tDupe/2J0G2hklYh07QsZFx/aVqrfU UshjcdFqW3o59UWZOGB/nCh9/L5kRqzgGRBj583x6YLbHb2wMAEw/j5knnHBBml0eXdi 5wSw== X-Gm-Message-State: AOJu0Yyo5WIXu7wvCgKQfLgEa2MJESetnkdtXZvysBbUyrmnbY+LrZRZ +67g9S7caoLQ42JCoTDocPMBahnRbdBe X-Received: from irogers.svl.corp.google.com ([2620:15c:2a3:200:763b:80fa:23ca:96f8]) (user=irogers job=sendgmr) by 2002:a05:690c:2b0a:b0:5d0:8fb3:559c with SMTP id em10-20020a05690c2b0a00b005d08fb3559cmr253486ywb.0.1701245431941; Wed, 29 Nov 2023 00:10:31 -0800 (PST) Date: Wed, 29 Nov 2023 00:10:04 -0800 In-Reply-To: <20231129081004.1918096-1-irogers@google.com> Message-Id: <20231129081004.1918096-2-irogers@google.com> Mime-Version: 1.0 References: <20231129081004.1918096-1-irogers@google.com> X-Mailer: git-send-email 2.43.0.rc1.413.gea7ed67945-goog Subject: [PATCH v1 2/2] perf test: Add basic list test From: Ian Rogers To: Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Ian Rogers , Adrian Hunter , Kan Liang , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-8.4 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE, USER_IN_DEF_DKIM_WL 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 00:11:03 -0800 (PST) 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 + 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 -- 2.43.0.rc1.413.gea7ed67945-goog