From patchwork Fri Apr 5 02:46:38 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anshuman Khandual X-Patchwork-Id: 13618406 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 9662ACD1284 for ; Fri, 5 Apr 2024 02:48:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=pnTTTtm0b7ckcm0PT+zag20bS0YY4DVZfmlfXhwFMMo=; b=iHVNNknE1xkDvZ 88BhxJRmSuHPo6f3SLwjl4PdH1smpVm9JOOSgnUZ0Uz4bg/IuYDDK+AIwqGtHSRYF04xEkvuJInNf E2HTCLwB4Hlui6zM9eYGMRG1ggVN4Db/B1TXnd2QyWE0yL10m3N1pOMsa41TGmknuCNiivC8AMOYx D136Pmbb6xFvU88ioUfSGD0AOEzB5bwkrvcS8NzZfOWk2csLhTDOqMZTmXrCk5BClR+JNUbFyJGId foB0Q93NfT37JBw23/DEE3s7iKGQ4t+nVZx+Avk1vKXZUN82SHQ6nLn56aJM0Frfq9AtYDutv8z+b neeCyr7LH0G92vhSBQMA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rsZch-00000004wt1-0Mng; Fri, 05 Apr 2024 02:48:11 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rsZca-00000004woF-2OYs for linux-arm-kernel@bombadil.infradead.org; Fri, 05 Apr 2024 02:48:04 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Content-Transfer-Encoding:MIME-Version :References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description; bh=kB39EkvWpgUECoAI4Rw+bsrcPYygrZYAki/SBQjts5k=; b=lcxZPmvIv2u73mfdeGOUr06BTQ LTgJC5ePRiiSWQjFlFNmlMeQE2Bx8VxKUAdtNEmivBO38Wghh18mNsZMrWCMUSxmYPV2DpQ/uMPE/ uCWGnEKc/K6BMaB2dDRKTmvxJhF6p/U9ue6TSX4w2nhRwkgStFZVqCC/eEl/y8jDVMys7ALAvA1qc 9fDQelBKjP+w9SpMSQjLYb/iebAi3pCmJFOKqFTRYUZF4Wrtyvt51wRmCJSh16+dx1drVGv6prr02 0TqxtwR/sjiLlRp6nWGDERY19kyluUS56WRoks3XsX5gtqYw5sTx7LkCPZBxfcOlI6q+gEhlmBg2O UVXstdPQ==; Received: from foss.arm.com ([217.140.110.172]) by desiato.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rsZcP-00000005MwQ-1323 for linux-arm-kernel@lists.infradead.org; Fri, 05 Apr 2024 02:47:59 +0000 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 74E35FEC; Thu, 4 Apr 2024 19:48:14 -0700 (PDT) Received: from a077893.blr.arm.com (a077893.blr.arm.com [10.162.41.6]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id E77703F766; Thu, 4 Apr 2024 19:47:38 -0700 (PDT) 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: [PATCH V17 8/9] perf: test: Remove empty lines from branch filter test output Date: Fri, 5 Apr 2024 08:16:38 +0530 Message-Id: <20240405024639.1179064-9-anshuman.khandual@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240405024639.1179064-1-anshuman.khandual@arm.com> References: <20240405024639.1179064-1-anshuman.khandual@arm.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240405_034754_402904_78D20588 X-CRM114-Status: GOOD ( 11.42 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 --- 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 5ea64d0c4a6f..928790f35747 100755 --- a/tools/perf/tests/shell/test_brstack.sh +++ b/tools/perf/tests/shell/test_brstack.sh @@ -68,7 +68,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 (-)