ShellCheck - shell script analysis tool version: 0.11.0 license: GNU General Public License, version 3 website: https://www.shellcheck.net Redirect to /tmp/tmp.GYLBPS5bfY and /tmp/tmp.hiKsUvza7B Tree base: a3e5e260c9c3 ("selftests: hsr: Add ping test for PRP") Now at: 046ba07d34d4 ("selftests: hsr: Check duplicates on HSR with VLAN") ====== Checking before the patch ====== Checking tools/testing/selftests/net/hsr/hsr_ping.sh - 5293a5cd9ad2d3974447f3107cee3aaec92822c2a0453c8aa65339049c431fdf In hsr_ping.sh line 17: usage $0 ^-- SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: usage "$0" In hsr_ping.sh line 24: usage $0 ^-- SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: usage "$0" In hsr_ping.sh line 34: do_ping "$ns1" 100.64.0.2 ^--^ SC2154 (warning): ns1 is referenced but not assigned. In hsr_ping.sh line 35: do_ping "$ns2" 100.64.0.1 ^--^ SC2154 (warning): ns2 is referenced but not assigned. In hsr_ping.sh line 36: do_ping "$ns3" 100.64.0.1 ^--^ SC2154 (warning): ns3 is referenced but not assigned. In hsr_ping.sh line 59: if [ $? -ne 0 ] ^-- SC2181 (style): Check exit code directly with e.g. 'if ! mycmd;', not indirectly with $?. In hsr_ping.sh line 64: let "WAIT = WAIT - 1" ^------------------^ SC2219 (style): Instead of 'let expr', prefer (( expr )) . In hsr_ping.sh line 143: ip -net "$ns1" link add name hsr1 type hsr slave1 ns1eth1 slave2 ns1eth2 supervision 45 version $HSRv proto 0 ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -net "$ns1" link add name hsr1 type hsr slave1 ns1eth1 slave2 ns1eth2 supervision 45 version "$HSRv" proto 0 In hsr_ping.sh line 144: ip -net "$ns2" link add name hsr2 type hsr slave1 ns2eth1 slave2 ns2eth2 supervision 45 version $HSRv proto 0 ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -net "$ns2" link add name hsr2 type hsr slave1 ns2eth1 slave2 ns2eth2 supervision 45 version "$HSRv" proto 0 In hsr_ping.sh line 145: ip -net "$ns3" link add name hsr3 type hsr slave1 ns3eth1 slave2 ns3eth2 supervision 45 version $HSRv proto 0 ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -net "$ns3" link add name hsr3 type hsr slave1 ns3eth1 slave2 ns3eth2 supervision 45 version "$HSRv" proto 0 For more information: https://www.shellcheck.net/wiki/SC2154 -- ns1 is referenced but not assigned. https://www.shellcheck.net/wiki/SC2086 -- Double quote to prevent globbing ... https://www.shellcheck.net/wiki/SC2181 -- Check exit code directly with e.g... ====== Checking the tree with the patch ====== Checking tools/testing/selftests/net/hsr/hsr_ping.sh - 5293a5cd9ad2d3974447f3107cee3aaec92822c2a0453c8aa65339049c431fdf In hsr_ping.sh line 17: usage $0 ^-- SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: usage "$0" In hsr_ping.sh line 24: usage $0 ^-- SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: usage "$0" In hsr_ping.sh line 38: do_ping "$ns1" "100.64.$netid.2" ^--^ SC2154 (warning): ns1 is referenced but not assigned. In hsr_ping.sh line 40: do_ping "$ns2" "100.64.$netid.1" ^--^ SC2154 (warning): ns2 is referenced but not assigned. In hsr_ping.sh line 42: do_ping "$ns3" "100.64.$netid.1" ^--^ SC2154 (warning): ns3 is referenced but not assigned. In hsr_ping.sh line 62: if [ $? -ne 0 ] ^-- SC2181 (style): Check exit code directly with e.g. 'if ! mycmd;', not indirectly with $?. In hsr_ping.sh line 67: let "WAIT = WAIT - 1" ^------------------^ SC2219 (style): Instead of 'let expr', prefer (( expr )) . For more information: https://www.shellcheck.net/wiki/SC2154 -- ns1 is referenced but not assigned. https://www.shellcheck.net/wiki/SC2086 -- Double quote to prevent globbing ... https://www.shellcheck.net/wiki/SC2181 -- Check exit code directly with e.g...