From nobody Tue Feb 10 20:28:48 2026 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 94F3C2C195; Fri, 5 Apr 2024 02:47:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712285266; cv=none; b=FU3N0A3Nq8jJeWc5sYtgSD5az1lywIxujHd2ncM2PiM4ITJoUsHZytnO9Rxno4YiV+NmkK87vhtvxjRv1JIpUhukOm3bi7MvCbxR9JfLc8rKko2GzWVWcx+v6KPc5PTdjme5MKCwfAVhtYFBDqIXw4Uy6moVY55hMqjHeamB+xA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712285266; c=relaxed/simple; bh=qOOH+9Hm9oB6Pl9slmBg92oE0d/kfGAl6EWMtpIF2+o=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=RztyP7m3J4zbAk66VgdM4L6eBzW4D2BZW8+qIErL8cqj+Hw4hskS8DsDcH6PHf1Rc2hqcJS1rSBhZR7FFvuAEE+2d29MoidchZyr81qT6bVvHrUWJmNPQsD7beMQgbACrDiJJAJ9KTPgta+RkuNZusGdV0tl+D/2J4Qct1icuzY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com 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> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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/shel= l/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,$te= st_filter_expect)" =20 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 =20 # fail if we find any branch type that doesn't match any of the expected = ones # also consider UNKNOWN branch types (-) --=20 2.25.1