Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp10713145rwd; Thu, 22 Jun 2023 03:58:46 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5l/T2HS7vxkD9FRuUSV9FTHbnhPrOPX+J87OA2x0S4Y3n7m0uQAh9erm29Y82N1eLjwQA+ X-Received: by 2002:a05:6a00:1309:b0:63a:ea82:b7b7 with SMTP id j9-20020a056a00130900b0063aea82b7b7mr19800414pfu.28.1687431525734; Thu, 22 Jun 2023 03:58:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687431525; cv=none; d=google.com; s=arc-20160816; b=nIA0DOj91uvlThelfc1VOgTZ8djjXDKIRpiynmzx4dHOuggEvi0K8q0+rU95wfCe+H DHc7+1wrovUBIXaOs0j3mbezOV5zsLL2TOdV/Pn8lOyqVb2hxb0nWuW+65tJ8WX5COE0 ejuSOLkC6XkzNMG3TVNnSxVTAMJ1umEyW6Pu5jSKO1N3CZs843YlcjoDg3/JKzfdgYRz lv5i088jWawxNa0czm9SvBq60rhYzF37mgDuQU3W73f1G9Bw6lFpu5OQGaN65vRHON1B ZWKnMSIX00MLczw0eU7F+YelzZqxcb/CbRW1zzjRUtpBL/MEx90WI5j4sWeyo5hkJ+Sm p3Fw== 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; bh=3mmd0dbvdgLzv8wB7+qFDtUVYGI6DvNwJhqZb8Xo7ug=; b=YmuY/6RcSkygU/+j4jf3Infpp+PKCvjvr/UKywFdzxt2b5i+ouPYLsTlqa9BAq0+AL eQ7Dz7971kd5fKsJpjmtas2b0B/SFNGUiiTywBIB6YLCOQb7hqC5nS82anFSVyCdoE6s A+TmFmvmhiosh0hoJsDxujpIr/fJ0x8hmcaJWd6gZzqIxBmAG3WQLykCXOzMtqDYduKY /9LvKj3RaMAuzAVZy9FkmodXR1jQ1mFh+BKK4Roy5o0FM/oc8lFka+eWiKaM3XpWUGM8 kv2CxCcx6X+SHLOG35P4zuV7QSlYAcsZhYTgjVNgTqOuZhfdKP2X6qLcsXDi5qiIMo+y dseQ== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b3-20020aa79503000000b0064d419dd566si6132396pfp.205.2023.06.22.03.58.33; Thu, 22 Jun 2023 03:58:45 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231143AbjFVKSZ (ORCPT + 99 others); Thu, 22 Jun 2023 06:18:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39070 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229704AbjFVKSW (ORCPT ); Thu, 22 Jun 2023 06:18:22 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 894B111C; Thu, 22 Jun 2023 03:18:21 -0700 (PDT) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id EDCCC1042; Thu, 22 Jun 2023 03:19:04 -0700 (PDT) Received: from localhost.localdomain (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 01EC73F64C; Thu, 22 Jun 2023 03:18:18 -0700 (PDT) From: James Clark To: linux-perf-users@vger.kernel.org, spoorts2@in.ibm.com Cc: James Clark , Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Ian Rogers , Adrian Hunter , Athira Rajeev , Kajol Jain , linux-kernel@vger.kernel.org Subject: [PATCH] perf tests: Fix test_arm_callgraph_fp variable expansion Date: Thu, 22 Jun 2023 11:18:09 +0100 Message-Id: <20230622101809.2431897-1-james.clark@arm.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham 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 $TEST_PROGRAM is a command with spaces so it's supposed to be word split. The referenced fix to fix the shellcheck warnings incorrectly quoted this string so unquote it to fix the test. At the same time silence the shellcheck warning for that line and fix two more shellcheck errors at the end of the script. Fixes: 1bb17b4c6c91 ("perf tests arm_callgraph_fp: Address shellcheck warnings about signal names and adding double quotes for expression") Signed-off-by: James Clark --- tools/perf/tests/shell/test_arm_callgraph_fp.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tools/perf/tests/shell/test_arm_callgraph_fp.sh b/tools/perf/tests/shell/test_arm_callgraph_fp.sh index 1380e0d12dce..66dfdfdad553 100755 --- a/tools/perf/tests/shell/test_arm_callgraph_fp.sh +++ b/tools/perf/tests/shell/test_arm_callgraph_fp.sh @@ -15,7 +15,8 @@ cleanup_files() trap cleanup_files EXIT TERM INT # Add a 1 second delay to skip samples that are not in the leaf() function -perf record -o "$PERF_DATA" --call-graph fp -e cycles//u -D 1000 --user-callchains -- "$TEST_PROGRAM" 2> /dev/null & +# shellcheck disable=SC2086 +perf record -o "$PERF_DATA" --call-graph fp -e cycles//u -D 1000 --user-callchains -- $TEST_PROGRAM 2> /dev/null & PID=$! echo " + Recording (PID=$PID)..." @@ -33,8 +34,8 @@ wait $PID # 76c leafloop # ... -perf script -i $PERF_DATA -F comm,ip,sym | head -n4 -perf script -i $PERF_DATA -F comm,ip,sym | head -n4 | \ +perf script -i "$PERF_DATA" -F comm,ip,sym | head -n4 +perf script -i "$PERF_DATA" -F comm,ip,sym | head -n4 | \ awk '{ if ($2 != "") sym[i++] = $2 } END { if (sym[0] != "leaf" || sym[1] != "parent" || sym[2] != "leafloop") exit 1 }' -- 2.34.1