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.Nnr1rFxvHV and /tmp/tmp.fBTD4TPlcG Tree base: a0b9c7162f86 ("netfilter: nfnetlink_queue: make hash table per queue") Now at: 584e748ecea3 ("selftests: nft_queue.sh: add a parallel stress test") ====== Checking before the patch ====== Checking tools/testing/selftests/net/netfilter/nft_queue.sh - c76daafa49ffa955e26233c714a88896b91ad24bfa1e78e367fa7eb23d6df1c7 In nft_queue.sh line 17: ip netns pids "$ns1" | xargs kill 2>/dev/null ^--^ SC2154 (warning): ns1 is referenced but not assigned. In nft_queue.sh line 18: ip netns pids "$ns2" | xargs kill 2>/dev/null ^--^ SC2154 (warning): ns2 is referenced but not assigned. In nft_queue.sh line 19: ip netns pids "$nsrouter" | xargs kill 2>/dev/null ^-------^ SC2154 (warning): nsrouter is referenced but not assigned. In nft_queue.sh line 53: ip link add veth2 netns "$nsrouter" type veth peer name eth0 netns "$ns3" ^--^ SC2154 (warning): ns3 is referenced but not assigned. In nft_queue.sh line 254: if [ x"$last" != x"$expected packets total" ]; then ^------^ SC2268 (style): Avoid x-prefix in comparisons as it no longer serves a purpose. Did you mean: if [ "$last" != "$expected packets total" ]; then In nft_queue.sh line 280: local tthen=$(date +%s) ^---^ SC2155 (warning): Declare and assign separately to avoid masking return values. In nft_queue.sh line 295: local tthen=$(date +%s) ^---^ SC2155 (warning): Declare and assign separately to avoid masking return values. In nft_queue.sh line 430: local tnow=$(date +%s) ^--^ SC2155 (warning): Declare and assign separately to avoid masking return values. In nft_queue.sh line 460: local tthen=$(date +%s) ^---^ SC2155 (warning): Declare and assign separately to avoid masking return values. In nft_queue.sh line 495: local tthen=$(date +%s) ^---^ SC2155 (warning): Declare and assign separately to avoid masking return values. In nft_queue.sh line 648: local nprocs=$(nproc) ^----^ SC2155 (warning): Declare and assign separately to avoid masking return values. In nft_queue.sh line 649: [ $nprocs -gt 1 ] && nprocs=$((nprocs - 1)) ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: [ "$nprocs" -gt 1 ] && nprocs=$((nprocs - 1)) In nft_queue.sh line 651: dd if=/dev/zero bs="$bs" count="$count" 2>/dev/null | for i in $(seq 1 $nprocs); do ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: dd if=/dev/zero bs="$bs" count="$count" 2>/dev/null | for i in $(seq 1 "$nprocs"); do In nft_queue.sh line 674: read p preinject b breinject </dev/null ^--^ SC2154 (warning): ns1 is referenced but not assigned. In nft_queue.sh line 19: ip netns pids "$ns2" | xargs kill 2>/dev/null ^--^ SC2154 (warning): ns2 is referenced but not assigned. In nft_queue.sh line 20: ip netns pids "$nsrouter" | xargs kill 2>/dev/null ^-------^ SC2154 (warning): nsrouter is referenced but not assigned. In nft_queue.sh line 54: ip link add veth2 netns "$nsrouter" type veth peer name eth0 netns "$ns3" ^--^ SC2154 (warning): ns3 is referenced but not assigned. In nft_queue.sh line 255: if [ x"$last" != x"$expected packets total" ]; then ^------^ SC2268 (style): Avoid x-prefix in comparisons as it no longer serves a purpose. Did you mean: if [ "$last" != "$expected packets total" ]; then In nft_queue.sh line 281: local tthen=$(date +%s) ^---^ SC2155 (warning): Declare and assign separately to avoid masking return values. In nft_queue.sh line 296: local tthen=$(date +%s) ^---^ SC2155 (warning): Declare and assign separately to avoid masking return values. In nft_queue.sh line 431: local tnow=$(date +%s) ^--^ SC2155 (warning): Declare and assign separately to avoid masking return values. In nft_queue.sh line 461: local tthen=$(date +%s) ^---^ SC2155 (warning): Declare and assign separately to avoid masking return values. In nft_queue.sh line 496: local tthen=$(date +%s) ^---^ SC2155 (warning): Declare and assign separately to avoid masking return values. In nft_queue.sh line 649: local nprocs=$(nproc) ^----^ SC2155 (warning): Declare and assign separately to avoid masking return values. In nft_queue.sh line 650: [ $nprocs -gt 1 ] && nprocs=$((nprocs - 1)) ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: [ "$nprocs" -gt 1 ] && nprocs=$((nprocs - 1)) In nft_queue.sh line 652: dd if=/dev/zero bs="$bs" count="$count" 2>/dev/null | for i in $(seq 1 $nprocs); do ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: dd if=/dev/zero bs="$bs" count="$count" 2>/dev/null | for i in $(seq 1 "$nprocs"); do In nft_queue.sh line 675: read p preinject b breinject < /dev/null & ^-- SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ./nf_queue -q "$i" -t 2 -O -b > /dev/null & For more information: https://www.shellcheck.net/wiki/SC2034 -- p appears unused. Verify use (or ... https://www.shellcheck.net/wiki/SC2154 -- ns1 is referenced but not assigned. https://www.shellcheck.net/wiki/SC2155 -- Declare and assign separately to ...