From a3c90994bd7ddb725c46f5ee0e96dcd329adc554 Mon Sep 17 00:00:00 2001 From: Maciej Wawryk Date: Thu, 10 Oct 2019 07:48:25 +0200 Subject: [PATCH] test: Shellcheck - correct rule: expr is antiquated Correct shellcheck rule SC2003: expr is antiquated. Consider rewriting this using $((..)), ${} or . Signed-off-by: Maciej Wawryk Change-Id: I98a677cce7a1ffdfa5e1cf417a128900fba64124 Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/470902 Reviewed-by: Jim Harris Reviewed-by: Ben Walker Reviewed-by: Karol Latecki Tested-by: SPDK CI Jenkins --- scripts/check_format.sh | 2 +- scripts/prep_benchmarks.sh | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/check_format.sh b/scripts/check_format.sh index 281262073..285e3eb8a 100755 --- a/scripts/check_format.sh +++ b/scripts/check_format.sh @@ -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,\ diff --git a/scripts/prep_benchmarks.sh b/scripts/prep_benchmarks.sh index 0930b3961..1bb91385e 100755 --- a/scripts/prep_benchmarks.sh +++ b/scripts/prep_benchmarks.sh @@ -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"