Re: [PATCH 1/4] perf test: Fix non-bash issue with stat bpf counters
From: Ian Rogers <irogers@google.com>
Date: 2021-06-21 21:31:08
Also in:
bpf, lkml
From: Ian Rogers <irogers@google.com>
Date: 2021-06-21 21:31:08
Also in:
bpf, lkml
On Sun, Jun 20, 2021 at 2:55 PM Stephen Rothwell [off-list ref] wrote:
Hi Ian, On Thu, 17 Jun 2021 11:42:13 -0700 Ian Rogers [off-list ref] wrote:quoted
$(( .. )) is a bash feature but the test's interpreter is !/bin/sh, switch the code to use expr.The $(( .. )) syntax is specified in POSIX (see https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_06_04), so unless this caused an actual problem, this change is unnecessary.
Agreed. The issue I was seeing was: ./tests/shell/stat_bpf_counters.sh: line 14: <not + <not / 10 : syntax error: operand expected (error token is "<not + <not / 10 ") but that syntax error is caused by running the test within a hypervisor. I'll resend the patch set with this one dropped. Thanks, Ian
-- Cheers, Stephen Rothwell