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.z6VNhoY1Kz and /tmp/tmp.ougSQQtsDX Tree base: 5701d5aefa19 ("bpf: Use kmalloc_nolock() in bpf streams") Now at: fbb7eb7fa7e0 ("selftests/bpf: rename test_tc_edt.bpf.c section to expose program type") ====== Checking before the patch ====== Checking tools/testing/selftests/bpf/test_tc_edt.sh - 2f11adcee1e477f6fd4a8568f00a2c74dbcc8f3bc8d2503e1e507e0c153b659a In test_tc_edt.sh line 23: readonly NS_SRC="ns-src-$(mktemp -u XXXXXX)" ^----^ SC2155 (warning): Declare and assign separately to avoid masking return values. In test_tc_edt.sh line 24: readonly NS_DST="ns-dst-$(mktemp -u XXXXXX)" ^----^ SC2155 (warning): Declare and assign separately to avoid masking return values. In test_tc_edt.sh line 31: ip netns del ${NS_SRC} ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns del "${NS_SRC}" In test_tc_edt.sh line 32: ip netns del ${NS_DST} ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns del "${NS_DST}" In test_tc_edt.sh line 42: ip link set veth_src netns ${NS_SRC} ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip link set veth_src netns "${NS_SRC}" In test_tc_edt.sh line 43: ip link set veth_dst netns ${NS_DST} ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip link set veth_dst netns "${NS_DST}" In test_tc_edt.sh line 45: ip -netns ${NS_SRC} addr add ${IP_SRC}/24 dev veth_src ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -netns "${NS_SRC}" addr add ${IP_SRC}/24 dev veth_src In test_tc_edt.sh line 46: ip -netns ${NS_DST} addr add ${IP_DST}/24 dev veth_dst ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -netns "${NS_DST}" addr add ${IP_DST}/24 dev veth_dst In test_tc_edt.sh line 48: ip -netns ${NS_SRC} link set dev veth_src up ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -netns "${NS_SRC}" link set dev veth_src up In test_tc_edt.sh line 49: ip -netns ${NS_DST} link set dev veth_dst up ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -netns "${NS_DST}" link set dev veth_dst up In test_tc_edt.sh line 51: ip -netns ${NS_SRC} route add ${IP_DST}/32 dev veth_src ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -netns "${NS_SRC}" route add ${IP_DST}/32 dev veth_src In test_tc_edt.sh line 52: ip -netns ${NS_DST} route add ${IP_SRC}/32 dev veth_dst ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -netns "${NS_DST}" route add ${IP_SRC}/32 dev veth_dst In test_tc_edt.sh line 55: ip netns exec ${NS_SRC} tc qdisc add dev veth_src root fq ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "${NS_SRC}" tc qdisc add dev veth_src root fq In test_tc_edt.sh line 56: ip netns exec ${NS_SRC} tc qdisc add dev veth_src clsact ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "${NS_SRC}" tc qdisc add dev veth_src clsact In test_tc_edt.sh line 57: ip netns exec ${NS_SRC} tc filter add dev veth_src egress \ ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "${NS_SRC}" tc filter add dev veth_src egress \ In test_tc_edt.sh line 62: ip netns exec ${NS_DST} bash -c \ ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "${NS_DST}" bash -c \ In test_tc_edt.sh line 64: declare -i NC_PID=$! ^----^ SC2034 (warning): NC_PID appears unused. Verify use (or export if used externally). In test_tc_edt.sh line 71: declare -ir RX_BYTES_START=$( ip netns exec ${NS_DST} \ ^------------^ SC2155 (warning): Declare and assign separately to avoid masking return values. ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: declare -ir RX_BYTES_START=$( ip netns exec "${NS_DST}" \ In test_tc_edt.sh line 75: ip netns exec ${NS_SRC} bash -c "timeout ${TIMEOUT} dd if=/dev/zero \ ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "${NS_SRC}" bash -c "timeout ${TIMEOUT} dd if=/dev/zero \ In test_tc_edt.sh line 79: declare -ir RX_BYTES_END=$( ip netns exec ${NS_DST} \ ^----------^ SC2155 (warning): Declare and assign separately to avoid masking return values. ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: declare -ir RX_BYTES_END=$( ip netns exec "${NS_DST}" \ In test_tc_edt.sh line 82: declare -ir ACTUAL_BPS=$(( ($RX_BYTES_END - $RX_BYTES_START) / $TIMEOUT )) ^-----------^ SC2004 (style): $/${} is unnecessary on arithmetic variables. ^-------------^ SC2004 (style): $/${} is unnecessary on arithmetic variables. ^------^ SC2004 (style): $/${} is unnecessary on arithmetic variables. In test_tc_edt.sh line 91: declare -ir RES=$( echo $ACTUAL_BPS $EXPECTED_BPS | \ ^-^ SC2155 (warning): Declare and assign separately to avoid masking return values. For more information: https://www.shellcheck.net/wiki/SC2034 -- NC_PID appears unused. Verify use... 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/bpf/test_tc_edt.sh - 2f11adcee1e477f6fd4a8568f00a2c74dbcc8f3bc8d2503e1e507e0c153b659a In test_tc_edt.sh line 23: readonly NS_SRC="ns-src-$(mktemp -u XXXXXX)" ^----^ SC2155 (warning): Declare and assign separately to avoid masking return values. In test_tc_edt.sh line 24: readonly NS_DST="ns-dst-$(mktemp -u XXXXXX)" ^----^ SC2155 (warning): Declare and assign separately to avoid masking return values. In test_tc_edt.sh line 31: ip netns del ${NS_SRC} ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns del "${NS_SRC}" In test_tc_edt.sh line 32: ip netns del ${NS_DST} ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns del "${NS_DST}" In test_tc_edt.sh line 42: ip link set veth_src netns ${NS_SRC} ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip link set veth_src netns "${NS_SRC}" In test_tc_edt.sh line 43: ip link set veth_dst netns ${NS_DST} ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip link set veth_dst netns "${NS_DST}" In test_tc_edt.sh line 45: ip -netns ${NS_SRC} addr add ${IP_SRC}/24 dev veth_src ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -netns "${NS_SRC}" addr add ${IP_SRC}/24 dev veth_src In test_tc_edt.sh line 46: ip -netns ${NS_DST} addr add ${IP_DST}/24 dev veth_dst ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -netns "${NS_DST}" addr add ${IP_DST}/24 dev veth_dst In test_tc_edt.sh line 48: ip -netns ${NS_SRC} link set dev veth_src up ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -netns "${NS_SRC}" link set dev veth_src up In test_tc_edt.sh line 49: ip -netns ${NS_DST} link set dev veth_dst up ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -netns "${NS_DST}" link set dev veth_dst up In test_tc_edt.sh line 51: ip -netns ${NS_SRC} route add ${IP_DST}/32 dev veth_src ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -netns "${NS_SRC}" route add ${IP_DST}/32 dev veth_src In test_tc_edt.sh line 52: ip -netns ${NS_DST} route add ${IP_SRC}/32 dev veth_dst ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -netns "${NS_DST}" route add ${IP_SRC}/32 dev veth_dst In test_tc_edt.sh line 55: ip netns exec ${NS_SRC} tc qdisc add dev veth_src root fq ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "${NS_SRC}" tc qdisc add dev veth_src root fq In test_tc_edt.sh line 56: ip netns exec ${NS_SRC} tc qdisc add dev veth_src clsact ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "${NS_SRC}" tc qdisc add dev veth_src clsact In test_tc_edt.sh line 57: ip netns exec ${NS_SRC} tc filter add dev veth_src egress \ ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "${NS_SRC}" tc filter add dev veth_src egress \ In test_tc_edt.sh line 62: ip netns exec ${NS_DST} bash -c \ ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "${NS_DST}" bash -c \ In test_tc_edt.sh line 64: declare -i NC_PID=$! ^----^ SC2034 (warning): NC_PID appears unused. Verify use (or export if used externally). In test_tc_edt.sh line 71: declare -ir RX_BYTES_START=$( ip netns exec ${NS_DST} \ ^------------^ SC2155 (warning): Declare and assign separately to avoid masking return values. ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: declare -ir RX_BYTES_START=$( ip netns exec "${NS_DST}" \ In test_tc_edt.sh line 75: ip netns exec ${NS_SRC} bash -c "timeout ${TIMEOUT} dd if=/dev/zero \ ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "${NS_SRC}" bash -c "timeout ${TIMEOUT} dd if=/dev/zero \ In test_tc_edt.sh line 79: declare -ir RX_BYTES_END=$( ip netns exec ${NS_DST} \ ^----------^ SC2155 (warning): Declare and assign separately to avoid masking return values. ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: declare -ir RX_BYTES_END=$( ip netns exec "${NS_DST}" \ In test_tc_edt.sh line 82: declare -ir ACTUAL_BPS=$(( ($RX_BYTES_END - $RX_BYTES_START) / $TIMEOUT )) ^-----------^ SC2004 (style): $/${} is unnecessary on arithmetic variables. ^-------------^ SC2004 (style): $/${} is unnecessary on arithmetic variables. ^------^ SC2004 (style): $/${} is unnecessary on arithmetic variables. In test_tc_edt.sh line 91: declare -ir RES=$( echo $ACTUAL_BPS $EXPECTED_BPS | \ ^-^ SC2155 (warning): Declare and assign separately to avoid masking return values. For more information: https://www.shellcheck.net/wiki/SC2034 -- NC_PID appears unused. Verify use... https://www.shellcheck.net/wiki/SC2155 -- Declare and assign separately to ... https://www.shellcheck.net/wiki/SC2086 -- Double quote to prevent globbing ...