numam-spdk/test
Michal Berger 9d48662103 check_format: Ignore shellcheck's SC2128 and SC2178 directives
These are currently prone to false-positives especially in terms of
scoping. Consider the following:

foo() {
	local bar=(42)
	echo "${bar[*]}"
}

bar=43
foo
echo "$bar"

Some versions of shellcheck, including the latest, 0.7.2, complain
about $bar being reused as a plain string here. This is incorrect
since foo() holds its own copy of bar[@] hence the assignment which
takes place outside of it doesn't affect its content.

SC2178 can be mitigated be reversing the order of declaration:

bar=43
foo() { ... }
...

but the SC2128 still remains.

Currently, in our code majority of these warnings are coming from
false-positives due to initial source'ing which most of our test
scripts do (e.g. they fetch a function where local bar=() is used
and in the test itself $bar happens to be assigned a plain string.
This is still valid code).

To mitigate, disable these directives untill shellcheck is capable
of properly interpreting scoping when checking them.

Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: Ifbde973eae6e261d79e1c340eb28644bce5f4e45
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8503
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2021-06-30 22:43:05 +00:00
..
accel_engine accel_engine test: Add the test case for accel_engine. 2021-01-21 15:49:40 +00:00
app lib/trace: don't pass zero as a non-argument 2021-06-28 16:17:35 +00:00
bdev test: fix nbd test typo and add check 2021-06-23 18:07:46 +00:00
blobfs event: Shift subsystem initialization code to a separate library 2021-05-24 10:12:50 +00:00
blobstore scheduler: Change main core frequency dynamically 2021-01-22 18:31:25 +00:00
common check_format: Fixes for shellcheck's SC2269 directive 2021-06-30 22:43:05 +00:00
compress test/nvmf: use recommended nvmf_create_subsystem rpc 2021-05-20 15:00:22 +00:00
config_converter scripts/config_converter: skip sections not present in legacy config 2021-01-15 08:32:10 +00:00
cpp_headers queue_extras: use SPDK_CONTAINEROF 2019-10-07 15:06:01 +00:00
dd autotest: Run dd tests under SPDK_TEST_URING 2021-05-20 15:15:33 +00:00
dpdk_memory_utility check_format: Ignore shellcheck's SC2128 and SC2178 directives 2021-06-30 22:43:05 +00:00
env Revert "env: Register external memory with DPDK" 2021-04-15 20:22:26 +00:00
event init: Declare a formal public API 2021-05-26 09:13:34 +00:00
external_code lib/bdev: Added iov to spdk_bdev_zcopy_start 2021-06-04 20:10:07 +00:00
ftl scripts: replace PCI_WHITELIST with PCI_ALLOWED 2020-12-03 09:41:07 +00:00
fuzz test/iscsi: remove VPP tests 2020-08-17 08:19:46 +00:00
interrupt test: add functional test for reactor_set_intr 2021-04-29 07:10:26 +00:00
ioat build: Example applications build to build/example 2020-06-15 15:27:16 +00:00
iscsi_tgt rbd/rpc: Add a rpc call to get the info of the clusters. 2021-05-26 09:21:48 +00:00
json_config nvmf: Add nvmf_set_crdt RPC 2021-06-04 20:02:42 +00:00
lvol test/lvol: rename lvol test script 2020-10-20 08:54:53 +00:00
make build: clarify Makefile for check_so_deps failures 2021-06-25 16:45:17 +00:00
nvme test/nvme/aer: remove duplicated changed NS list log 2021-06-11 07:18:06 +00:00
nvmf test/nvmf_multipath: Retry checking if ANA state is changed with timeout 2021-06-28 16:25:24 +00:00
ocf test: add bdev_wait_for_examine to static JSON configs 2021-05-13 10:07:07 +00:00
openstack test/openstack: Clean up the test 2021-05-24 09:58:17 +00:00
pmem build: Output executables from the app directory to build/bin 2020-06-15 15:27:16 +00:00
rpc autotest: Use rpc_cmd() for rpc plugin-based tests 2021-04-02 08:22:42 +00:00
rpc_client build: use DEPDIRS variables to build SPDK_LIB_LIST 2020-12-18 09:40:01 +00:00
rpc_plugins autotest: Use rpc_cmd() for rpc plugin-based tests 2021-04-02 08:22:42 +00:00
scheduler scheduler_dynamic: consider any core for the thread 2021-06-28 16:18:19 +00:00
setup autotest: Don't override default amount of hugepages on Linux to 8GB 2021-06-24 17:33:10 +00:00
spdkcli autotest: Don't override default amount of hugepages on Linux to 8GB 2021-06-24 17:33:10 +00:00
unit idxd: refactor flow control for idxd engine 2021-06-29 00:46:25 +00:00
vhost test/vhost: Commonize some of the environment 2021-06-04 22:52:21 +00:00
vmd test: replace VMD_WHITELIST with VMD_ALLOWED 2020-12-03 09:41:07 +00:00
Makefile build: add option to disable building unit tests 2020-03-10 09:12:21 +00:00
spdk_cunit.h test: remove leftover spdk_cunit declaration 2018-07-06 22:47:56 +00:00