]> www.infradead.org Git - users/sagi/blktests.git/commit
Make group/rc and common/rc sources explicit and reenable SC2034
authorOmar Sandoval <osandov@fb.com>
Tue, 26 Jun 2018 18:27:11 +0000 (11:27 -0700)
committerOmar Sandoval <osandov@fb.com>
Tue, 26 Jun 2018 18:45:28 +0000 (11:45 -0700)
commit4ec63eecdfd8b4f30d0f2355a7ab742f8d1f89f0
tree9a50db80878b0dc01c1ca194af40db155e205821
parentfdfe971b197400f74225e487a703b3bd9bafb068
Make group/rc and common/rc sources explicit and reenable SC2034

SC2034 (unused variable) is a useful warning, but we disabled it because
we set a bunch of global variables as test metadata. However, this is
easy to work around: as Bart demonstrated, an echo "$VAR" > /dev/null
does the trick.

However, we don't want to copy-and-paste this everywhere, so we need to
source something everywhere. Bart's idea was to put this in
common/shellcheck and source that everywhere. Sourcing a file just to
appease the linter is silly, though, so instead, this adds explicit
sources of tests/*/rc to each test, which in turn sources common/rc,
which in turn sources common/shellcheck.

Signed-off-by: Omar Sandoval <osandov@fb.com>
74 files changed:
Makefile
check
common/cpuhotplug
common/fio
common/iopoll
common/nbd [deleted file]
common/nvme [deleted file]
common/rc
common/scsi [deleted file]
common/shellcheck [moved from common/loop with 71% similarity]
new
tests/block/001
tests/block/002
tests/block/003
tests/block/004
tests/block/005
tests/block/006
tests/block/007
tests/block/008
tests/block/009
tests/block/010
tests/block/011
tests/block/012
tests/block/013
tests/block/014
tests/block/015
tests/block/016
tests/block/017
tests/block/018
tests/block/019
tests/block/020
tests/block/021
tests/block/rc
tests/loop/001
tests/loop/002
tests/loop/003
tests/loop/004
tests/loop/005
tests/loop/rc
tests/meta/001
tests/meta/002
tests/meta/003
tests/meta/004
tests/meta/005
tests/meta/006
tests/meta/007
tests/meta/008
tests/meta/009
tests/meta/010
tests/meta/011
tests/meta/012
tests/meta/rc
tests/nbd/001
tests/nbd/002
tests/nbd/rc
tests/nvme/001
tests/nvme/002
tests/nvme/003
tests/nvme/004
tests/nvme/005
tests/nvme/006
tests/nvme/007
tests/nvme/008
tests/nvme/009
tests/nvme/010
tests/nvme/011
tests/nvme/012
tests/nvme/013
tests/nvme/rc
tests/scsi/001
tests/scsi/002
tests/scsi/003
tests/scsi/004
tests/scsi/rc