[LTP] [PATCH 0/4] checkbashisms.pl in make check + fixed docs
Joerg Vehlow
lkml@jv-coder.de
Thu Sep 2 16:01:48 CEST 2021
Hi
one general question about this: How to we want to handle false-positives?
e.g.:
$ checkbashisms testcases/kernel/controllers/memcg/functional/memcg_lib.sh
possible bashism in
testcases/kernel/controllers/memcg/functional/memcg_lib.sh line 387
('((' should be '$(('):
local limit_down=$(( PAGESIZE * ((limit + PAGESIZE - 1) /
PAGESIZE) ))
This is obviously a false positive, but could probably be adding a space
between the brackets.
or
$ checkbashisms testcases/kernel/connectors/pec/cn_pec.sh
possible bashism in testcases/kernel/connectors/pec/cn_pec.sh line 127
(should be >word 2>&1):
done <&${fd_act}
This one is just a false positive and I have no clue how to prevent this.
I think the script does not like the <&, but this is posix...
Joerg
More information about the ltp
mailing list