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.0NsrZx3Nxk and /tmp/tmp.JXn6ZOFKtT Tree base: 50e68ebc1e13 ("selftests: net: add passive TFO test binary") Now at: 01edbe9a0112 ("selftests: net: add test for passive TFO socket NAPI ID") ====== Checking before the patch ====== ====== Checking the tree with the patch ====== Checking tools/testing/selftests/net/tfo_passive.sh - 0e04dee51216aad9f926797aa1655e5277880e1b4339a2bab6db0d6f89444e9c In tfo_passive.sh line 30: ip link set $NSIM_SV_NAME netns nssv ^-----------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip link set "$NSIM_SV_NAME" netns nssv In tfo_passive.sh line 31: ip link set $NSIM_CL_NAME netns nscl ^-----------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip link set "$NSIM_CL_NAME" netns nscl In tfo_passive.sh line 33: ip netns exec nssv ip addr add "${SERVER_IP}/24" dev $NSIM_SV_NAME ^-----------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec nssv ip addr add "${SERVER_IP}/24" dev "$NSIM_SV_NAME" In tfo_passive.sh line 34: ip netns exec nscl ip addr add "${CLIENT_IP}/24" dev $NSIM_CL_NAME ^-----------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec nscl ip addr add "${CLIENT_IP}/24" dev "$NSIM_CL_NAME" In tfo_passive.sh line 36: ip netns exec nssv ip link set dev $NSIM_SV_NAME up ^-----------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec nssv ip link set dev "$NSIM_SV_NAME" up In tfo_passive.sh line 37: ip netns exec nscl ip link set dev $NSIM_CL_NAME up ^-----------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec nscl ip link set dev "$NSIM_CL_NAME" up In tfo_passive.sh line 63: setup_ns ^------^ SC2119 (info): Use setup_ns "$@" if function's $1 should mean script's $1. In tfo_passive.sh line 67: NSIM_SV_IFIDX=$(ip netns exec nssv cat /sys/class/net/$NSIM_SV_NAME/ifindex) ^-----------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: NSIM_SV_IFIDX=$(ip netns exec nssv cat /sys/class/net/"$NSIM_SV_NAME"/ifindex) In tfo_passive.sh line 71: NSIM_CL_IFIDX=$(ip netns exec nscl cat /sys/class/net/$NSIM_CL_NAME/ifindex) ^-----------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: NSIM_CL_IFIDX=$(ip netns exec nscl cat /sys/class/net/"$NSIM_CL_NAME"/ifindex) In tfo_passive.sh line 76: if [ $? -ne 0 ]; then ^-- SC2320 (warning): This $? refers to echo/printf, not a previous command. Assign to variable to avoid it being overwritten. ^-- SC2181 (style): Check exit code directly with e.g. 'if ! mycmd;', not indirectly with $?. In tfo_passive.sh line 87: -o ${out_file}& ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: -o "${out_file}"& In tfo_passive.sh line 95: res=$(cat $out_file) ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: res=$(cat "$out_file") In tfo_passive.sh line 96: rm $out_file ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: rm "$out_file" In tfo_passive.sh line 98: if [ $res -eq 0 ]; then ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: if [ "$res" -eq 0 ]; then For more information: https://www.shellcheck.net/wiki/SC2320 -- This $? refers to echo/printf, no... https://www.shellcheck.net/wiki/SC2086 -- Double quote to prevent globbing ... https://www.shellcheck.net/wiki/SC2119 -- Use setup_ns "$@" if function's $...