From patchwork Thu Oct 20 19:29:17 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Namhyung Kim X-Patchwork-Id: 6367 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4242:0:0:0:0:0 with SMTP id s2csp292847wrr; Thu, 20 Oct 2022 12:47:23 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6LSneZRfiZEInA/fDZX3WGOLqLNRgUZQCPPtHfW/ocwILy3leQIsqsxxOBcyCyEjuovSWz X-Received: by 2002:a17:906:65c6:b0:73c:8897:65b0 with SMTP id z6-20020a17090665c600b0073c889765b0mr12548335ejn.322.1666295243313; Thu, 20 Oct 2022 12:47:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666295243; cv=none; d=google.com; s=arc-20160816; b=D8Tpp6tj5IVeH2wRzy2e7KdLDFQpjbM/tk/oDoPnpa7ntFtIip3f85CWgy7YNUAuaK uIwlt5sACwdpEHkxJkhP+wH8WTRgfjDg3SqqacOfTi3wozlZoMkHNd+lcilWhIZ1M7Co reDQe1I14ZaTc7DTvFCz6pu0TANS1L7rr7qWwg8AQolnvVsoB3/unkcxmxDSEKvkQ1wE N7OiNp4PHXe5a9iSirAA0fT/PpcIDKmBiF7zhhwWH+AG9R7GIbVPhIZoUDGran8xeSLF cqUh2uTpc+au5ljH5506vICXnCBubXepfVYsSPOOVdSaUg2J2tjBS6/UKB+KjN9YQ/an 6EeQ== 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 :message-id:date:subject:cc:to:from:sender:dkim-signature; bh=3IhfJV/ujEMz2VKCojZus2oWqbEOyKbn3J2D7DFU0U4=; b=WQVUk/y7ogiYT5LjxhhalB6x72YkgiJdbOiYr35Zcngl/1txapMWWA37p+x1MdOLr7 I+Jdovp3m7rgKYLfHURpCQUBSOJ0gG5i1zkrKXhMO+NQdnMPFFDehmLKOLEhE0aNHur/ JFKgpUcDQvS9APE4pZHyt9AeGkcwSYkL2jd6k7o503jANuFdSv0fGyKiAbJruT0KOdPJ QtgahnKiapSgk+UbmXG9H07FI5YNjHlMAZyif3M+ULfCWZh8NolLoeV6iieA/nPrlak0 i9PJMBViqjw/mxlBYhFOdIJmENeT6R10AgF6x87xQMYSeglbM2HxE5BihnThjmUYdGjl RsiA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b="m/YmPmdS"; 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=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m15-20020a056402430f00b0043d54ba0a4dsi21565875edc.327.2022.10.20.12.46.58; Thu, 20 Oct 2022 12:47:23 -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=@gmail.com header.s=20210112 header.b="m/YmPmdS"; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229667AbiJTT33 (ORCPT + 99 others); Thu, 20 Oct 2022 15:29:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34522 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229988AbiJTT31 (ORCPT ); Thu, 20 Oct 2022 15:29:27 -0400 Received: from mail-pj1-x1032.google.com (mail-pj1-x1032.google.com [IPv6:2607:f8b0:4864:20::1032]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DDFC11008; Thu, 20 Oct 2022 12:29:21 -0700 (PDT) Received: by mail-pj1-x1032.google.com with SMTP id t10-20020a17090a4e4a00b0020af4bcae10so591760pjl.3; Thu, 20 Oct 2022 12:29:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:sender:from:to:cc:subject:date:message-id:reply-to; bh=3IhfJV/ujEMz2VKCojZus2oWqbEOyKbn3J2D7DFU0U4=; b=m/YmPmdSeKWw68CQWY77WtCYKP4sk7RmpdviGct4nk3WTQF9K4Bv0loTBpi/NhPdNZ eu24hydAsAkIiu8WtuidUxz5/AT3RawWQvm+NwTwZHHsHKesQkzh4xXk1Zdcz9ZgIcs6 ZSwxreAKF9vmrJkm770z3i/RNIsdgjsVA2KwoARQdD1f+H0JtgXPi5pHdGBr5ScpzGDN bKM3oLmk5NCVVnTk6w7YXpe2bGuWx8/x+T1E7Ywjqhu8R/XUkggf0Dyyfwe0VYkJrEgf zUOI53F7wCUwR9tgYB/cIqu5IQwjs8iFztOsIZeXM/iuHlYc+305/rRQ2QwT9Trp+Aw0 b2Gg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:sender:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=3IhfJV/ujEMz2VKCojZus2oWqbEOyKbn3J2D7DFU0U4=; b=QfpVDRHYgrdLQC+f6uF8CDy4188tjCjqUywJuaEW2gveW+wX6XIOPGZsd62KyHex5/ 1uBI/xpMU3W9xTpcqz+3pgM/0OAiKkSHfcQXH07KDdhCgt50Hn3YOhqDVoeMK4E8V1V4 w3toshuvM6fjnXV+NFTC1GCQzQn4J9qtPBv6IIGyUZrO3f7kpCIGyZPacfEowAXHeXkj Dddq/R8J6TMhNqlSh7nxpFScAHggkyASXfHi7SODC4NmhoBBtaCDVpMe/Du/zzPKXKJd wZ9bOFw3qM7DoTw0EVXQtGYvPXxwRu3LE/xKUUr8UJu6pDS9wagUbiu7Bofm3y0q6DTX ocpg== X-Gm-Message-State: ACrzQf3zuD60CcNfktAPJO1LVR5uMBbWU5hCKB4oeZ2gTAXa8vdZZ8kw 9r++WJYVzJtkrswSpni+muk= X-Received: by 2002:a17:903:230a:b0:17d:707a:360e with SMTP id d10-20020a170903230a00b0017d707a360emr15764571plh.118.1666294160982; Thu, 20 Oct 2022 12:29:20 -0700 (PDT) Received: from youngsil.svl.corp.google.com ([2620:15c:2d4:203:637f:7dcc:4bbf:4981]) by smtp.gmail.com with ESMTPSA id p189-20020a625bc6000000b00562e9f636e0sm14230825pfb.10.2022.10.20.12.29.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 20 Oct 2022 12:29:20 -0700 (PDT) Sender: Namhyung Kim From: Namhyung Kim To: Arnaldo Carvalho de Melo , Jiri Olsa Cc: Ingo Molnar , Peter Zijlstra , LKML , Ian Rogers , Adrian Hunter , linux-perf-users@vger.kernel.org, Ammy Yi Subject: [PATCH] perf test: Do not fail Intel-PT misc test w/o libpython Date: Thu, 20 Oct 2022 12:29:17 -0700 Message-Id: <20221020192917.3542757-1-namhyung@kernel.org> X-Mailer: git-send-email 2.38.0.135.g90850a2211-goog MIME-Version: 1.0 X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE, SPF_PASS autolearn=no 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747237201067795597?= X-GMAIL-MSGID: =?utf-8?q?1747237201067795597?= The virtuall LBR test uses a python script to check the max size of branch stack in the Intel-PT generated LBR. But it didn't check whether python scripting is available (as it's optional). Let's skip the test if the python support is not available. Fixes: f77811a0f625 ("perf test: test_intel_pt.sh: Add 9 tests") Cc: Ammy Yi Signed-off-by: Namhyung Kim --- tools/perf/tests/shell/test_intel_pt.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tools/perf/tests/shell/test_intel_pt.sh b/tools/perf/tests/shell/test_intel_pt.sh index 4c0aabbe33bd..e66b7d977462 100755 --- a/tools/perf/tests/shell/test_intel_pt.sh +++ b/tools/perf/tests/shell/test_intel_pt.sh @@ -526,6 +526,12 @@ test_kernel_trace() test_virtual_lbr() { echo "--- Test virtual LBR ---" + # Check if python script is supported + libpython=$(ldd $(which perf) | grep -c python) + if [ "${libpython}" != "1" ] ; then + echo "SKIP: python scripting is not supported" + return 2 + fi # Python script to determine the maximum size of branch stacks cat << "_end_of_file_" > "${maxbrstack}"