From nobody Wed Dec 24 18:03:02 2025 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9B4681F947; Thu, 25 Jan 2024 09:42:14 +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=1706175737; cv=none; b=Zitu6Lsh92NKosWhhmSguSTx7rhD9CZc144UAqK/3aAfCC12qb5iaHTY9Uri4gjd5QbiGNbZpUpRac5ovAm9CkOJwKgEJuIHhra5U56JwMyA1J1hLWQp4rdnco7ZI/ZVPbURsFM0w/CxwJX7fzHbdkZpfTv77eh9MSimgzak47w= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706175737; c=relaxed/simple; bh=qOOH+9Hm9oB6Pl9slmBg92oE0d/kfGAl6EWMtpIF2+o=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=e5wniEJnVH5wbBeLKsHJcFLBudl/WDh4R4eIFN5i8hEgT4PyLSceyGAP/OLDr7UKnMpyxeTwj6A9rM5EFORHe8znl0IZ+O0pUz+pLEpqI99eFv2kbhvlCOjTgEyrjjP22OCJv1cFS99y0yxlJ8khOG/iN831ckVLflRnhyVy35E= 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 BBA99152B; Thu, 25 Jan 2024 01:42:58 -0800 (PST) Received: from a077893.arm.com (unknown [10.163.40.116]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id ACA5B3F73F; Thu, 25 Jan 2024 01:42:09 -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: [PATCH V16 7/8] perf: test: Remove empty lines from branch filter test output Date: Thu, 25 Jan 2024 15:11:18 +0530 Message-Id: <20240125094119.2542332-8-anshuman.khandual@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240125094119.2542332-1-anshuman.khandual@arm.com> References: <20240125094119.2542332-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