lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YMugA9HDxB57MFTS@kernel.org>
Date:   Thu, 17 Jun 2021 16:18:27 -0300
From:   Arnaldo Carvalho de Melo <acme@...nel.org>
To:     Ian Rogers <irogers@...gle.com>
Cc:     Peter Zijlstra <peterz@...radead.org>,
        Ingo Molnar <mingo@...hat.com>,
        Mark Rutland <mark.rutland@....com>,
        Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
        Jiri Olsa <jolsa@...hat.com>,
        Namhyung Kim <namhyung@...nel.org>,
        Song Liu <songliubraving@...com>,
        linux-perf-users@...r.kernel.org, linux-kernel@...r.kernel.org,
        bpf@...r.kernel.org
Subject: Re: [PATCH 1/4] perf test: Fix non-bash issue with stat bpf counters

Em Thu, Jun 17, 2021 at 11:42:13AM -0700, Ian Rogers escreveu:
> $(( .. )) is a bash feature but the test's interpreter is !/bin/sh,
> switch the code to use expr.


Thanks, applied to perf/urgent.

- Arnaldo

 
> Signed-off-by: Ian Rogers <irogers@...gle.com>
> ---
>  tools/perf/tests/shell/stat_bpf_counters.sh | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/tools/perf/tests/shell/stat_bpf_counters.sh b/tools/perf/tests/shell/stat_bpf_counters.sh
> index 22eb31e48ca7..2f9948b3d943 100755
> --- a/tools/perf/tests/shell/stat_bpf_counters.sh
> +++ b/tools/perf/tests/shell/stat_bpf_counters.sh
> @@ -11,9 +11,9 @@ compare_number()
>         second_num=$2
>  
>         # upper bound is first_num * 110%
> -       upper=$(( $first_num + $first_num / 10 ))
> +       upper=$(expr $first_num + $first_num / 10 )
>         # lower bound is first_num * 90%
> -       lower=$(( $first_num - $first_num / 10 ))
> +       lower=$(expr $first_num - $first_num / 10 )
>  
>         if [ $second_num -gt $upper ] || [ $second_num -lt $lower ]; then
>                 echo "The difference between $first_num and $second_num are greater than 10%."
> -- 
> 2.32.0.288.g62a8d224e6-goog
> 

-- 

- Arnaldo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ