test: Shellcheck - correct rule: expr is antiquated

Correct shellcheck rule SC2003: expr is antiquated.
Consider rewriting this using $((..)), ${} or .

Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: I98a677cce7a1ffdfa5e1cf417a128900fba64124
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/470902
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This commit is contained in:
Maciej Wawryk 2019-10-10 07:48:25 +02:00 committed by Jim Harris
parent 4b3a6e876c
commit a3c90994bd
2 changed files with 3 additions and 3 deletions

View File

@ -241,7 +241,7 @@ if hash shellcheck 2>/dev/null; then
# Error descriptions can also be found at: https://github.com/koalaman/shellcheck/wiki
# This SHCK_EXCLUDE list is out "to do" and we work to fix all of this errors.
SHCK_EXCLUDE="SC1001,SC1003,\
SC1083,SC1113,SC2001,SC2002,SC2003,SC2004,\
SC1083,SC1113,SC2001,SC2002,SC2004,\
SC2010,SC2012,SC2013,SC2016,\
SC2034,SC2045,SC2046,\
SC2068,SC2086,SC2089,SC2090,\

View File

@ -18,10 +18,10 @@ function configure_performance() {
echo "Done"
echo -n "Moving all interrupts off of core 0..."
count=$(expr $(nproc) / 4)
count=$(($(nproc) / 4))
cpumask="e"
for ((i=1; i<$count; i++)); do
if [ $(expr $i % 8) -eq 0 ]; then
if [ $((i % 8)) -eq 0 ]; then
cpumask=",$cpumask"
fi
cpumask="f$cpumask"