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.LoSkmcsAwR and /tmp/tmp.EBxI6Q1Fqy Tree base: 9f735b6f8a77 ("net: fix segmentation after TCP/UDP fraglist GRO") Now at: 28e5611a354b ("selftests: netfilter: conntrack_resize.sh: extend resize test") ====== Checking before the patch ====== Checking tools/testing/selftests/net/netfilter/conntrack_resize.sh - 392c98dd48bf5e412c199e4798a498deb4fc287f87e0da4e649ef96df46a4b4f In conntrack_resize.sh line 22: exit $KSFT_SKIP ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--------^ SC2153 (info): Possible misspelling: KSFT_SKIP may not be assigned. Did you mean ksft_skip? Did you mean: exit "$KSFT_SKIP" In conntrack_resize.sh line 34: sysctl -q net.netfilter.nf_conntrack_max=$init_net_max ^-----------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: sysctl -q net.netfilter.nf_conntrack_max="$init_net_max" In conntrack_resize.sh line 35: sysctl -q net.netfilter.nf_conntrack_buckets=$ct_buckets ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: sysctl -q net.netfilter.nf_conntrack_buckets="$ct_buckets" In conntrack_resize.sh line 44: local lv=$(sysctl -n net.nf_conntrack_max) ^-- SC2155 (warning): Declare and assign separately to avoid masking return values. In conntrack_resize.sh line 46: if [ $expected -ne "$lv" ];then ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: if [ "$expected" -ne "$lv" ];then In conntrack_resize.sh line 58: while [ $i -lt $count ] ;do ^----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: while [ $i -lt "$count" ] ;do In conntrack_resize.sh line 76: local now=$(ip netns exec "$ns" conntrack -C) ^-^ SC2155 (warning): Declare and assign separately to avoid masking return values. In conntrack_resize.sh line 78: if [ $now -ne "$count" ] ;then ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: if [ "$now" -ne "$count" ] ;then In conntrack_resize.sh line 88: local now=$(date +%s) ^-^ SC2155 (warning): Declare and assign separately to avoid masking return values. In conntrack_resize.sh line 91: while [ $now -lt $end ]; do ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: while [ "$now" -lt $end ]; do In conntrack_resize.sh line 114: local now=$(date +%s) ^-^ SC2155 (warning): Declare and assign separately to avoid masking return values. In conntrack_resize.sh line 119: while [ $now -lt $end ]; do ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: while [ "$now" -lt $end ]; do In conntrack_resize.sh line 131: local now=$(date +%s) ^-^ SC2155 (warning): Declare and assign separately to avoid masking return values. In conntrack_resize.sh line 136: while [ $now -lt $end ]; do ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: while [ "$now" -lt $end ]; do In conntrack_resize.sh line 183: read tainted_now < /proc/sys/kernel/tainted ^--^ SC2162 (info): read without -r will mangle backslashes. In conntrack_resize.sh line 199: r=$((RANDOM%$insert_count)) ^-----------^ SC2004 (style): $/${} is unnecessary on arithmetic variables. In conntrack_resize.sh line 215: read tainted_then < /proc/sys/kernel/tainted ^--^ SC2162 (info): read without -r will mangle backslashes. In conntrack_resize.sh line 217: for n in "$nsclient1" "$nsclient2";do ^--------^ SC2154 (warning): nsclient1 is referenced but not assigned. ^--------^ SC2154 (warning): nsclient2 is referenced but not assigned. In conntrack_resize.sh line 266: proto=$(ip netns exec "$ns" conntrack -L --proto $protoname 2>/dev/null | sort | uniq | tee "$tmpfile_uniq" | wc -l) ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: proto=$(ip netns exec "$ns" conntrack -L --proto "$protoname" 2>/dev/null | sort | uniq | tee "$tmpfile_uniq" | wc -l) In conntrack_resize.sh line 302: read tainted_then < /proc/sys/kernel/tainted ^--^ SC2162 (info): read without -r will mangle backslashes. In conntrack_resize.sh line 338: if [ $o -ne $n ]; then ^-- SC2086 (info): Double quote to prevent globbing and word splitting. ^-- SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: if [ "$o" -ne "$n" ]; then In conntrack_resize.sh line 339: if [ $failhard -gt 0 ] ;then ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: if [ "$failhard" -gt 0 ] ;then In conntrack_resize.sh line 358: sysctl -q net.netfilter.nf_conntrack_max=$init_net_max ^-----------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: sysctl -q net.netfilter.nf_conntrack_max="$init_net_max" In conntrack_resize.sh line 383: check_max_alias $init_net_max ^-----------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: check_max_alias "$init_net_max" In conntrack_resize.sh line 404: ip netns exec "$nsclient1" sysctl -q net.netfilter.nf_conntrack_max=$init_net_max ^-----------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "$nsclient1" sysctl -q net.netfilter.nf_conntrack_max="$init_net_max" For more information: https://www.shellcheck.net/wiki/SC2154 -- nsclient1 is referenced but not 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/netfilter/conntrack_resize.sh - 392c98dd48bf5e412c199e4798a498deb4fc287f87e0da4e649ef96df46a4b4f In conntrack_resize.sh line 25: exit $KSFT_SKIP ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--------^ SC2153 (info): Possible misspelling: KSFT_SKIP may not be assigned. Did you mean ksft_skip? Did you mean: exit "$KSFT_SKIP" In conntrack_resize.sh line 37: sysctl -q net.netfilter.nf_conntrack_max=$init_net_max ^-----------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: sysctl -q net.netfilter.nf_conntrack_max="$init_net_max" In conntrack_resize.sh line 38: sysctl -q net.netfilter.nf_conntrack_buckets=$ct_buckets ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: sysctl -q net.netfilter.nf_conntrack_buckets="$ct_buckets" In conntrack_resize.sh line 47: local lv=$(sysctl -n net.nf_conntrack_max) ^-- SC2155 (warning): Declare and assign separately to avoid masking return values. In conntrack_resize.sh line 49: if [ $expected -ne "$lv" ];then ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: if [ "$expected" -ne "$lv" ];then In conntrack_resize.sh line 61: while [ $i -lt $count ] ;do ^----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: while [ $i -lt "$count" ] ;do In conntrack_resize.sh line 79: local now=$(ip netns exec "$ns" conntrack -C) ^-^ SC2155 (warning): Declare and assign separately to avoid masking return values. In conntrack_resize.sh line 81: if [ $now -ne "$count" ] ;then ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: if [ "$now" -ne "$count" ] ;then In conntrack_resize.sh line 91: local now=$(date +%s) ^-^ SC2155 (warning): Declare and assign separately to avoid masking return values. In conntrack_resize.sh line 94: while [ $now -lt $end ]; do ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: while [ "$now" -lt $end ]; do In conntrack_resize.sh line 117: local now=$(date +%s) ^-^ SC2155 (warning): Declare and assign separately to avoid masking return values. In conntrack_resize.sh line 122: while [ $now -lt $end ]; do ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: while [ "$now" -lt $end ]; do In conntrack_resize.sh line 134: local now=$(date +%s) ^-^ SC2155 (warning): Declare and assign separately to avoid masking return values. In conntrack_resize.sh line 139: while [ $now -lt $end ]; do ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: while [ "$now" -lt $end ]; do In conntrack_resize.sh line 162: local now=$(date +%s) ^-^ SC2155 (warning): Declare and assign separately to avoid masking return values. In conntrack_resize.sh line 167: while [ $now -lt $end ]; do ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: while [ "$now" -lt $end ]; do In conntrack_resize.sh line 201: local now=$(date +%s) ^-^ SC2155 (warning): Declare and assign separately to avoid masking return values. In conntrack_resize.sh line 204: while [ $now -lt $end ]; do ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: while [ "$now" -lt $end ]; do In conntrack_resize.sh line 225: local now=$(date +%s) ^-^ SC2155 (warning): Declare and assign separately to avoid masking return values. In conntrack_resize.sh line 228: while [ $now -lt $end ]; do ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: while [ "$now" -lt $end ]; do In conntrack_resize.sh line 250: read tainted_now < /proc/sys/kernel/tainted ^--^ SC2162 (info): read without -r will mangle backslashes. In conntrack_resize.sh line 266: r=$((RANDOM%$insert_count)) ^-----------^ SC2004 (style): $/${} is unnecessary on arithmetic variables. In conntrack_resize.sh line 285: read tainted_then < /proc/sys/kernel/tainted ^--^ SC2162 (info): read without -r will mangle backslashes. In conntrack_resize.sh line 287: for n in "$nsclient1" "$nsclient2";do ^--------^ SC2154 (warning): nsclient1 is referenced but not assigned. ^--------^ SC2154 (warning): nsclient2 is referenced but not assigned. In conntrack_resize.sh line 336: proto=$(ip netns exec "$ns" conntrack -L --proto $protoname 2>/dev/null | sort | uniq | tee "$tmpfile_uniq" | wc -l) ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: proto=$(ip netns exec "$ns" conntrack -L --proto "$protoname" 2>/dev/null | sort | uniq | tee "$tmpfile_uniq" | wc -l) In conntrack_resize.sh line 372: read tainted_then < /proc/sys/kernel/tainted ^--^ SC2162 (info): read without -r will mangle backslashes. In conntrack_resize.sh line 408: if [ $o -ne $n ]; then ^-- SC2086 (info): Double quote to prevent globbing and word splitting. ^-- SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: if [ "$o" -ne "$n" ]; then In conntrack_resize.sh line 409: if [ $failhard -gt 0 ] ;then ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: if [ "$failhard" -gt 0 ] ;then In conntrack_resize.sh line 428: sysctl -q net.netfilter.nf_conntrack_max=$init_net_max ^-----------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: sysctl -q net.netfilter.nf_conntrack_max="$init_net_max" In conntrack_resize.sh line 453: check_max_alias $init_net_max ^-----------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: check_max_alias "$init_net_max" In conntrack_resize.sh line 474: ip netns exec "$nsclient1" sysctl -q net.netfilter.nf_conntrack_max=$init_net_max ^-----------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "$nsclient1" sysctl -q net.netfilter.nf_conntrack_max="$init_net_max" For more information: https://www.shellcheck.net/wiki/SC2154 -- nsclient1 is referenced but not a... https://www.shellcheck.net/wiki/SC2155 -- Declare and assign separately to ... https://www.shellcheck.net/wiki/SC2086 -- Double quote to prevent globbing ...