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.0YiYF9AqCu and /tmp/tmp.l8zNUJFQtb Tree base: 869413825088 ("selftests: drv-net: wait for iperf client to stop sending") Now at: 2f05c7dccc63 ("selftests: netfilter: ipvs.sh: Explicity disable rp_filter on interface tunl0") ====== Checking before the patch ====== Checking tools/testing/selftests/net/netfilter/ipvs.sh - 1e2f8b51ef94d7b32a6e6cad1081e65c67e380147c0b2180c9b9654292904992 In ipvs.sh line 43: readonly infile="$(mktemp)" ^----^ SC2155 (warning): Declare and assign separately to avoid masking return values. In ipvs.sh line 44: readonly outfile="$(mktemp)" ^-----^ SC2155 (warning): Declare and assign separately to avoid masking return values. In ipvs.sh line 61: ip link add veth01 netns "${ns0}" type veth peer name veth10 netns "${ns1}" ^----^ SC2154 (warning): ns0 is referenced but not assigned. ^----^ SC2154 (warning): ns1 is referenced but not assigned. In ipvs.sh line 62: ip link add veth02 netns "${ns0}" type veth peer name veth20 netns "${ns2}" ^----^ SC2154 (warning): ns2 is referenced but not assigned. In ipvs.sh line 179: errors=$(( $errors + $? )) ^-----^ SC2004 (style): $/${} is unnecessary on arithmetic variables. In ipvs.sh line 185: errors=$(( $errors + $? )) ^-----^ SC2004 (style): $/${} is unnecessary on arithmetic variables. In ipvs.sh line 191: errors=$(( $errors + $? )) ^-----^ SC2004 (style): $/${} is unnecessary on arithmetic variables. In ipvs.sh line 200: if [ $? -ne 0 ]; then ^-- SC2181 (style): Check exit code directly with e.g. 'if ! mycmd;', not indirectly with $?. In ipvs.sh line 201: echo -e "$(basename $0): ${RED}FAIL${NC}" ^-- SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: echo -e "$(basename "$0"): ${RED}FAIL${NC}" In ipvs.sh line 204: echo -e "$(basename $0): ${GREEN}PASS${NC}" ^-- SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: echo -e "$(basename "$0"): ${GREEN}PASS${NC}" For more information: https://www.shellcheck.net/wiki/SC2154 -- ns0 is referenced but not assigned. 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/ipvs.sh - 1e2f8b51ef94d7b32a6e6cad1081e65c67e380147c0b2180c9b9654292904992 In ipvs.sh line 43: readonly infile="$(mktemp)" ^----^ SC2155 (warning): Declare and assign separately to avoid masking return values. In ipvs.sh line 44: readonly outfile="$(mktemp)" ^-----^ SC2155 (warning): Declare and assign separately to avoid masking return values. In ipvs.sh line 61: ip link add veth01 netns "${ns0}" type veth peer name veth10 netns "${ns1}" ^----^ SC2154 (warning): ns0 is referenced but not assigned. ^----^ SC2154 (warning): ns1 is referenced but not assigned. In ipvs.sh line 62: ip link add veth02 netns "${ns0}" type veth peer name veth20 netns "${ns2}" ^----^ SC2154 (warning): ns2 is referenced but not assigned. In ipvs.sh line 179: errors=$(( $errors + $? )) ^-----^ SC2004 (style): $/${} is unnecessary on arithmetic variables. In ipvs.sh line 185: errors=$(( $errors + $? )) ^-----^ SC2004 (style): $/${} is unnecessary on arithmetic variables. In ipvs.sh line 191: errors=$(( $errors + $? )) ^-----^ SC2004 (style): $/${} is unnecessary on arithmetic variables. In ipvs.sh line 200: if [ $? -ne 0 ]; then ^-- SC2181 (style): Check exit code directly with e.g. 'if ! mycmd;', not indirectly with $?. In ipvs.sh line 201: echo -e "$(basename $0): ${RED}FAIL${NC}" ^-- SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: echo -e "$(basename "$0"): ${RED}FAIL${NC}" In ipvs.sh line 204: echo -e "$(basename $0): ${GREEN}PASS${NC}" ^-- SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: echo -e "$(basename "$0"): ${GREEN}PASS${NC}" For more information: https://www.shellcheck.net/wiki/SC2154 -- ns0 is referenced but not assigned. https://www.shellcheck.net/wiki/SC2155 -- Declare and assign separately to ... https://www.shellcheck.net/wiki/SC2086 -- Double quote to prevent globbing ...