lkml.org 
[lkml]   [2024]   [Apr]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH v2 4/4] perf tests: Remove dependency on lscpu
    Date
    This check can be done with uname which is more portable. At the same
    time re-arrange it into a standard if statement so that it's more
    readable.

    Signed-off-by: James Clark <james.clark@arm.com>
    ---
    tools/perf/tests/shell/test_arm_callgraph_fp.sh | 4 +++-
    1 file changed, 3 insertions(+), 1 deletion(-)

    diff --git a/tools/perf/tests/shell/test_arm_callgraph_fp.sh b/tools/perf/tests/shell/test_arm_callgraph_fp.sh
    index 83b53591b1ea..61898e256616 100755
    --- a/tools/perf/tests/shell/test_arm_callgraph_fp.sh
    +++ b/tools/perf/tests/shell/test_arm_callgraph_fp.sh
    @@ -6,7 +6,9 @@ shelldir=$(dirname "$0")
    # shellcheck source=lib/perf_has_symbol.sh
    . "${shelldir}"/lib/perf_has_symbol.sh

    -lscpu | grep -q "aarch64" || exit 2
    +if [ "$(uname -m)" != "aarch64" ]; then
    + exit 2
    +fi

    if perf version --build-options | grep HAVE_DWARF_UNWIND_SUPPORT | grep -q OFF
    then
    --
    2.34.1

    \
     
     \ /
      Last update: 2024-05-27 16:32    [W:4.053 / U:0.748 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site