Skip to content

Commit 47f5693

Browse files
athira-rajeevnamhyung
authored andcommitted
perf tests: Ignore shellcheck warning in lock_contention
Running shellcheck on lock_contention.sh generates below warning In tests/shell/lock_contention.sh line 36: if [ `nproc` -lt 4 ]; then ^-----^ SC2046: Quote this to prevent word splitting. Here since nproc will generate a single word output and there is no possibility of word splitting, this warning can be ignored. Use exception for this with "disable" option in shellcheck. This warning is observed after commit: "commit 29441ab ("perf test lock_contention.sh: Skip test if not enough CPUs")" Fixes: 29441ab ("perf test lock_contention.sh: Skip test if not enough CPUs") Signed-off-by: Athira Rajeev <atrajeev@linux.vnet.ibm.com> Reviewed-by: Kajol Jain <kjain@linux.ibm.com> Acked-by: Namhyung Kim <namhyung@kernel.org> Cc: maddy@linux.ibm.com Cc: disgoel@linux.vnet.ibm.com Cc: linuxppc-dev@lists.ozlabs.org Link: https://lore.kernel.org/r/20231013073021.99794-2-atrajeev@linux.vnet.ibm.com Signed-off-by: Namhyung Kim <namhyung@kernel.org>
1 parent f6a66ff commit 47f5693

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

tools/perf/tests/shell/lock_contention.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ check() {
3333
exit
3434
fi
3535

36+
# shellcheck disable=SC2046
3637
if [ `nproc` -lt 4 ]; then
3738
echo "[Skip] Low number of CPUs (`nproc`), lock event cannot be triggered certainly"
3839
err=2

0 commit comments

Comments
 (0)