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.E8ql5wSs1d and /tmp/tmp.6IRHXf3I2E Tree base: e05021a829b8 ("Merge branch 'net-stmmac-qcon-ethqos-rgmii-accessor-cleanups'") Now at: 5c3a9c880f98 ("selftests: netfilter: nft_flowtable.sh: Add the capability to send IPv6 TCP traffic") ====== Checking before the patch ====== Checking tools/testing/selftests/net/netfilter/nft_flowtable.sh - 97ed1c3a9028e5fbabf61c0ddfacbdf11133e6f66732fb13ef0c6fb42b70b4aa In nft_flowtable.sh line 35: ip netns pids "$ns1" | xargs kill 2>/dev/null ^--^ SC2154 (warning): ns1 is referenced but not assigned. In nft_flowtable.sh line 36: ip netns pids "$ns2" | xargs kill 2>/dev/null ^--^ SC2154 (warning): ns2 is referenced but not assigned. In nft_flowtable.sh line 49: ip link add veth0 netns "$nsr1" type veth peer name eth0 netns "$ns1" ^---^ SC2154 (warning): nsr1 is referenced but not assigned. In nft_flowtable.sh line 50: ip link add veth1 netns "$nsr1" type veth peer name veth0 netns "$nsr2" ^---^ SC2154 (warning): nsr2 is referenced but not assigned. In nft_flowtable.sh line 185: if [ $? -ne 0 ]; then ^-- SC2181 (style): Check exit code directly with e.g. 'if ! mycmd;', not indirectly with $?. In nft_flowtable.sh line 205: if [ $? -ne 0 ]; then ^-- SC2181 (style): Check exit code directly with e.g. 'if ! mycmd;', not indirectly with $?. In nft_flowtable.sh line 274: local pmtud="$2" ^---^ SC2034 (warning): pmtud appears unused. Verify use (or export if used externally). In nft_flowtable.sh line 362: if [ $pmtu -eq 0 ]; then ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: if [ "$pmtu" -eq 0 ]; then In nft_flowtable.sh line 378: rc=1 ^-- SC2034 (warning): rc appears unused. Verify use (or export if used externally). In nft_flowtable.sh line 415: if [ $? -eq 0 ]; then ^-- SC2181 (style): Check exit code directly with e.g. 'if mycmd;', not indirectly with $?. In nft_flowtable.sh line 432: if [ $? -eq 0 ]; then ^-- SC2181 (style): Check exit code directly with e.g. 'if mycmd;', not indirectly with $?. For more information: https://www.shellcheck.net/wiki/SC2034 -- pmtud appears unused. Verify use ... https://www.shellcheck.net/wiki/SC2154 -- ns1 is referenced but not assigned. https://www.shellcheck.net/wiki/SC2086 -- Double quote to prevent globbing ... ====== Checking the tree with the patch ====== Checking tools/testing/selftests/net/netfilter/nft_flowtable.sh - 97ed1c3a9028e5fbabf61c0ddfacbdf11133e6f66732fb13ef0c6fb42b70b4aa In nft_flowtable.sh line 35: ip netns pids "$ns1" | xargs kill 2>/dev/null ^--^ SC2154 (warning): ns1 is referenced but not assigned. In nft_flowtable.sh line 36: ip netns pids "$ns2" | xargs kill 2>/dev/null ^--^ SC2154 (warning): ns2 is referenced but not assigned. In nft_flowtable.sh line 49: ip link add veth0 netns "$nsr1" type veth peer name eth0 netns "$ns1" ^---^ SC2154 (warning): nsr1 is referenced but not assigned. In nft_flowtable.sh line 50: ip link add veth1 netns "$nsr1" type veth peer name veth0 netns "$nsr2" ^---^ SC2154 (warning): nsr2 is referenced but not assigned. In nft_flowtable.sh line 189: if [ $? -ne 0 ]; then ^-- SC2181 (style): Check exit code directly with e.g. 'if ! mycmd;', not indirectly with $?. In nft_flowtable.sh line 209: if [ $? -ne 0 ]; then ^-- SC2181 (style): Check exit code directly with e.g. 'if ! mycmd;', not indirectly with $?. In nft_flowtable.sh line 278: local pmtud="$2" ^---^ SC2034 (warning): pmtud appears unused. Verify use (or export if used externally). In nft_flowtable.sh line 367: if [ $pmtu -eq 0 ]; then ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: if [ "$pmtu" -eq 0 ]; then In nft_flowtable.sh line 371: timeout "$SOCAT_TIMEOUT" ip netns exec "$nsb" socat -${proto} TCP${proto}-LISTEN:12345,reuseaddr STDIO < "$infile" > "$ns2out" & ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: timeout "$SOCAT_TIMEOUT" ip netns exec "$nsb" socat -"${proto}" TCP"${proto}"-LISTEN:12345,reuseaddr STDIO < "$infile" > "$ns2out" & In nft_flowtable.sh line 376: timeout "$SOCAT_TIMEOUT" ip netns exec "$nsa" socat -${proto} TCP${proto}:"$dstip":"$dstport" STDIO < "$infile" > "$ns1out" ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: timeout "$SOCAT_TIMEOUT" ip netns exec "$nsa" socat -"${proto}" TCP"${proto}":"$dstip":"$dstport" STDIO < "$infile" > "$ns1out" In nft_flowtable.sh line 383: rc=1 ^-- SC2034 (warning): rc appears unused. Verify use (or export if used externally). In nft_flowtable.sh line 426: if [ $? -eq 0 ]; then ^-- SC2181 (style): Check exit code directly with e.g. 'if mycmd;', not indirectly with $?. In nft_flowtable.sh line 443: if [ $? -eq 0 ]; then ^-- SC2181 (style): Check exit code directly with e.g. 'if mycmd;', not indirectly with $?. For more information: https://www.shellcheck.net/wiki/SC2034 -- pmtud appears unused. Verify use ... https://www.shellcheck.net/wiki/SC2154 -- ns1 is referenced but not assigned. https://www.shellcheck.net/wiki/SC2086 -- Double quote to prevent globbing ...