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.VBGMZCoLH5 and /tmp/tmp.bN2104DTVC Tree base: 599ce7969b9e ("neighbor: Add NTF_EXT_VALIDATED flag for externally validated entries") Now at: 2f84a0782aeb ("selftests: net: Add a selftest for externally validated neighbor entries") ====== Checking before the patch ====== ====== Checking the tree with the patch ====== Checking tools/testing/selftests/net/test_neigh.sh - 70bbf55c19dc3cada7b225b5fb24c3f4b304bcfe9fcc689690f074df804e6e2c In test_neigh.sh line 21: printf "COMMAND: $cmd\n" ^---------------^ SC2059 (info): Don't use variables in the printf format string. Use printf '..%s..' "$foo". In test_neigh.sh line 25: out=$(eval $cmd $stderr) ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: out=$(eval "$cmd" $stderr) In test_neigh.sh line 43: ip -n $ns1 link add veth0 type veth peer name veth1 netns $ns2 ^--^ SC2154 (warning): ns1 is referenced but not assigned. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2154 (warning): ns2 is referenced but not assigned. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -n "$ns1" link add veth0 type veth peer name veth1 netns "$ns2" In test_neigh.sh line 44: ip -n $ns1 link set dev veth0 up ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -n "$ns1" link set dev veth0 up In test_neigh.sh line 45: ip -n $ns2 link set dev veth1 up ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -n "$ns2" link set dev veth1 up In test_neigh.sh line 47: ip -n $ns1 address add 192.0.2.1/24 dev veth0 ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -n "$ns1" address add 192.0.2.1/24 dev veth0 In test_neigh.sh line 48: ip -n $ns1 address add 2001:db8:1::1/64 dev veth0 nodad ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -n "$ns1" address add 2001:db8:1::1/64 dev veth0 nodad In test_neigh.sh line 49: ip -n $ns2 address add 192.0.2.2/24 dev veth1 ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -n "$ns2" address add 192.0.2.2/24 dev veth1 In test_neigh.sh line 50: ip -n $ns2 address add 2001:db8:1::2/64 dev veth1 nodad ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -n "$ns2" address add 2001:db8:1::2/64 dev veth1 nodad In test_neigh.sh line 74: mac=$(ip -n $ns2 -j link show dev veth1 | jq -r '.[]["address"]') ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: mac=$(ip -n "$ns2" -j link show dev veth1 | jq -r '.[]["address"]') In test_neigh.sh line 148: delay_probe=$(ip -n $ns1 -j ntable show dev veth0 name $tbl_name | jq '.[]["delay_probe"]') ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: delay_probe=$(ip -n "$ns1" -j ntable show dev veth0 name "$tbl_name" | jq '.[]["delay_probe"]') In test_neigh.sh line 176: retrans_time=$(ip -n $ns1 -j ntable show dev veth0 name $tbl_name | jq '.[]["retrans"]') ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: retrans_time=$(ip -n "$ns1" -j ntable show dev veth0 name "$tbl_name" | jq '.[]["retrans"]') In test_neigh.sh line 177: ucast_probes=$(ip -n $ns1 -j ntable show dev veth0 name $tbl_name | jq '.[]["ucast_probes"]') ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ucast_probes=$(ip -n "$ns1" -j ntable show dev veth0 name "$tbl_name" | jq '.[]["ucast_probes"]') In test_neigh.sh line 178: app_probes=$(ip -n $ns1 -j ntable show dev veth0 name $tbl_name | jq '.[]["app_probes"]') ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: app_probes=$(ip -n "$ns1" -j ntable show dev veth0 name "$tbl_name" | jq '.[]["app_probes"]') In test_neigh.sh line 179: mcast_reprobes=$(ip -n $ns1 -j ntable show dev veth0 name $tbl_name | jq '.[]["mcast_reprobes"]') ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: mcast_reprobes=$(ip -n "$ns1" -j ntable show dev veth0 name "$tbl_name" | jq '.[]["mcast_reprobes"]') In test_neigh.sh line 186: probes=$(ip -n $ns1 -j -s neigh get $ip_addr dev veth0 | jq '.[]["probes"]') ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: probes=$(ip -n "$ns1" -j -s neigh get "$ip_addr" dev veth0 | jq '.[]["probes"]') In test_neigh.sh line 214: orig_thresh1=$(ip -j ntable show name $tbl_name | jq '.[] | select(has("thresh1")) | .["thresh1"]') ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: orig_thresh1=$(ip -j ntable show name "$tbl_name" | jq '.[] | select(has("thresh1")) | .["thresh1"]') In test_neigh.sh line 215: orig_thresh2=$(ip -j ntable show name $tbl_name | jq '.[] | select(has("thresh2")) | .["thresh2"]') ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: orig_thresh2=$(ip -j ntable show name "$tbl_name" | jq '.[] | select(has("thresh2")) | .["thresh2"]') In test_neigh.sh line 216: orig_thresh3=$(ip -j ntable show name $tbl_name | jq '.[] | select(has("thresh3")) | .["thresh3"]') ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: orig_thresh3=$(ip -j ntable show name "$tbl_name" | jq '.[] | select(has("thresh3")) | .["thresh3"]') In test_neigh.sh line 221: forced_gc_runs_t0=$(ip -j -s ntable show name $tbl_name | jq '.[] | select(has("forced_gc_runs")) | .["forced_gc_runs"]') ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: forced_gc_runs_t0=$(ip -j -s ntable show name "$tbl_name" | jq '.[] | select(has("forced_gc_runs")) | .["forced_gc_runs"]') In test_neigh.sh line 225: forced_gc_runs_t1=$(ip -j -s ntable show name $tbl_name | jq '.[] | select(has("forced_gc_runs")) | .["forced_gc_runs"]') ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: forced_gc_runs_t1=$(ip -j -s ntable show name "$tbl_name" | jq '.[] | select(has("forced_gc_runs")) | .["forced_gc_runs"]') In test_neigh.sh line 258: orig_thresh1=$(ip -j ntable show name $tbl_name | jq '.[] | select(has("thresh1")) | .["thresh1"]') ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: orig_thresh1=$(ip -j ntable show name "$tbl_name" | jq '.[] | select(has("thresh1")) | .["thresh1"]') In test_neigh.sh line 259: orig_base_reachable=$(ip -j ntable show name $tbl_name | jq '.[] | select(has("thresh1")) | .["base_reachable"]') ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: orig_base_reachable=$(ip -j ntable show name "$tbl_name" | jq '.[] | select(has("thresh1")) | .["base_reachable"]') In test_neigh.sh line 261: orig_gc_stale=$(ip -n $ns1 -j ntable show name $tbl_name dev veth0 | jq '.[]["gc_stale"]') ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: orig_gc_stale=$(ip -n "$ns1" -j ntable show name "$tbl_name" dev veth0 | jq '.[]["gc_stale"]') In test_neigh.sh line 270: periodic_gc_runs_t0=$(ip -j -s ntable show name $tbl_name | jq '.[] | select(has("periodic_gc_runs")) | .["periodic_gc_runs"]') ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: periodic_gc_runs_t0=$(ip -j -s ntable show name "$tbl_name" | jq '.[] | select(has("periodic_gc_runs")) | .["periodic_gc_runs"]') In test_neigh.sh line 272: periodic_gc_runs_t1=$(ip -j -s ntable show name $tbl_name | jq '.[] | select(has("periodic_gc_runs")) | .["periodic_gc_runs"]') ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: periodic_gc_runs_t1=$(ip -j -s ntable show name "$tbl_name" | jq '.[] | select(has("periodic_gc_runs")) | .["periodic_gc_runs"]') In test_neigh.sh line 318: v) VERBOSE=$(($VERBOSE + 1));; ^------^ SC2004 (style): $/${} is unnecessary on arithmetic variables. In test_neigh.sh line 327: if [ $? -ne 0 ]; then ^-- SC2181 (style): Check exit code directly with e.g. 'if ! mycmd;', not indirectly with $?. For more information: https://www.shellcheck.net/wiki/SC2154 -- ns1 is referenced but not assigned. https://www.shellcheck.net/wiki/SC2059 -- Don't use variables in the printf... https://www.shellcheck.net/wiki/SC2086 -- Double quote to prevent globbing ...