ShellCheck - shell script analysis tool version: 0.10.0 license: GNU General Public License, version 3 website: https://www.shellcheck.net Redirect to /tmp/tmp.DhDbduykTY and /tmp/tmp.9VRGL62lxW Tree base: c404333a9b51 ("selftests: defer: Allow spaces in arguments of deferred commands") Now at: 454de303450c ("selftests: defer: Introduce DEFER_PAUSE_ON_FAIL") ====== Checking before the patch ====== Checking tools/testing/selftests/net/lib/sh/defer.sh - 8b5c1663cf2cc523f0df30980c0997bab7e563ce6e18a7b06d679fdbe5f2cabd In defer.sh line 18: echo $__DEFER__SCOPE_ID,$track ^----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: echo $__DEFER__SCOPE_ID,"$track" In defer.sh line 26: echo $__DEFER__SCOPE_ID,$track,$defer_ix ^----^ SC2086 (info): Double quote to prevent globbing and word splitting. ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: echo $__DEFER__SCOPE_ID,"$track","$defer_ix" In defer.sh line 33: echo ${__DEFER__NJOBS[$(__defer__ndefer_key $track)]} ^-- SC2086 (info): Double quote to prevent globbing and word splitting. ^----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: echo "${__DEFER__NJOBS[$(__defer__ndefer_key "$track")]}" In defer.sh line 40: local defer_key=$(__defer__defer_key $track $defer_ix) ^-------^ SC2155 (warning): Declare and assign separately to avoid masking return values. ^----^ SC2086 (info): Double quote to prevent globbing and word splitting. ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: local defer_key=$(__defer__defer_key "$track" "$defer_ix") In defer.sh line 42: eval ${__DEFER__JOBS[$defer_key]} ^--------------------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: eval "${__DEFER__JOBS[$defer_key]}" In defer.sh line 43: unset __DEFER__JOBS[$defer_key] ^-----------------------^ SC2184 (warning): Quote arguments to unset so they're not glob expanded. ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: unset __DEFER__JOBS["$defer_key"] In defer.sh line 49: local ndefers=$(__defer__ndefers $track) ^-----^ SC2155 (warning): Declare and assign separately to avoid masking return values. ^----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: local ndefers=$(__defer__ndefers "$track") In defer.sh line 50: local ndefers_key=$(__defer__ndefer_key $track) ^---------^ SC2155 (warning): Declare and assign separately to avoid masking return values. ^----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: local ndefers_key=$(__defer__ndefer_key "$track") In defer.sh line 51: local defer_key=$(__defer__defer_key $track $ndefers) ^-------^ SC2155 (warning): Declare and assign separately to avoid masking return values. ^----^ SC2086 (info): Double quote to prevent globbing and word splitting. ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: local defer_key=$(__defer__defer_key "$track" "$ndefers") In defer.sh line 52: local defer="${@@Q}" ^------^ SC2124 (warning): Assigning an array to a string! Assign as array, or use * instead of @ to concatenate. For more information: https://www.shellcheck.net/wiki/SC2124 -- Assigning an array to a string! A... https://www.shellcheck.net/wiki/SC2155 -- Declare and assign separately to ... https://www.shellcheck.net/wiki/SC2184 -- Quote arguments to unset so they'... ====== Checking the tree with the patch ====== Checking tools/testing/selftests/net/lib/sh/defer.sh - 8b5c1663cf2cc523f0df30980c0997bab7e563ce6e18a7b06d679fdbe5f2cabd In defer.sh line 22: echo $__DEFER__SCOPE_ID,$track ^----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: echo $__DEFER__SCOPE_ID,"$track" In defer.sh line 30: echo $__DEFER__SCOPE_ID,$track,$defer_ix ^----^ SC2086 (info): Double quote to prevent globbing and word splitting. ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: echo $__DEFER__SCOPE_ID,"$track","$defer_ix" In defer.sh line 37: echo ${__DEFER__NJOBS[$(__defer__ndefer_key $track)]} ^-- SC2086 (info): Double quote to prevent globbing and word splitting. ^----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: echo "${__DEFER__NJOBS[$(__defer__ndefer_key "$track")]}" In defer.sh line 44: local defer_key=$(__defer__defer_key $track $defer_ix) ^-------^ SC2155 (warning): Declare and assign separately to avoid masking return values. ^----^ SC2086 (info): Double quote to prevent globbing and word splitting. ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: local defer_key=$(__defer__defer_key "$track" "$defer_ix") In defer.sh line 47: eval ${__DEFER__JOBS[$defer_key]} ^--------------------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: eval "${__DEFER__JOBS[$defer_key]}" In defer.sh line 55: read a ^--^ SC2162 (info): read without -r will mangle backslashes. In defer.sh line 59: unset __DEFER__JOBS[$defer_key] ^-----------------------^ SC2184 (warning): Quote arguments to unset so they're not glob expanded. ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: unset __DEFER__JOBS["$defer_key"] In defer.sh line 65: local ndefers=$(__defer__ndefers $track) ^-----^ SC2155 (warning): Declare and assign separately to avoid masking return values. ^----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: local ndefers=$(__defer__ndefers "$track") In defer.sh line 66: local ndefers_key=$(__defer__ndefer_key $track) ^---------^ SC2155 (warning): Declare and assign separately to avoid masking return values. ^----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: local ndefers_key=$(__defer__ndefer_key "$track") In defer.sh line 67: local defer_key=$(__defer__defer_key $track $ndefers) ^-------^ SC2155 (warning): Declare and assign separately to avoid masking return values. ^----^ SC2086 (info): Double quote to prevent globbing and word splitting. ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: local defer_key=$(__defer__defer_key "$track" "$ndefers") In defer.sh line 68: local defer="${@@Q}" ^------^ SC2124 (warning): Assigning an array to a string! Assign as array, or use * instead of @ to concatenate. For more information: https://www.shellcheck.net/wiki/SC2124 -- Assigning an array to a string! A... https://www.shellcheck.net/wiki/SC2155 -- Declare and assign separately to ... https://www.shellcheck.net/wiki/SC2184 -- Quote arguments to unset so they'...