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.zcCgqb8A3H and /tmp/tmp.yfPQ68fFML Tree base: 27e761750ffe ("selftests: forwarding: tc_flower_l2_miss: skip tests if tools or feats are missing") Now at: 85c2812838ae ("selftests: forwarding: router_mpath_seed: skip tests if tools or feats are missing") ====== Checking before the patch ====== Checking tools/testing/selftests/net/forwarding/router_mpath_seed.sh - 3003e9ab3cecca20397778da832f15e10234bac5b1e554415eea88666fb3db5b In router_mpath_seed.sh line 38: simple_if_init $h1 192.0.2.1/28 2001:db8:1::1/64 ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: simple_if_init "$h1" 192.0.2.1/28 2001:db8:1::1/64 In router_mpath_seed.sh line 39: ip -4 route add 192.0.2.32/28 vrf v$h1 nexthop via 192.0.2.2 ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -4 route add 192.0.2.32/28 vrf v"$h1" nexthop via 192.0.2.2 In router_mpath_seed.sh line 40: ip -6 route add 2001:db8:3::/64 vrf v$h1 nexthop via 2001:db8:1::2 ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -6 route add 2001:db8:3::/64 vrf v"$h1" nexthop via 2001:db8:1::2 In router_mpath_seed.sh line 43: h1_destroy() ^-- SC2329 (info): This function is never invoked. Check usage (or ignored if invoked indirectly). In router_mpath_seed.sh line 45: ip -6 route del 2001:db8:3::/64 vrf v$h1 nexthop via 2001:db8:1::2 ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -6 route del 2001:db8:3::/64 vrf v"$h1" nexthop via 2001:db8:1::2 In router_mpath_seed.sh line 46: ip -4 route del 192.0.2.32/28 vrf v$h1 nexthop via 192.0.2.2 ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -4 route del 192.0.2.32/28 vrf v"$h1" nexthop via 192.0.2.2 In router_mpath_seed.sh line 47: simple_if_fini $h1 192.0.2.1/28 2001:db8:1::1/64 ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: simple_if_fini "$h1" 192.0.2.1/28 2001:db8:1::1/64 In router_mpath_seed.sh line 52: simple_if_init $h2 192.0.2.34/28 2001:db8:3::2/64 ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: simple_if_init "$h2" 192.0.2.34/28 2001:db8:3::2/64 In router_mpath_seed.sh line 53: ip -4 route add 192.0.2.0/28 vrf v$h2 nexthop via 192.0.2.33 ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -4 route add 192.0.2.0/28 vrf v"$h2" nexthop via 192.0.2.33 In router_mpath_seed.sh line 54: ip -6 route add 2001:db8:1::/64 vrf v$h2 nexthop via 2001:db8:3::1 ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -6 route add 2001:db8:1::/64 vrf v"$h2" nexthop via 2001:db8:3::1 In router_mpath_seed.sh line 57: h2_destroy() ^-- SC2329 (info): This function is never invoked. Check usage (or ignored if invoked indirectly). In router_mpath_seed.sh line 59: ip -6 route del 2001:db8:1::/64 vrf v$h2 nexthop via 2001:db8:3::1 ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -6 route del 2001:db8:1::/64 vrf v"$h2" nexthop via 2001:db8:3::1 In router_mpath_seed.sh line 60: ip -4 route del 192.0.2.0/28 vrf v$h2 nexthop via 192.0.2.33 ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -4 route del 192.0.2.0/28 vrf v"$h2" nexthop via 192.0.2.33 In router_mpath_seed.sh line 61: simple_if_fini $h2 192.0.2.34/28 2001:db8:3::2/64 ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: simple_if_fini "$h2" 192.0.2.34/28 2001:db8:3::2/64 In router_mpath_seed.sh line 66: simple_if_init $rp11 192.0.2.2/28 2001:db8:1::2/64 ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: simple_if_init "$rp11" 192.0.2.2/28 2001:db8:1::2/64 In router_mpath_seed.sh line 67: __simple_if_init $rp12 v$rp11 192.0.2.17/28 2001:db8:2::17/64 ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: __simple_if_init "$rp12" v"$rp11" 192.0.2.17/28 2001:db8:2::17/64 In router_mpath_seed.sh line 70: router1_destroy() ^-- SC2329 (info): This function is never invoked. Check usage (or ignored if invoked indirectly). In router_mpath_seed.sh line 72: __simple_if_fini $rp12 192.0.2.17/28 2001:db8:2::17/64 ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: __simple_if_fini "$rp12" 192.0.2.17/28 2001:db8:2::17/64 In router_mpath_seed.sh line 73: simple_if_fini $rp11 192.0.2.2/28 2001:db8:1::2/64 ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: simple_if_fini "$rp11" 192.0.2.2/28 2001:db8:1::2/64 In router_mpath_seed.sh line 78: simple_if_init $rp21 192.0.2.33/28 2001:db8:3::1/64 ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: simple_if_init "$rp21" 192.0.2.33/28 2001:db8:3::1/64 In router_mpath_seed.sh line 79: __simple_if_init $rp22 v$rp21 192.0.2.18/28 2001:db8:2::18/64 ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: __simple_if_init "$rp22" v"$rp21" 192.0.2.18/28 2001:db8:2::18/64 In router_mpath_seed.sh line 80: ip -4 route add 192.0.2.0/28 vrf v$rp21 nexthop via 192.0.2.17 ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -4 route add 192.0.2.0/28 vrf v"$rp21" nexthop via 192.0.2.17 In router_mpath_seed.sh line 81: ip -6 route add 2001:db8:1::/64 vrf v$rp21 nexthop via 2001:db8:2::17 ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -6 route add 2001:db8:1::/64 vrf v"$rp21" nexthop via 2001:db8:2::17 In router_mpath_seed.sh line 84: router2_destroy() ^-- SC2329 (info): This function is never invoked. Check usage (or ignored if invoked indirectly). In router_mpath_seed.sh line 86: ip -6 route del 2001:db8:1::/64 vrf v$rp21 nexthop via 2001:db8:2::17 ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -6 route del 2001:db8:1::/64 vrf v"$rp21" nexthop via 2001:db8:2::17 In router_mpath_seed.sh line 87: ip -4 route del 192.0.2.0/28 vrf v$rp21 nexthop via 192.0.2.17 ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -4 route del 192.0.2.0/28 vrf v"$rp21" nexthop via 192.0.2.17 In router_mpath_seed.sh line 88: __simple_if_fini $rp22 192.0.2.18/28 2001:db8:2::18/64 ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: __simple_if_fini "$rp22" 192.0.2.18/28 2001:db8:2::18/64 In router_mpath_seed.sh line 89: simple_if_fini $rp21 192.0.2.33/28 2001:db8:3::1/64 ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: simple_if_fini "$rp21" 192.0.2.33/28 2001:db8:3::1/64 In router_mpath_seed.sh line 96: ip nexthop add id $((1000 + i)) via 192.0.2.18 dev $rp12 ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip nexthop add id $((1000 + i)) via 192.0.2.18 dev "$rp12" In router_mpath_seed.sh line 97: ip nexthop add id $((2000 + i)) via 2001:db8:2::18 dev $rp12 ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip nexthop add id $((2000 + i)) via 2001:db8:2::18 dev "$rp12" In router_mpath_seed.sh line 102: ip -4 route add 192.0.2.32/28 vrf v$rp11 nhid 1000 ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -4 route add 192.0.2.32/28 vrf v"$rp11" nhid 1000 In router_mpath_seed.sh line 103: ip -6 route add 2001:db8:3::/64 vrf v$rp11 nhid 2000 ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -6 route add 2001:db8:3::/64 vrf v"$rp11" nhid 2000 In router_mpath_seed.sh line 106: nexthops_destroy() ^-- SC2329 (info): This function is never invoked. Check usage (or ignored if invoked indirectly). In router_mpath_seed.sh line 110: ip -6 route del 2001:db8:3::/64 vrf v$rp11 nhid 2000 ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -6 route del 2001:db8:3::/64 vrf v"$rp11" nhid 2000 In router_mpath_seed.sh line 111: ip -4 route del 192.0.2.32/28 vrf v$rp11 nhid 1000 ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -4 route del 192.0.2.32/28 vrf v"$rp11" nhid 1000 In router_mpath_seed.sh line 144: cleanup() ^-- SC2329 (info): This function is never invoked. Check usage (or ignored if invoked indirectly). In router_mpath_seed.sh line 161: ping_ipv4() ^-- SC2329 (info): This function is never invoked. Check usage (or ignored if invoked indirectly). In router_mpath_seed.sh line 163: ping_test $h1 192.0.2.34 ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ping_test "$h1" 192.0.2.34 In router_mpath_seed.sh line 166: ping_ipv6() ^-- SC2329 (info): This function is never invoked. Check usage (or ignored if invoked indirectly). In router_mpath_seed.sh line 168: ping6_test $h1 2001:db8:3::2 ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ping6_test "$h1" 2001:db8:3::2 In router_mpath_seed.sh line 171: test_mpath_seed_get() ^-- SC2329 (info): This function is never invoked. Check usage (or ignored if invoked indirectly). In router_mpath_seed.sh line 178: sysctl -qw net.ipv4.fib_multipath_hash_seed=$seed_w ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: sysctl -qw net.ipv4.fib_multipath_hash_seed="$seed_w" In router_mpath_seed.sh line 179: local seed_r=$(sysctl -n net.ipv4.fib_multipath_hash_seed) ^----^ SC2155 (warning): Declare and assign separately to avoid masking return values. In router_mpath_seed.sh line 187: nh_stats_snapshot() ^-- SC2329 (info): This function is never invoked. Check usage (or ignored if invoked indirectly). In router_mpath_seed.sh line 191: ip -j -s -s nexthop show id $group_id | ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -j -s -s nexthop show id "$group_id" | In router_mpath_seed.sh line 195: get_active_nh() ^-- SC2329 (info): This function is never invoked. Check usage (or ignored if invoked indirectly). In router_mpath_seed.sh line 208: probe_nh() ^-- SC2329 (info): This function is never invoked. Check usage (or ignored if invoked indirectly). In router_mpath_seed.sh line 213: local s0=$(nh_stats_snapshot $group_id) ^-- 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 s0=$(nh_stats_snapshot "$group_id") In router_mpath_seed.sh line 215: local s1=$(nh_stats_snapshot $group_id) ^-- 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 s1=$(nh_stats_snapshot "$group_id") In router_mpath_seed.sh line 220: probe_seed() ^-- SC2329 (info): This function is never invoked. Check usage (or ignored if invoked indirectly). In router_mpath_seed.sh line 226: sysctl -qw net.ipv4.fib_multipath_hash_seed=$seed ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: sysctl -qw net.ipv4.fib_multipath_hash_seed="$seed" In router_mpath_seed.sh line 230: test_mpath_seed() ^-- SC2329 (info): This function is never invoked. Check usage (or ignored if invoked indirectly). In router_mpath_seed.sh line 241: local act=$(probe_seed $group_id $((999331 * ii)) "${mz[@]}") ^-^ 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 act=$(probe_seed "$group_id" $((999331 * ii)) "${mz[@]}") In router_mpath_seed.sh line 245: local tally_str="${tally[@]}" ^-----------^ SC2124 (warning): Assigning an array to a string! Assign as array, or use * instead of @ to concatenate. In router_mpath_seed.sh line 255: test_mpath_seed_ipv4() ^-- SC2329 (info): This function is never invoked. Check usage (or ignored if invoked indirectly). In router_mpath_seed.sh line 258: $MZ $h1 -A 192.0.2.1 -B 192.0.2.34 -q \ ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: "$MZ" "$h1" -A 192.0.2.1 -B 192.0.2.34 -q \ In router_mpath_seed.sh line 262: test_mpath_seed_ipv6() ^-- SC2329 (info): This function is never invoked. Check usage (or ignored if invoked indirectly). In router_mpath_seed.sh line 265: $MZ -6 $h1 -A 2001:db8:1::1 -B 2001:db8:3::2 -q \ ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: "$MZ" -6 "$h1" -A 2001:db8:1::1 -B 2001:db8:3::2 -q \ In router_mpath_seed.sh line 269: check_mpath_seed_stability() ^-- SC2329 (info): This function is never invoked. Check usage (or ignored if invoked indirectly). In router_mpath_seed.sh line 279: test_mpath_seed_stability() ^-- SC2329 (info): This function is never invoked. Check usage (or ignored if invoked indirectly). In router_mpath_seed.sh line 292: local act_ini=$(probe_nh $group_id "${mz[@]}") ^-----^ 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 act_ini=$(probe_nh "$group_id" "${mz[@]}") In router_mpath_seed.sh line 294: local act_0_0=$(probe_seed $group_id $seed_0 "${mz[@]}") ^-----^ 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 act_0_0=$(probe_seed "$group_id" "$seed_0" "${mz[@]}") In router_mpath_seed.sh line 295: local act_1_0=$(probe_seed $group_id $seed_1 "${mz[@]}") ^-----^ 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 act_1_0=$(probe_seed "$group_id" "$seed_1" "${mz[@]}") In router_mpath_seed.sh line 296: local act_2_0=$(probe_seed $group_id $seed_2 "${mz[@]}") ^-----^ 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 act_2_0=$(probe_seed "$group_id" "$seed_2" "${mz[@]}") In router_mpath_seed.sh line 298: local act_0_1=$(probe_seed $group_id $seed_0 "${mz[@]}") ^-----^ 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 act_0_1=$(probe_seed "$group_id" "$seed_0" "${mz[@]}") In router_mpath_seed.sh line 299: local act_1_1=$(probe_seed $group_id $seed_1 "${mz[@]}") ^-----^ 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 act_1_1=$(probe_seed "$group_id" "$seed_1" "${mz[@]}") In router_mpath_seed.sh line 300: local act_2_1=$(probe_seed $group_id $seed_2 "${mz[@]}") ^-----^ 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 act_2_1=$(probe_seed "$group_id" "$seed_2" "${mz[@]}") In router_mpath_seed.sh line 302: check_mpath_seed_stability initial $act_ini $act_0_0 ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: check_mpath_seed_stability initial "$act_ini" "$act_0_0" In router_mpath_seed.sh line 303: check_mpath_seed_stability $seed_0 $act_0_0 $act_0_1 ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting. ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: check_mpath_seed_stability "$seed_0" "$act_0_0" "$act_0_1" In router_mpath_seed.sh line 304: check_mpath_seed_stability $seed_1 $act_1_0 $act_1_1 ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting. ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: check_mpath_seed_stability "$seed_1" "$act_1_0" "$act_1_1" In router_mpath_seed.sh line 305: check_mpath_seed_stability $seed_2 $act_2_0 $act_2_1 ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting. ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: check_mpath_seed_stability "$seed_2" "$act_2_0" "$act_2_1" In router_mpath_seed.sh line 311: test_mpath_seed_stability_ipv4() ^-- SC2329 (info): This function is never invoked. Check usage (or ignored if invoked indirectly). In router_mpath_seed.sh line 314: $MZ $h1 -A 192.0.2.1 -B 192.0.2.34 -q \ ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: "$MZ" "$h1" -A 192.0.2.1 -B 192.0.2.34 -q \ In router_mpath_seed.sh line 318: test_mpath_seed_stability_ipv6() ^-- SC2329 (info): This function is never invoked. Check usage (or ignored if invoked indirectly). In router_mpath_seed.sh line 321: $MZ -6 $h1 -A 2001:db8:1::1 -B 2001:db8:3::2 -q \ ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: "$MZ" -6 "$h1" -A 2001:db8:1::1 -B 2001:db8:3::2 -q \ In router_mpath_seed.sh line 333: exit $EXIT_STATUS ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: exit "$EXIT_STATUS" 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/SC2086 -- Double quote to prevent globbing ... ====== Checking the tree with the patch ====== Checking tools/testing/selftests/net/forwarding/router_mpath_seed.sh - 3003e9ab3cecca20397778da832f15e10234bac5b1e554415eea88666fb3db5b In router_mpath_seed.sh line 38: simple_if_init $h1 192.0.2.1/28 2001:db8:1::1/64 ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: simple_if_init "$h1" 192.0.2.1/28 2001:db8:1::1/64 In router_mpath_seed.sh line 39: ip -4 route add 192.0.2.32/28 vrf v$h1 nexthop via 192.0.2.2 ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -4 route add 192.0.2.32/28 vrf v"$h1" nexthop via 192.0.2.2 In router_mpath_seed.sh line 40: ip -6 route add 2001:db8:3::/64 vrf v$h1 nexthop via 2001:db8:1::2 ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -6 route add 2001:db8:3::/64 vrf v"$h1" nexthop via 2001:db8:1::2 In router_mpath_seed.sh line 43: h1_destroy() ^-- SC2329 (info): This function is never invoked. Check usage (or ignored if invoked indirectly). In router_mpath_seed.sh line 45: ip -6 route del 2001:db8:3::/64 vrf v$h1 nexthop via 2001:db8:1::2 ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -6 route del 2001:db8:3::/64 vrf v"$h1" nexthop via 2001:db8:1::2 In router_mpath_seed.sh line 46: ip -4 route del 192.0.2.32/28 vrf v$h1 nexthop via 192.0.2.2 ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -4 route del 192.0.2.32/28 vrf v"$h1" nexthop via 192.0.2.2 In router_mpath_seed.sh line 47: simple_if_fini $h1 192.0.2.1/28 2001:db8:1::1/64 ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: simple_if_fini "$h1" 192.0.2.1/28 2001:db8:1::1/64 In router_mpath_seed.sh line 52: simple_if_init $h2 192.0.2.34/28 2001:db8:3::2/64 ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: simple_if_init "$h2" 192.0.2.34/28 2001:db8:3::2/64 In router_mpath_seed.sh line 53: ip -4 route add 192.0.2.0/28 vrf v$h2 nexthop via 192.0.2.33 ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -4 route add 192.0.2.0/28 vrf v"$h2" nexthop via 192.0.2.33 In router_mpath_seed.sh line 54: ip -6 route add 2001:db8:1::/64 vrf v$h2 nexthop via 2001:db8:3::1 ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -6 route add 2001:db8:1::/64 vrf v"$h2" nexthop via 2001:db8:3::1 In router_mpath_seed.sh line 57: h2_destroy() ^-- SC2329 (info): This function is never invoked. Check usage (or ignored if invoked indirectly). In router_mpath_seed.sh line 59: ip -6 route del 2001:db8:1::/64 vrf v$h2 nexthop via 2001:db8:3::1 ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -6 route del 2001:db8:1::/64 vrf v"$h2" nexthop via 2001:db8:3::1 In router_mpath_seed.sh line 60: ip -4 route del 192.0.2.0/28 vrf v$h2 nexthop via 192.0.2.33 ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -4 route del 192.0.2.0/28 vrf v"$h2" nexthop via 192.0.2.33 In router_mpath_seed.sh line 61: simple_if_fini $h2 192.0.2.34/28 2001:db8:3::2/64 ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: simple_if_fini "$h2" 192.0.2.34/28 2001:db8:3::2/64 In router_mpath_seed.sh line 66: simple_if_init $rp11 192.0.2.2/28 2001:db8:1::2/64 ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: simple_if_init "$rp11" 192.0.2.2/28 2001:db8:1::2/64 In router_mpath_seed.sh line 67: __simple_if_init $rp12 v$rp11 192.0.2.17/28 2001:db8:2::17/64 ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: __simple_if_init "$rp12" v"$rp11" 192.0.2.17/28 2001:db8:2::17/64 In router_mpath_seed.sh line 70: router1_destroy() ^-- SC2329 (info): This function is never invoked. Check usage (or ignored if invoked indirectly). In router_mpath_seed.sh line 72: __simple_if_fini $rp12 192.0.2.17/28 2001:db8:2::17/64 ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: __simple_if_fini "$rp12" 192.0.2.17/28 2001:db8:2::17/64 In router_mpath_seed.sh line 73: simple_if_fini $rp11 192.0.2.2/28 2001:db8:1::2/64 ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: simple_if_fini "$rp11" 192.0.2.2/28 2001:db8:1::2/64 In router_mpath_seed.sh line 78: simple_if_init $rp21 192.0.2.33/28 2001:db8:3::1/64 ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: simple_if_init "$rp21" 192.0.2.33/28 2001:db8:3::1/64 In router_mpath_seed.sh line 79: __simple_if_init $rp22 v$rp21 192.0.2.18/28 2001:db8:2::18/64 ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: __simple_if_init "$rp22" v"$rp21" 192.0.2.18/28 2001:db8:2::18/64 In router_mpath_seed.sh line 80: ip -4 route add 192.0.2.0/28 vrf v$rp21 nexthop via 192.0.2.17 ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -4 route add 192.0.2.0/28 vrf v"$rp21" nexthop via 192.0.2.17 In router_mpath_seed.sh line 81: ip -6 route add 2001:db8:1::/64 vrf v$rp21 nexthop via 2001:db8:2::17 ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -6 route add 2001:db8:1::/64 vrf v"$rp21" nexthop via 2001:db8:2::17 In router_mpath_seed.sh line 84: router2_destroy() ^-- SC2329 (info): This function is never invoked. Check usage (or ignored if invoked indirectly). In router_mpath_seed.sh line 86: ip -6 route del 2001:db8:1::/64 vrf v$rp21 nexthop via 2001:db8:2::17 ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -6 route del 2001:db8:1::/64 vrf v"$rp21" nexthop via 2001:db8:2::17 In router_mpath_seed.sh line 87: ip -4 route del 192.0.2.0/28 vrf v$rp21 nexthop via 192.0.2.17 ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -4 route del 192.0.2.0/28 vrf v"$rp21" nexthop via 192.0.2.17 In router_mpath_seed.sh line 88: __simple_if_fini $rp22 192.0.2.18/28 2001:db8:2::18/64 ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: __simple_if_fini "$rp22" 192.0.2.18/28 2001:db8:2::18/64 In router_mpath_seed.sh line 89: simple_if_fini $rp21 192.0.2.33/28 2001:db8:3::1/64 ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: simple_if_fini "$rp21" 192.0.2.33/28 2001:db8:3::1/64 In router_mpath_seed.sh line 96: ip nexthop add id $((1000 + i)) via 192.0.2.18 dev $rp12 ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip nexthop add id $((1000 + i)) via 192.0.2.18 dev "$rp12" In router_mpath_seed.sh line 97: ip nexthop add id $((2000 + i)) via 2001:db8:2::18 dev $rp12 ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip nexthop add id $((2000 + i)) via 2001:db8:2::18 dev "$rp12" In router_mpath_seed.sh line 102: ip -4 route add 192.0.2.32/28 vrf v$rp11 nhid 1000 ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -4 route add 192.0.2.32/28 vrf v"$rp11" nhid 1000 In router_mpath_seed.sh line 103: ip -6 route add 2001:db8:3::/64 vrf v$rp11 nhid 2000 ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -6 route add 2001:db8:3::/64 vrf v"$rp11" nhid 2000 In router_mpath_seed.sh line 106: nexthops_destroy() ^-- SC2329 (info): This function is never invoked. Check usage (or ignored if invoked indirectly). In router_mpath_seed.sh line 110: ip -6 route del 2001:db8:3::/64 vrf v$rp11 nhid 2000 ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -6 route del 2001:db8:3::/64 vrf v"$rp11" nhid 2000 In router_mpath_seed.sh line 111: ip -4 route del 192.0.2.32/28 vrf v$rp11 nhid 1000 ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -4 route del 192.0.2.32/28 vrf v"$rp11" nhid 1000 In router_mpath_seed.sh line 144: cleanup() ^-- SC2329 (info): This function is never invoked. Check usage (or ignored if invoked indirectly). In router_mpath_seed.sh line 161: ping_ipv4() ^-- SC2329 (info): This function is never invoked. Check usage (or ignored if invoked indirectly). In router_mpath_seed.sh line 163: ping_test $h1 192.0.2.34 ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ping_test "$h1" 192.0.2.34 In router_mpath_seed.sh line 166: ping_ipv6() ^-- SC2329 (info): This function is never invoked. Check usage (or ignored if invoked indirectly). In router_mpath_seed.sh line 168: ping6_test $h1 2001:db8:3::2 ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ping6_test "$h1" 2001:db8:3::2 In router_mpath_seed.sh line 171: test_mpath_seed_get() ^-- SC2329 (info): This function is never invoked. Check usage (or ignored if invoked indirectly). In router_mpath_seed.sh line 178: sysctl -qw net.ipv4.fib_multipath_hash_seed=$seed_w ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: sysctl -qw net.ipv4.fib_multipath_hash_seed="$seed_w" In router_mpath_seed.sh line 179: local seed_r=$(sysctl -n net.ipv4.fib_multipath_hash_seed) ^----^ SC2155 (warning): Declare and assign separately to avoid masking return values. In router_mpath_seed.sh line 187: nh_stats_snapshot() ^-- SC2329 (info): This function is never invoked. Check usage (or ignored if invoked indirectly). In router_mpath_seed.sh line 191: ip -j -s -s nexthop show id $group_id | ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -j -s -s nexthop show id "$group_id" | In router_mpath_seed.sh line 195: get_active_nh() ^-- SC2329 (info): This function is never invoked. Check usage (or ignored if invoked indirectly). In router_mpath_seed.sh line 208: probe_nh() ^-- SC2329 (info): This function is never invoked. Check usage (or ignored if invoked indirectly). In router_mpath_seed.sh line 213: local s0=$(nh_stats_snapshot $group_id) ^-- 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 s0=$(nh_stats_snapshot "$group_id") In router_mpath_seed.sh line 215: local s1=$(nh_stats_snapshot $group_id) ^-- 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 s1=$(nh_stats_snapshot "$group_id") In router_mpath_seed.sh line 220: probe_seed() ^-- SC2329 (info): This function is never invoked. Check usage (or ignored if invoked indirectly). In router_mpath_seed.sh line 226: sysctl -qw net.ipv4.fib_multipath_hash_seed=$seed ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: sysctl -qw net.ipv4.fib_multipath_hash_seed="$seed" In router_mpath_seed.sh line 230: test_mpath_seed() ^-- SC2329 (info): This function is never invoked. Check usage (or ignored if invoked indirectly). In router_mpath_seed.sh line 241: local act=$(probe_seed $group_id $((999331 * ii)) "${mz[@]}") ^-^ 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 act=$(probe_seed "$group_id" $((999331 * ii)) "${mz[@]}") In router_mpath_seed.sh line 245: local tally_str="${tally[@]}" ^-----------^ SC2124 (warning): Assigning an array to a string! Assign as array, or use * instead of @ to concatenate. In router_mpath_seed.sh line 255: test_mpath_seed_ipv4() ^-- SC2329 (info): This function is never invoked. Check usage (or ignored if invoked indirectly). In router_mpath_seed.sh line 258: $MZ $h1 -A 192.0.2.1 -B 192.0.2.34 -q \ ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: "$MZ" "$h1" -A 192.0.2.1 -B 192.0.2.34 -q \ In router_mpath_seed.sh line 262: test_mpath_seed_ipv6() ^-- SC2329 (info): This function is never invoked. Check usage (or ignored if invoked indirectly). In router_mpath_seed.sh line 265: $MZ -6 $h1 -A 2001:db8:1::1 -B 2001:db8:3::2 -q \ ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: "$MZ" -6 "$h1" -A 2001:db8:1::1 -B 2001:db8:3::2 -q \ In router_mpath_seed.sh line 269: check_mpath_seed_stability() ^-- SC2329 (info): This function is never invoked. Check usage (or ignored if invoked indirectly). In router_mpath_seed.sh line 279: test_mpath_seed_stability() ^-- SC2329 (info): This function is never invoked. Check usage (or ignored if invoked indirectly). In router_mpath_seed.sh line 292: local act_ini=$(probe_nh $group_id "${mz[@]}") ^-----^ 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 act_ini=$(probe_nh "$group_id" "${mz[@]}") In router_mpath_seed.sh line 294: local act_0_0=$(probe_seed $group_id $seed_0 "${mz[@]}") ^-----^ 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 act_0_0=$(probe_seed "$group_id" "$seed_0" "${mz[@]}") In router_mpath_seed.sh line 295: local act_1_0=$(probe_seed $group_id $seed_1 "${mz[@]}") ^-----^ 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 act_1_0=$(probe_seed "$group_id" "$seed_1" "${mz[@]}") In router_mpath_seed.sh line 296: local act_2_0=$(probe_seed $group_id $seed_2 "${mz[@]}") ^-----^ 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 act_2_0=$(probe_seed "$group_id" "$seed_2" "${mz[@]}") In router_mpath_seed.sh line 298: local act_0_1=$(probe_seed $group_id $seed_0 "${mz[@]}") ^-----^ 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 act_0_1=$(probe_seed "$group_id" "$seed_0" "${mz[@]}") In router_mpath_seed.sh line 299: local act_1_1=$(probe_seed $group_id $seed_1 "${mz[@]}") ^-----^ 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 act_1_1=$(probe_seed "$group_id" "$seed_1" "${mz[@]}") In router_mpath_seed.sh line 300: local act_2_1=$(probe_seed $group_id $seed_2 "${mz[@]}") ^-----^ 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 act_2_1=$(probe_seed "$group_id" "$seed_2" "${mz[@]}") In router_mpath_seed.sh line 302: check_mpath_seed_stability initial $act_ini $act_0_0 ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: check_mpath_seed_stability initial "$act_ini" "$act_0_0" In router_mpath_seed.sh line 303: check_mpath_seed_stability $seed_0 $act_0_0 $act_0_1 ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting. ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: check_mpath_seed_stability "$seed_0" "$act_0_0" "$act_0_1" In router_mpath_seed.sh line 304: check_mpath_seed_stability $seed_1 $act_1_0 $act_1_1 ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting. ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: check_mpath_seed_stability "$seed_1" "$act_1_0" "$act_1_1" In router_mpath_seed.sh line 305: check_mpath_seed_stability $seed_2 $act_2_0 $act_2_1 ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting. ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: check_mpath_seed_stability "$seed_2" "$act_2_0" "$act_2_1" In router_mpath_seed.sh line 311: test_mpath_seed_stability_ipv4() ^-- SC2329 (info): This function is never invoked. Check usage (or ignored if invoked indirectly). In router_mpath_seed.sh line 314: $MZ $h1 -A 192.0.2.1 -B 192.0.2.34 -q \ ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: "$MZ" "$h1" -A 192.0.2.1 -B 192.0.2.34 -q \ In router_mpath_seed.sh line 318: test_mpath_seed_stability_ipv6() ^-- SC2329 (info): This function is never invoked. Check usage (or ignored if invoked indirectly). In router_mpath_seed.sh line 321: $MZ -6 $h1 -A 2001:db8:1::1 -B 2001:db8:3::2 -q \ ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: "$MZ" -6 "$h1" -A 2001:db8:1::1 -B 2001:db8:3::2 -q \ In router_mpath_seed.sh line 335: exit $EXIT_STATUS ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: exit "$EXIT_STATUS" 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/SC2086 -- Double quote to prevent globbing ...