lkml.org 
[lkml]   [2023]   [Nov]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[V14 7/8] perf: test: Remove empty lines from branch filter test output
    Date
    From: James Clark <james.clark@arm.com>

    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 <mark.rutland@arm.com>
    Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
    Cc: linux-perf-users@vger.kernel.org
    Cc: linux-kernel@vger.kernel.org
    Signed-off-by: James Clark <james.clark@arm.com>
    Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com>
    ---
    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 (-)
    --
    2.25.1
    \
     
     \ /
      Last update: 2023-11-20 13:58    [W:2.183 / U:0.008 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site