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.OHfRkmh9TJ and /tmp/tmp.k05BB3vqmr Tree base: 21657140c138 ("netfilter: nft_set_pipapo_avx2: fix skip of expired entries") Now at: 95d815c1a0d0 ("selftests: netfilter: nft_concat_range.sh: add check for double-create bug") ====== Checking before the patch ====== Checking tools/testing/selftests/net/netfilter/nft_concat_range.sh - 9af70c1607bb45389b2152f3d374bb2b870aa13f5390f3ff007123fa4497b76a In nft_concat_range.sh line 1377: [ $i -gt 1 ] && echo ", " ^-- SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: [ "$i" -gt 1 ] && echo ", " In nft_concat_range.sh line 1384: [ $i -gt 1 ] && echo ", " ^-- SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: [ "$i" -gt 1 ] && echo ", " In nft_concat_range.sh line 1400: [ $i -gt 1 ] && echo ", " ^-- SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: [ "$i" -gt 1 ] && echo ", " In nft_concat_range.sh line 1407: [ $i -gt 1 ] && echo ", " ^-- SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: [ "$i" -gt 1 ] && echo ", " In nft_concat_range.sh line 1413: [ $i -gt 1 ] && echo ", " ^-- SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: [ "$i" -gt 1 ] && echo ", " In nft_concat_range.sh line 1421: [ $i -gt 1 ] && echo ", " ^-- SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: [ "$i" -gt 1 ] && echo ", " In nft_concat_range.sh line 1428: [ $i -gt 1 ] && echo ", " ^-- SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: [ "$i" -gt 1 ] && echo ", " In nft_concat_range.sh line 1436: [ $i -gt 1 ] && echo ", " ^-- SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: [ "$i" -gt 1 ] && echo ", " In nft_concat_range.sh line 1442: [ $i -gt 1 ] && echo ", " ^-- SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: [ "$i" -gt 1 ] && echo ", " In nft_concat_range.sh line 1449: [ $i -gt 1 ] && echo ", " ^-- SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: [ "$i" -gt 1 ] && echo ", " In nft_concat_range.sh line 1455: [ $i -gt 1 ] && echo ", " ^-- SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: [ "$i" -gt 1 ] && echo ", " In nft_concat_range.sh line 1464: [ $i -gt 1 ] && echo ", " ^-- SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: [ "$i" -gt 1 ] && echo ", " In nft_concat_range.sh line 1472: [ $i -gt 1 ] && echo ", " ^-- SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: [ "$i" -gt 1 ] && echo ", " In nft_concat_range.sh line 1481: [ $i -gt 1 ] && echo ", " ^-- SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: [ "$i" -gt 1 ] && echo ", " In nft_concat_range.sh line 1491: [ $i -gt 1 ] && echo ", " ^-- SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: [ "$i" -gt 1 ] && echo ", " In nft_concat_range.sh line 1820: elem=$(printf "10.%d.%d.0/24 . %d-%d0 . 6-17 " ${i} ${j} ${dport} "$((dport+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: elem=$(printf "10.%d.%d.0/24 . %d-%d0 . 6-17 " "${i}" "${j}" "${dport}" "$((dport+1))") In nft_concat_range.sh line 1823: maybe_send_nomatch "$elem" $(printf "10.%d.%d.1" $i $j) $(printf "%d1" $((dport+1))) "before add" || return 1 ^--------------------------^ SC2046 (warning): Quote this to prevent word splitting. ^-- SC2086 (info): Double quote to prevent globbing and word splitting. ^-- SC2086 (info): Double quote to prevent globbing and word splitting. ^--------------------------^ SC2046 (warning): Quote this to prevent word splitting. Did you mean: maybe_send_nomatch "$elem" $(printf "10.%d.%d.1" "$i" "$j") $(printf "%d1" $((dport+1))) "before add" || return 1 In nft_concat_range.sh line 1827: maybe_send_match "$elem" $(printf "10.%d.%d.1" $i $j) $(printf "%d" $dport) "after add" || return 1 ^--------------------------^ SC2046 (warning): Quote this to prevent word splitting. ^-- SC2086 (info): Double quote to prevent globbing and word splitting. ^-- SC2086 (info): Double quote to prevent globbing and word splitting. ^-------------------^ SC2046 (warning): Quote this to prevent word splitting. ^----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: maybe_send_match "$elem" $(printf "10.%d.%d.1" "$i" "$j") $(printf "%d" "$dport") "after add" || return 1 In nft_concat_range.sh line 1830: if [ $? -ne 0 ];then ^-- SC2181 (style): Check exit code directly with e.g. 'if ! mycmd;', not indirectly with $?. In nft_concat_range.sh line 1831: local got=$(nft "get element inet filter test { $elem }") ^-^ SC2155 (warning): Declare and assign separately to avoid masking return values. In nft_concat_range.sh line 1836: maybe_send_nomatch "$elem" $(printf "10.%d.%d.1" $i $j) $(printf "%d1" $((dport+1))) "out-of-range" || return 1 ^--------------------------^ SC2046 (warning): Quote this to prevent word splitting. ^-- SC2086 (info): Double quote to prevent globbing and word splitting. ^-- SC2086 (info): Double quote to prevent globbing and word splitting. ^--------------------------^ SC2046 (warning): Quote this to prevent word splitting. Did you mean: maybe_send_nomatch "$elem" $(printf "10.%d.%d.1" "$i" "$j") $(printf "%d1" $((dport+1))) "out-of-range" || return 1 In nft_concat_range.sh line 1845: elem=$(printf "10.%d.%d.0/24 . %d-%d0 . 6-17 " ${i} ${j} ${dport} "$((dport+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: elem=$(printf "10.%d.%d.0/24 . %d-%d0 . 6-17 " "${i}" "${j}" "${dport}" "$((dport+1))") In nft_concat_range.sh line 1848: if [ $? -ne 0 ];then ^-- SC2181 (style): Check exit code directly with e.g. 'if ! mycmd;', not indirectly with $?. In nft_concat_range.sh line 1849: local got=$(nft "get element inet filter test { $elem }") ^-^ SC2155 (warning): Declare and assign separately to avoid masking return values. In nft_concat_range.sh line 1854: maybe_send_match "$elem" $(printf "10.%d.%d.1" $i $j) $(printf "%d" $dport) "recheck" || return 1 ^--------------------------^ SC2046 (warning): Quote this to prevent word splitting. ^-- SC2086 (info): Double quote to prevent globbing and word splitting. ^-- SC2086 (info): Double quote to prevent globbing and word splitting. ^-------------------^ SC2046 (warning): Quote this to prevent word splitting. ^----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: maybe_send_match "$elem" $(printf "10.%d.%d.1" "$i" "$j") $(printf "%d" "$dport") "recheck" || return 1 In nft_concat_range.sh line 1855: maybe_send_nomatch "$elem" $(printf "10.%d.%d.1" $i $j) $(printf "%d1" $((dport+1))) "recheck out-of-range" || return 1 ^--------------------------^ SC2046 (warning): Quote this to prevent word splitting. ^-- SC2086 (info): Double quote to prevent globbing and word splitting. ^-- SC2086 (info): Double quote to prevent globbing and word splitting. ^--------------------------^ SC2046 (warning): Quote this to prevent word splitting. Did you mean: maybe_send_nomatch "$elem" $(printf "10.%d.%d.1" "$i" "$j") $(printf "%d1" $((dport+1))) "recheck out-of-range" || return 1 In nft_concat_range.sh line 1866: elem=$(printf "10.%d.%d.0/24 . %d-%d0 . 6-17 " ${i} ${j} ${dport} "$((dport+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: elem=$(printf "10.%d.%d.0/24 . %d-%d0 . 6-17 " "${i}" "${j}" "${dport}" "$((dport+1))") In nft_concat_range.sh line 1873: if [ $? -eq 0 ];then ^-- SC2181 (style): Check exit code directly with e.g. 'if mycmd;', not indirectly with $?. In nft_concat_range.sh line 1878: maybe_send_nomatch "$elem" $(printf "10.%d.%d.1" $i $j) $(printf "%d" $dport) "match after deletion" || return 1 ^--------------------------^ SC2046 (warning): Quote this to prevent word splitting. ^-- SC2086 (info): Double quote to prevent globbing and word splitting. ^-- SC2086 (info): Double quote to prevent globbing and word splitting. ^-------------------^ SC2046 (warning): Quote this to prevent word splitting. ^----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: maybe_send_nomatch "$elem" $(printf "10.%d.%d.1" "$i" "$j") $(printf "%d" "$dport") "match after deletion" || return 1 In nft_concat_range.sh line 1950: printf "%5ds%-30s" $((tnow-tthen)) ^---------^ SC2183 (warning): This format string has 2 variables, but is passed 1 argument. For more information: https://www.shellcheck.net/wiki/SC2046 -- Quote this to prevent word splitt... https://www.shellcheck.net/wiki/SC2155 -- Declare and assign separately to ... https://www.shellcheck.net/wiki/SC2183 -- This format string has 2 variable... ====== Checking the tree with the patch ====== Checking tools/testing/selftests/net/netfilter/nft_concat_range.sh - 9af70c1607bb45389b2152f3d374bb2b870aa13f5390f3ff007123fa4497b76a In nft_concat_range.sh line 1389: [ $i -gt 1 ] && echo ", " ^-- SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: [ "$i" -gt 1 ] && echo ", " In nft_concat_range.sh line 1396: [ $i -gt 1 ] && echo ", " ^-- SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: [ "$i" -gt 1 ] && echo ", " In nft_concat_range.sh line 1412: [ $i -gt 1 ] && echo ", " ^-- SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: [ "$i" -gt 1 ] && echo ", " In nft_concat_range.sh line 1419: [ $i -gt 1 ] && echo ", " ^-- SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: [ "$i" -gt 1 ] && echo ", " In nft_concat_range.sh line 1425: [ $i -gt 1 ] && echo ", " ^-- SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: [ "$i" -gt 1 ] && echo ", " In nft_concat_range.sh line 1433: [ $i -gt 1 ] && echo ", " ^-- SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: [ "$i" -gt 1 ] && echo ", " In nft_concat_range.sh line 1440: [ $i -gt 1 ] && echo ", " ^-- SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: [ "$i" -gt 1 ] && echo ", " In nft_concat_range.sh line 1448: [ $i -gt 1 ] && echo ", " ^-- SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: [ "$i" -gt 1 ] && echo ", " In nft_concat_range.sh line 1454: [ $i -gt 1 ] && echo ", " ^-- SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: [ "$i" -gt 1 ] && echo ", " In nft_concat_range.sh line 1461: [ $i -gt 1 ] && echo ", " ^-- SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: [ "$i" -gt 1 ] && echo ", " In nft_concat_range.sh line 1467: [ $i -gt 1 ] && echo ", " ^-- SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: [ "$i" -gt 1 ] && echo ", " In nft_concat_range.sh line 1476: [ $i -gt 1 ] && echo ", " ^-- SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: [ "$i" -gt 1 ] && echo ", " In nft_concat_range.sh line 1484: [ $i -gt 1 ] && echo ", " ^-- SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: [ "$i" -gt 1 ] && echo ", " In nft_concat_range.sh line 1493: [ $i -gt 1 ] && echo ", " ^-- SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: [ "$i" -gt 1 ] && echo ", " In nft_concat_range.sh line 1503: [ $i -gt 1 ] && echo ", " ^-- SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: [ "$i" -gt 1 ] && echo ", " In nft_concat_range.sh line 1832: elem=$(printf "10.%d.%d.0/24 . %d-%d0 . 6-17 " ${i} ${j} ${dport} "$((dport+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: elem=$(printf "10.%d.%d.0/24 . %d-%d0 . 6-17 " "${i}" "${j}" "${dport}" "$((dport+1))") In nft_concat_range.sh line 1835: maybe_send_nomatch "$elem" $(printf "10.%d.%d.1" $i $j) $(printf "%d1" $((dport+1))) "before add" || return 1 ^--------------------------^ SC2046 (warning): Quote this to prevent word splitting. ^-- SC2086 (info): Double quote to prevent globbing and word splitting. ^-- SC2086 (info): Double quote to prevent globbing and word splitting. ^--------------------------^ SC2046 (warning): Quote this to prevent word splitting. Did you mean: maybe_send_nomatch "$elem" $(printf "10.%d.%d.1" "$i" "$j") $(printf "%d1" $((dport+1))) "before add" || return 1 In nft_concat_range.sh line 1839: maybe_send_match "$elem" $(printf "10.%d.%d.1" $i $j) $(printf "%d" $dport) "after add" || return 1 ^--------------------------^ SC2046 (warning): Quote this to prevent word splitting. ^-- SC2086 (info): Double quote to prevent globbing and word splitting. ^-- SC2086 (info): Double quote to prevent globbing and word splitting. ^-------------------^ SC2046 (warning): Quote this to prevent word splitting. ^----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: maybe_send_match "$elem" $(printf "10.%d.%d.1" "$i" "$j") $(printf "%d" "$dport") "after add" || return 1 In nft_concat_range.sh line 1842: if [ $? -ne 0 ];then ^-- SC2181 (style): Check exit code directly with e.g. 'if ! mycmd;', not indirectly with $?. In nft_concat_range.sh line 1843: local got=$(nft "get element inet filter test { $elem }") ^-^ SC2155 (warning): Declare and assign separately to avoid masking return values. In nft_concat_range.sh line 1848: maybe_send_nomatch "$elem" $(printf "10.%d.%d.1" $i $j) $(printf "%d1" $((dport+1))) "out-of-range" || return 1 ^--------------------------^ SC2046 (warning): Quote this to prevent word splitting. ^-- SC2086 (info): Double quote to prevent globbing and word splitting. ^-- SC2086 (info): Double quote to prevent globbing and word splitting. ^--------------------------^ SC2046 (warning): Quote this to prevent word splitting. Did you mean: maybe_send_nomatch "$elem" $(printf "10.%d.%d.1" "$i" "$j") $(printf "%d1" $((dport+1))) "out-of-range" || return 1 In nft_concat_range.sh line 1857: elem=$(printf "10.%d.%d.0/24 . %d-%d0 . 6-17 " ${i} ${j} ${dport} "$((dport+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: elem=$(printf "10.%d.%d.0/24 . %d-%d0 . 6-17 " "${i}" "${j}" "${dport}" "$((dport+1))") In nft_concat_range.sh line 1860: if [ $? -ne 0 ];then ^-- SC2181 (style): Check exit code directly with e.g. 'if ! mycmd;', not indirectly with $?. In nft_concat_range.sh line 1861: local got=$(nft "get element inet filter test { $elem }") ^-^ SC2155 (warning): Declare and assign separately to avoid masking return values. In nft_concat_range.sh line 1866: maybe_send_match "$elem" $(printf "10.%d.%d.1" $i $j) $(printf "%d" $dport) "recheck" || return 1 ^--------------------------^ SC2046 (warning): Quote this to prevent word splitting. ^-- SC2086 (info): Double quote to prevent globbing and word splitting. ^-- SC2086 (info): Double quote to prevent globbing and word splitting. ^-------------------^ SC2046 (warning): Quote this to prevent word splitting. ^----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: maybe_send_match "$elem" $(printf "10.%d.%d.1" "$i" "$j") $(printf "%d" "$dport") "recheck" || return 1 In nft_concat_range.sh line 1867: maybe_send_nomatch "$elem" $(printf "10.%d.%d.1" $i $j) $(printf "%d1" $((dport+1))) "recheck out-of-range" || return 1 ^--------------------------^ SC2046 (warning): Quote this to prevent word splitting. ^-- SC2086 (info): Double quote to prevent globbing and word splitting. ^-- SC2086 (info): Double quote to prevent globbing and word splitting. ^--------------------------^ SC2046 (warning): Quote this to prevent word splitting. Did you mean: maybe_send_nomatch "$elem" $(printf "10.%d.%d.1" "$i" "$j") $(printf "%d1" $((dport+1))) "recheck out-of-range" || return 1 In nft_concat_range.sh line 1878: elem=$(printf "10.%d.%d.0/24 . %d-%d0 . 6-17 " ${i} ${j} ${dport} "$((dport+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: elem=$(printf "10.%d.%d.0/24 . %d-%d0 . 6-17 " "${i}" "${j}" "${dport}" "$((dport+1))") In nft_concat_range.sh line 1885: if [ $? -eq 0 ];then ^-- SC2181 (style): Check exit code directly with e.g. 'if mycmd;', not indirectly with $?. In nft_concat_range.sh line 1890: maybe_send_nomatch "$elem" $(printf "10.%d.%d.1" $i $j) $(printf "%d" $dport) "match after deletion" || return 1 ^--------------------------^ SC2046 (warning): Quote this to prevent word splitting. ^-- SC2086 (info): Double quote to prevent globbing and word splitting. ^-- SC2086 (info): Double quote to prevent globbing and word splitting. ^-------------------^ SC2046 (warning): Quote this to prevent word splitting. ^----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: maybe_send_nomatch "$elem" $(printf "10.%d.%d.1" "$i" "$j") $(printf "%d" "$dport") "match after deletion" || return 1 In nft_concat_range.sh line 2004: printf "%5ds%-30s" $((tnow-tthen)) ^---------^ SC2183 (warning): This format string has 2 variables, but is passed 1 argument. For more information: https://www.shellcheck.net/wiki/SC2046 -- Quote this to prevent word splitt... https://www.shellcheck.net/wiki/SC2155 -- Declare and assign separately to ... https://www.shellcheck.net/wiki/SC2183 -- This format string has 2 variable...