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.7gBe9Kg7ey and /tmp/tmp.b3wiriPfia Tree base: 98976ac1e917 ("Extend napi threaded polling to allow kthread based busy polling") Now at: f1a13ceabbfa ("selftests: Add napi threaded busy poll test in `busy_poller`") ====== Checking before the patch ====== Checking tools/testing/selftests/net/busy_poll_test.sh - 70cdc848deb3d83cc4b472b477d3dd6a46331d90440952e8c34a4c07630d4496 In busy_poll_test.sh line 26: NAPI_DEFER_HARD_IRQS=100 ^------------------^ SC2034 (warning): NAPI_DEFER_HARD_IRQS appears unused. Verify use (or export if used externally). In busy_poll_test.sh line 27: GRO_FLUSH_TIMEOUT=50000 ^---------------^ SC2034 (warning): GRO_FLUSH_TIMEOUT appears unused. Verify use (or export if used externally). In busy_poll_test.sh line 42: ethtool -L $NSIM_SV_NAME combined 1 2>/dev/null ^-----------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ethtool -L "$NSIM_SV_NAME" combined 1 2>/dev/null In busy_poll_test.sh line 44: 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 busy_poll_test.sh line 45: 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 busy_poll_test.sh line 47: 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 busy_poll_test.sh line 48: 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 busy_poll_test.sh line 50: 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 busy_poll_test.sh line 51: 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 busy_poll_test.sh line 69: dd if=/dev/urandom of=${tmp_file} bs=1M count=1 2> /dev/null ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: dd if=/dev/urandom of="${tmp_file}" bs=1M count=1 2> /dev/null In busy_poll_test.sh line 78: -i${NSIM_SV_IFIDX} \ ^--------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: -i"${NSIM_SV_IFIDX}" \ In busy_poll_test.sh line 79: -s${suspend_value} \ ^--------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: -s"${suspend_value}" \ In busy_poll_test.sh line 80: -o${out_file}& ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: -o"${out_file}"& In busy_poll_test.sh line 84: ip netns exec nscl socat -u $tmp_file TCP:${SERVER_IP}:${SERVER_PORT} ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec nscl socat -u "$tmp_file" TCP:${SERVER_IP}:${SERVER_PORT} In busy_poll_test.sh line 88: tmp_file_md5sum=$(md5sum $tmp_file | cut -f1 -d' ') ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: tmp_file_md5sum=$(md5sum "$tmp_file" | cut -f1 -d' ') In busy_poll_test.sh line 89: out_file_md5sum=$(md5sum $out_file | cut -f1 -d' ') ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: out_file_md5sum=$(md5sum "$out_file" | cut -f1 -d' ') In busy_poll_test.sh line 100: rm $out_file $tmp_file ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: rm "$out_file" "$tmp_file" In busy_poll_test.sh line 124: setup_ns ^------^ SC2119 (info): Use setup_ns "$@" if function's $1 should mean script's $1. In busy_poll_test.sh line 128: 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 busy_poll_test.sh line 132: 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 busy_poll_test.sh line 137: 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 busy_poll_test.sh line 144: if [ $? -ne 0 ]; then ^-- SC2181 (style): Check exit code directly with e.g. 'if ! mycmd;', not indirectly with $?. In busy_poll_test.sh line 151: if [ $? -ne 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 -- GRO_FLUSH_TIMEOUT appears unused.... https://www.shellcheck.net/wiki/SC2320 -- This $? refers to echo/printf, no... https://www.shellcheck.net/wiki/SC2086 -- Double quote to prevent globbing ... ====== Checking the tree with the patch ====== Checking tools/testing/selftests/net/busy_poll_test.sh - 70cdc848deb3d83cc4b472b477d3dd6a46331d90440952e8c34a4c07630d4496 In busy_poll_test.sh line 26: NAPI_DEFER_HARD_IRQS=100 ^------------------^ SC2034 (warning): NAPI_DEFER_HARD_IRQS appears unused. Verify use (or export if used externally). In busy_poll_test.sh line 27: GRO_FLUSH_TIMEOUT=50000 ^---------------^ SC2034 (warning): GRO_FLUSH_TIMEOUT appears unused. Verify use (or export if used externally). In busy_poll_test.sh line 45: ethtool -L $NSIM_SV_NAME combined 1 2>/dev/null ^-----------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ethtool -L "$NSIM_SV_NAME" combined 1 2>/dev/null In busy_poll_test.sh line 47: 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 busy_poll_test.sh line 48: 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 busy_poll_test.sh line 50: 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 busy_poll_test.sh line 51: 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 busy_poll_test.sh line 53: 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 busy_poll_test.sh line 54: 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 busy_poll_test.sh line 75: dd if=/dev/urandom of=${tmp_file} bs=1M count=1 2> /dev/null ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: dd if=/dev/urandom of="${tmp_file}" bs=1M count=1 2> /dev/null In busy_poll_test.sh line 82: -P${prefer_busy_poll_value} \ ^-----------------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: -P"${prefer_busy_poll_value}" \ In busy_poll_test.sh line 84: -i${NSIM_SV_IFIDX} \ ^--------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: -i"${NSIM_SV_IFIDX}" \ In busy_poll_test.sh line 85: -s${suspend_value} \ ^--------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: -s"${suspend_value}" \ In busy_poll_test.sh line 86: -t${napi_threaded_value} \ ^--------------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: -t"${napi_threaded_value}" \ In busy_poll_test.sh line 87: -o${out_file}& ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: -o"${out_file}"& In busy_poll_test.sh line 91: ip netns exec nscl socat -u $tmp_file TCP:${SERVER_IP}:${SERVER_PORT} ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec nscl socat -u "$tmp_file" TCP:${SERVER_IP}:${SERVER_PORT} In busy_poll_test.sh line 95: tmp_file_md5sum=$(md5sum $tmp_file | cut -f1 -d' ') ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: tmp_file_md5sum=$(md5sum "$tmp_file" | cut -f1 -d' ') In busy_poll_test.sh line 96: out_file_md5sum=$(md5sum $out_file | cut -f1 -d' ') ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: out_file_md5sum=$(md5sum "$out_file" | cut -f1 -d' ') In busy_poll_test.sh line 107: rm $out_file $tmp_file ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: rm "$out_file" "$tmp_file" In busy_poll_test.sh line 140: setup_ns ^------^ SC2119 (info): Use setup_ns "$@" if function's $1 should mean script's $1. In busy_poll_test.sh line 144: 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 busy_poll_test.sh line 148: 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 busy_poll_test.sh line 153: 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 busy_poll_test.sh line 160: if [ $? -ne 0 ]; then ^-- SC2181 (style): Check exit code directly with e.g. 'if ! mycmd;', not indirectly with $?. In busy_poll_test.sh line 167: if [ $? -ne 0 ]; then ^-- SC2181 (style): Check exit code directly with e.g. 'if ! mycmd;', not indirectly with $?. In busy_poll_test.sh line 174: if [ $? -ne 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 -- GRO_FLUSH_TIMEOUT appears unused.... https://www.shellcheck.net/wiki/SC2320 -- This $? refers to echo/printf, no... https://www.shellcheck.net/wiki/SC2086 -- Double quote to prevent globbing ...