diff options
author | наб <[email protected]> | 2021-05-21 23:43:38 +0200 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2021-06-01 11:38:49 -0700 |
commit | c3ef9f7528d160faa08bbddfa29d7ad58835e1bd (patch) | |
tree | 92908b88b6e62697da5156129e2fe4b929411e64 /tests | |
parent | d3858ab78894cbd6d2b63d350a25dfa7ab378ce7 (diff) |
Turn shellcheck into a normal make target. Fix new files it caught
This checks every file it checked (and a few more),
but explicitly instead of "if it works it works" best-effort
(which wasn't that good anyway)
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Ahelenia Ziemiańska <[email protected]>
Closes #10512
Closes #12101
Diffstat (limited to 'tests')
-rw-r--r-- | tests/Makefile.am | 5 | ||||
-rwxr-xr-x | tests/zfs-tests/tests/perf/scripts/prefetch_io.sh | 6 |
2 files changed, 8 insertions, 3 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am index f13b19613..4bdde9c45 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -1,3 +1,8 @@ +include $(top_srcdir)/config/Shellcheck.am + SUBDIRS = runfiles test-runner zfs-tests EXTRA_DIST = README.md + +SHELLCHECKSCRIPTS = $$(find -name '*.sh') +.PHONY: $(SHELLCHECKSCRIPTS) diff --git a/tests/zfs-tests/tests/perf/scripts/prefetch_io.sh b/tests/zfs-tests/tests/perf/scripts/prefetch_io.sh index d8181f2e8..07688ef21 100755 --- a/tests/zfs-tests/tests/perf/scripts/prefetch_io.sh +++ b/tests/zfs-tests/tests/perf/scripts/prefetch_io.sh @@ -64,17 +64,17 @@ async_upgrade_sync=$(get_async_upgrade_sync) while true do new_prefetch_ios=$(get_prefetch_ios) - printf "%u\n%-24s\t%u\n" "$(date +%s)" "prefetch_ios" \ + printf '%u\n%-24s\t%u\n' "$(date +%s)" "prefetch_ios" \ $(( new_prefetch_ios - prefetch_ios )) prefetch_ios=$new_prefetch_ios new_prefetched_demand_reads=$(get_prefetched_demand_reads) - printf "%-24s\t%u\n" "prefetched_demand_reads" \ + printf '%-24s\t%u\n' "prefetched_demand_reads" \ $(( new_prefetched_demand_reads - prefetched_demand_reads )) prefetched_demand_reads=$new_prefetched_demand_reads new_async_upgrade_sync=$(get_async_upgrade_sync) - printf "%-24s\t%u\n" "async_upgrade_sync" \ + printf '%-24s\t%u\n' "async_upgrade_sync" \ $(( new_async_upgrade_sync - async_upgrade_sync )) async_upgrade_sync=$new_async_upgrade_sync |