From patchwork Tue Nov 14 05:13:28 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anshuman Khandual X-Patchwork-Id: 164729 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b909:0:b0:403:3b70:6f57 with SMTP id t9csp1655932vqg; Mon, 13 Nov 2023 21:15:03 -0800 (PST) X-Google-Smtp-Source: AGHT+IESKViowd5euqVZq2b/3TNdqTMMeHWGMQ7epe3/FHOFMTU5Qw5ivxFfZaoEAx5U5C6/waIX X-Received: by 2002:a05:6808:1413:b0:3ad:f866:39bd with SMTP id w19-20020a056808141300b003adf86639bdmr13152343oiv.27.1699938903255; Mon, 13 Nov 2023 21:15:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1699938903; cv=none; d=google.com; s=arc-20160816; b=gc1Fgf3adv89IcapSShzsGE0YVRgXJha3cBi2fM5frscxrOUZf9z1JWIBto07tir1l JL65ygFpfHycjHHpWXgebzayF9sX37R+TqpxbW3tceXz61oXr8gI4tfSVKxBawq/3YUM rjsxcgZSagFWbiHLDOemjl1R7xdpjsJv1u0ecVD0uO5d/9OufFGFaKuwIc8QjfO1hAnQ 20fYyqmk/S0BSm2UD1KQj2QQfiPSoLVV//ul6WEVajLPlqLeZ1l6XdQlaG8Fv+QqMwRt HtKb4FgF6/BKXf0XtHyR1vF/VG499f2X9wZxN1tT2kKVkfNZxRtclfh4RlavepkY4mkr P/rQ== 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 :references:in-reply-to:message-id:date:subject:cc:to:from; bh=YzO8Xmil0YHbfU4nohBsWlgX+GJhTjWvq9h3l2HNsl4=; fh=V2J5DHn0lHtldVpcv/exnbGcu06d5n6VQ+L/z9BBIRM=; b=JwRFvC0bkAF/v4ZVYB0zNe3R3GG1HKVGV4sJynNPkgIopbNHGcnoZEwVN92XKGpQmf 6C2dOM08bEa4m6IRezOQRvNq/VCNvHi10gffHGQlKqjUeSg2mS1c5l6K86Kc144D8s/O 1E6EP6YbdwlYfYiTAeSnWYmTQp3VKhJjMnRXySymK4OlQXWKQoBTVHr7PM1NK5oU0Bg9 /4FhLmfnQ+FBc2KD09u2SOqNEjRElXEZmtmOY7s8Q3HFlYRYK9khZJ8NlBMW/rfsA5QA BmVtaBk9uCOcq6n+oYKgJDYfzLooyZJ8h3izkOk6ky7Vbas3mmyfy7/7bstjFdz8n6S6 OXNg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id c128-20020a633586000000b005be3117805esi7287428pga.327.2023.11.13.21.15.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Nov 2023 21:15:03 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 799BC80212BF; Mon, 13 Nov 2023 21:15:02 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232143AbjKNFOr (ORCPT + 30 others); Tue, 14 Nov 2023 00:14:47 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45306 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232149AbjKNFOk (ORCPT ); Tue, 14 Nov 2023 00:14:40 -0500 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id F30D6172A; Mon, 13 Nov 2023 21:14:27 -0800 (PST) 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 E32AC1595; Mon, 13 Nov 2023 21:15:12 -0800 (PST) Received: from a077893.blr.arm.com (a077893.blr.arm.com [10.162.41.8]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id C84553F7B4; Mon, 13 Nov 2023 21:14:22 -0800 (PST) From: Anshuman Khandual To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, will@kernel.org, catalin.marinas@arm.com, mark.rutland@arm.com Cc: Anshuman Khandual , Mark Brown , James Clark , Rob Herring , Marc Zyngier , Suzuki Poulose , Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , linux-perf-users@vger.kernel.org Subject: [V14 7/8] perf: test: Remove empty lines from branch filter test output Date: Tue, 14 Nov 2023 10:43:28 +0530 Message-Id: <20231114051329.327572-8-anshuman.khandual@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20231114051329.327572-1-anshuman.khandual@arm.com> References: <20231114051329.327572-1-anshuman.khandual@arm.com> MIME-Version: 1.0 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Mon, 13 Nov 2023 21:15:02 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1782515135713371267 X-GMAIL-MSGID: 1782515135713371267 From: James Clark In the perf script command, spaces are turned into newlines. But when there is a double space this results in empty lines which fail the following inverse grep test, so strip the empty lines. Cc: Mark Rutland Cc: Arnaldo Carvalho de Melo Cc: linux-perf-users@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: James Clark Signed-off-by: Anshuman Khandual --- Changes in V14: - This is a new patch in the series tools/perf/tests/shell/test_brstack.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/perf/tests/shell/test_brstack.sh b/tools/perf/tests/shell/test_brstack.sh index 283c9a902bbf..b1fe29bb71b3 100755 --- a/tools/perf/tests/shell/test_brstack.sh +++ b/tools/perf/tests/shell/test_brstack.sh @@ -62,7 +62,7 @@ test_filter() { echo "Testing branch stack filtering permutation ($test_filter_filter,$test_filter_expect)" perf record -o $TMPDIR/perf.data --branch-filter $test_filter_filter,save_type,u -- ${TESTPROG} > /dev/null 2>&1 - perf script -i $TMPDIR/perf.data --fields brstack | tr ' ' '\n' > $TMPDIR/perf.script + perf script -i $TMPDIR/perf.data --fields brstack | tr ' ' '\n' | sed '/^[[:space:]]*$/d' > $TMPDIR/perf.script # fail if we find any branch type that doesn't match any of the expected ones # also consider UNKNOWN branch types (-)