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.KtvcHwr2aP and /tmp/tmp.QaqLURTwoi Tree base: 5adf6f2b9972 ("Merge branch 'ipv4-icmp-fix-source-ip-derivation-in-presence-of-vrfs'") Now at: d5bd1b0785ad ("selftest:net: fixed spelling mistakes") ====== Checking before the patch ====== Checking tools/testing/selftests/net/netfilter/nft_nat.sh - 9f62677c9fc86cbfba4c2db0a1e5ba819cbb0d930f98d1fb87e188276a3771ff In nft_nat.sh line 16: ip netns pids "$ns0" | xargs kill 2>/dev/null ^--^ SC2154 (warning): ns0 is referenced but not assigned. In nft_nat.sh line 17: ip netns pids "$ns1" | xargs kill 2>/dev/null ^--^ SC2154 (warning): ns1 is referenced but not assigned. In nft_nat.sh line 18: ip netns pids "$ns2" | xargs kill 2>/dev/null ^--^ SC2154 (warning): ns2 is referenced but not assigned. In nft_nat.sh line 166: if [ $? -ne 0 ]; then ^-- SC2181 (style): Check exit code directly with e.g. 'if ! mycmd;', not indirectly with $?. In nft_nat.sh line 236: if [ $? -ne 0 ]; then ^-- SC2181 (style): Check exit code directly with e.g. 'if ! mycmd;', not indirectly with $?. In nft_nat.sh line 359: if [ $? -ne 0 ]; then ^-- SC2181 (style): Check exit code directly with e.g. 'if ! mycmd;', not indirectly with $?. In nft_nat.sh line 420: if [ $? -ne 0 ]; then ^-- SC2181 (style): Check exit code directly with e.g. 'if ! mycmd;', not indirectly with $?. In nft_nat.sh line 511: if [ $? -ne 0 ]; then ^-- SC2181 (style): Check exit code directly with e.g. 'if ! mycmd;', not indirectly with $?. In nft_nat.sh line 600: if [ $? -ne 0 ]; then ^-- SC2181 (style): Check exit code directly with e.g. 'if ! mycmd;', not indirectly with $?. In nft_nat.sh line 675: if [ $? -ne 0 ]; then ^-- SC2181 (style): Check exit code directly with e.g. 'if ! mycmd;', not indirectly with $?. In nft_nat.sh line 846: if [ $? -ne 0 ]; then ^-- SC2181 (style): Check exit code directly with e.g. 'if ! mycmd;', not indirectly with $?. In nft_nat.sh line 921: if [ $? -ne 0 ]; then ^-- SC2181 (style): Check exit code directly with e.g. 'if ! mycmd;', not indirectly with $?. In nft_nat.sh line 1027: if [ $? -ne 0 ]; then ^-- SC2181 (style): Check exit code directly with e.g. 'if ! mycmd;', not indirectly with $?. In nft_nat.sh line 1037: local lpid=$! ^--^ SC2034 (warning): lpid appears unused. Verify use (or export if used externally). For more information: https://www.shellcheck.net/wiki/SC2034 -- lpid appears unused. Verify use (... https://www.shellcheck.net/wiki/SC2154 -- ns0 is referenced but not assigned. https://www.shellcheck.net/wiki/SC2181 -- Check exit code directly with e.g... ====== Checking the tree with the patch ====== Checking tools/testing/selftests/net/netfilter/nft_nat.sh - 9f62677c9fc86cbfba4c2db0a1e5ba819cbb0d930f98d1fb87e188276a3771ff In nft_nat.sh line 16: ip netns pids "$ns0" | xargs kill 2>/dev/null ^--^ SC2154 (warning): ns0 is referenced but not assigned. In nft_nat.sh line 17: ip netns pids "$ns1" | xargs kill 2>/dev/null ^--^ SC2154 (warning): ns1 is referenced but not assigned. In nft_nat.sh line 18: ip netns pids "$ns2" | xargs kill 2>/dev/null ^--^ SC2154 (warning): ns2 is referenced but not assigned. In nft_nat.sh line 166: if [ $? -ne 0 ]; then ^-- SC2181 (style): Check exit code directly with e.g. 'if ! mycmd;', not indirectly with $?. In nft_nat.sh line 236: if [ $? -ne 0 ]; then ^-- SC2181 (style): Check exit code directly with e.g. 'if ! mycmd;', not indirectly with $?. In nft_nat.sh line 359: if [ $? -ne 0 ]; then ^-- SC2181 (style): Check exit code directly with e.g. 'if ! mycmd;', not indirectly with $?. In nft_nat.sh line 420: if [ $? -ne 0 ]; then ^-- SC2181 (style): Check exit code directly with e.g. 'if ! mycmd;', not indirectly with $?. In nft_nat.sh line 511: if [ $? -ne 0 ]; then ^-- SC2181 (style): Check exit code directly with e.g. 'if ! mycmd;', not indirectly with $?. In nft_nat.sh line 600: if [ $? -ne 0 ]; then ^-- SC2181 (style): Check exit code directly with e.g. 'if ! mycmd;', not indirectly with $?. In nft_nat.sh line 675: if [ $? -ne 0 ]; then ^-- SC2181 (style): Check exit code directly with e.g. 'if ! mycmd;', not indirectly with $?. In nft_nat.sh line 846: if [ $? -ne 0 ]; then ^-- SC2181 (style): Check exit code directly with e.g. 'if ! mycmd;', not indirectly with $?. In nft_nat.sh line 921: if [ $? -ne 0 ]; then ^-- SC2181 (style): Check exit code directly with e.g. 'if ! mycmd;', not indirectly with $?. In nft_nat.sh line 1027: if [ $? -ne 0 ]; then ^-- SC2181 (style): Check exit code directly with e.g. 'if ! mycmd;', not indirectly with $?. In nft_nat.sh line 1037: local lpid=$! ^--^ SC2034 (warning): lpid appears unused. Verify use (or export if used externally). For more information: https://www.shellcheck.net/wiki/SC2034 -- lpid appears unused. Verify use (... https://www.shellcheck.net/wiki/SC2154 -- ns0 is referenced but not assigned. https://www.shellcheck.net/wiki/SC2181 -- Check exit code directly with e.g...