Received: by 2002:a05:7412:5112:b0:fa:6e18:a558 with SMTP id fm18csp175518rdb; Mon, 22 Jan 2024 16:27:53 -0800 (PST) X-Google-Smtp-Source: AGHT+IGcWq64ZqWmaqKEOOVq9MCtE/+1EoGpoJ1OKLmBCb78SM4dRAl58vBNbIHZyT1RJkE2GBRB X-Received: by 2002:a05:620a:288a:b0:783:72fb:53fe with SMTP id j10-20020a05620a288a00b0078372fb53femr6680131qkp.53.1705969673526; Mon, 22 Jan 2024 16:27:53 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705969673; cv=pass; d=google.com; s=arc-20160816; b=j0CVjtugvPcxRelAZ4LjjcFMlfp3LtxwdI+OdwSq9kHzkz4LfrSE5JAHHYjzAeSpO1 V+bQ4mTF1kd1yQxkQFVxQ0jpNDhLCOGB8twqZnOOuUZRwMGWZMprArDZBVB3VgH+kEC+ 102gS9qC8JHJ78s78bw/IomshchkF9pID2YuZNBKgnSkH+v0m2q1u+K446Vc31KltDYN ya/o/AIZPLEM3okd7FBLmw6LN73+bsZJSR+q4jAbAyp4ap4/96flySDJ/rJDxUM69f2w maZTIOBufdUfSgqw8RHZNRAOsRkMHO7xdKE60XEhv3idRMOlfuF38vEgeQIBj1y9XkSE uo0w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=to:from:subject:references:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:in-reply-to:date :dkim-signature; bh=FbGGf59DA5QM5LIqtEUDehzpONrkGjjAENgF7jFRKl8=; fh=OSPvvrodhCXrbS0tgWY7ZQ1FjQjyOgKyIFsZYsPrQ8s=; b=GadHJYySjwq0jPwK66QdecRQ1XBQauv3HfYkj51zFCxz5CoBQrTgGBcx6JdNS1H7kO NEBjG5UvgRvx7AjqNWom3FwpfmQd0bIFxwR74PBQdQ4PoDNNfMiEEM1CE8O6HP9/6qjy yXeHEVR1UjzRYCILlPGwydyOVwc+6RayaPHR8/0bwcgOaI9Yf6/zL2aYqGmC1t9Bl9kW ZfLBhj05Jq2SMfZQazrxz5jIiKSo6ag+pxmCn+AtsblqAWCNO3Pk+yoQ4yVPg/OabIsE n5HtovJcDpo9uRuDSqtbEwscAcjeaHzQs1pSGxo7GHoD0deLwhqN+FLnigGZXo47ltQ8 jjpA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=UpPC+nHC; arc=pass (i=1 spf=pass spfdomain=flex--irogers.bounces.google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-34438-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-34438-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id b4-20020a05620a088400b0078335ec6235si6971848qka.349.2024.01.22.16.27.53 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Jan 2024 16:27:53 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-34438-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=UpPC+nHC; arc=pass (i=1 spf=pass spfdomain=flex--irogers.bounces.google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-34438-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-34438-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 443CD1C27F3D for ; Tue, 23 Jan 2024 00:27:53 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9DA391474A4; Tue, 23 Jan 2024 00:06:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="UpPC+nHC" Received: from mail-yw1-f201.google.com (mail-yw1-f201.google.com [209.85.128.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7753114690C for ; Tue, 23 Jan 2024 00:06:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705968380; cv=none; b=FC5yszm/DV/tuKA5BoSFkcSstQ1bKiQmwZkJTBLf2SohmACx1laHPCp31AdgNxdGOS9Lr4htE1BBAzOjHhRkEXTvPJderQABWW0h9FddBmIHAwBdbWGeVDLR0WtTPjP3x04urR8BvEog/gAYhT+hw2wf0ex8jm4wMvtKCY5QNnM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705968380; c=relaxed/simple; bh=QSzzoS14vis9dIlzEyaQe1hPLIfMWnirr9zB3yUAZLk=; h=Date:In-Reply-To:Message-Id:Mime-Version:References:Subject:From: To:Content-Type; b=oB6CLx0pABUfqsYadZkbcKJlJqfK2qhZGgkGs2OmRpYr09cUMa+waPc87CjOe68mxo8Znysi2dWGrVhfZJBWz47bugNrlLYCYwEKMzIaFCm9xoy/VAEYKHDE32C1h5vB46hFSYnDO1LC1I7/4k+mwV0rjs1Dq38SDg4f3qaFwM8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--irogers.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=UpPC+nHC; arc=none smtp.client-ip=209.85.128.201 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--irogers.bounces.google.com Received: by mail-yw1-f201.google.com with SMTP id 00721157ae682-5e73bd9079eso61260357b3.2 for ; Mon, 22 Jan 2024 16:06:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1705968378; x=1706573178; 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=FbGGf59DA5QM5LIqtEUDehzpONrkGjjAENgF7jFRKl8=; b=UpPC+nHCQdCOlLooBJLVq3GMj0wxnKG3qiQ6zlfCVZIFwzTFOSEW1bSV7kZYOttOK4 euGBwpgbe+ZzkNc6JImgQYqk+uQ837CIq75cqeU6EqmSkmVSnJZr/m+WxQn2KJr95KPB xijjmiPBPiaz8Vp4jHeB/BRxgPcCq/CtCEqxl7wTJkFNMfoP+hJ4IlhzyzgIIkS7hQpz g945mKYkZa+6DRZ+P+D17CiFlrzSvv0v89lEkA4KVJAcROd7CwZ+rQ4MPBV2w/2oCOsm xpc+hPzL3Y3/0NTfTvV9vBb76Q/k09RZEItKDjRi31allhCr6uLu1M5dG6Ioo323tp3a ddtQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705968378; x=1706573178; 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=FbGGf59DA5QM5LIqtEUDehzpONrkGjjAENgF7jFRKl8=; b=EANp0bELlB1uURupFGFrbzkvy9GnuyGrqdtzIs/xbwCL6caG5tgICi9zRecmcZok74 8p5tpkSFRLcZBoGPvjhIAlAOGc780n4R23WUmYjQw+GEb1OFuxf/oxvNW/w4pTpaUiXI KRERJVDp0hEOOj48uNA5plSacJydRIUdomzr+elZTi2p2z+HGhb31Y4/6RCtdTo9I+aP mJOcTf+6Ovu63Dx4a55Kh1Psy1UNkolNhkBoAydTWHDbdOqsKYUVfaqE9aYb5R3SLDTn TNWEJkrgeSqSAKgq4DE1NcsGzZpXFtXNhtdcmOigiWhSj+cUnp26kllmOY5CpPTTZmlp vP7A== X-Gm-Message-State: AOJu0YwRZX/vyBA5lw7h4xSNxCFyk12mQdOt760C1DRQtUBuFWoW3tbc Jd/hVD2DAWxNKMxfjeTRvuUXVPcKRkgbfdb6eiLR5zShcSWN2lpxmdq0Sds5/TehwB7MpzbpX0H jE9S9bA== X-Received: from irogers.svl.corp.google.com ([2620:15c:2a3:200:6aba:f97a:4dc7:7e92]) (user=irogers job=sendgmr) by 2002:a81:5709:0:b0:5f8:bd56:176f with SMTP id l9-20020a815709000000b005f8bd56176fmr2362476ywb.2.1705968378456; Mon, 22 Jan 2024 16:06:18 -0800 (PST) Date: Mon, 22 Jan 2024 16:06:02 -0800 In-Reply-To: <20240123000604.1211486-1-irogers@google.com> Message-Id: <20240123000604.1211486-4-irogers@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20240123000604.1211486-1-irogers@google.com> X-Mailer: git-send-email 2.43.0.429.g432eaa2c6b-goog Subject: [PATCH v1 3/5] perf test: Workaround debug output in list test From: Ian Rogers To: Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Namhyung Kim , Mark Rutland , Alexander Shishkin , Jiri Olsa , Ian Rogers , Adrian Hunter , Ravi Bangoria , Ross Zwisler , Athira Rajeev , Shirisha G , Kajol Jain , Kan Liang , linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Write the json output to a specific file to avoid debug output breaking it. Signed-off-by: Ian Rogers --- tools/perf/tests/shell/list.sh | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/tools/perf/tests/shell/list.sh b/tools/perf/tests/shell/list.sh index 22b004f2b23e..8a868ae64560 100755 --- a/tools/perf/tests/shell/list.sh +++ b/tools/perf/tests/shell/list.sh @@ -3,17 +3,32 @@ # SPDX-License-Identifier: GPL-2.0 set -e -err=0 shelldir=$(dirname "$0") # shellcheck source=lib/setup_python.sh . "${shelldir}"/lib/setup_python.sh +list_output=$(mktemp /tmp/__perf_test.list_output.json.XXXXX) + +cleanup() { + rm -f "${list_output}" + + trap - EXIT TERM INT +} + +trap_cleanup() { + cleanup + exit 1 +} +trap trap_cleanup EXIT TERM INT + test_list_json() { echo "Json output test" - perf list -j | $PYTHON -m json.tool + perf list -j -o "${list_output}" + $PYTHON -m json.tool "${list_output}" echo "Json output test [Success]" } test_list_json -exit $err +cleanup +exit 0 -- 2.43.0.429.g432eaa2c6b-goog