ShellCheck - shell script analysis tool version: 0.11.0 license: GNU General Public License, version 3 website: https://www.shellcheck.net Redirect to /tmp/tmp.PuxESm6P4S and /tmp/tmp.H9SHQLN1ci Tree base: bf455b531ed7 ("ovpn: add support for asymmetric peer IDs") Now at: ae8009acf65e ("selftests: ovpn: check asymmetric peer-id") ====== Checking before the patch ====== Checking tools/testing/selftests/net/ovpn/common.sh - e3a67af2e113ee92dfb9cddd321874ac9c303e36744b0c6b1f1fc22173315989 In common.sh line 23: ip netns add peer${1} ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns add peer"${1}" In common.sh line 29: if [ ${1} -eq 0 ]; then ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: if [ "${1}" -eq 0 ]; then In common.sh line 31: for p in $(seq 1 ${NUM_PEERS}); do ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: for p in $(seq 1 "${NUM_PEERS}"); do In common.sh line 32: ip link add veth${p} netns peer0 type veth peer name veth${p} netns peer${p} ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip link add veth"${p}" netns peer0 type veth peer name veth"${p}" netns peer"${p}" In common.sh line 34: ip -n peer0 addr add 10.10.${p}.1/24 dev veth${p} ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -n peer0 addr add 10.10."${p}".1/24 dev veth"${p}" In common.sh line 35: ip -n peer0 addr add fd00:0:0:${p}::1/64 dev veth${p} ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -n peer0 addr add fd00:0:0:"${p}"::1/64 dev veth"${p}" In common.sh line 36: ip -n peer0 link set veth${p} up ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -n peer0 link set veth"${p}" up In common.sh line 38: ip -n peer${p} addr add 10.10.${p}.2/24 dev veth${p} ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -n peer"${p}" addr add 10.10."${p}".2/24 dev veth"${p}" In common.sh line 39: ip -n peer${p} addr add fd00:0:0:${p}::2/64 dev veth${p} ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -n peer"${p}" addr add fd00:0:0:"${p}"::2/64 dev veth"${p}" In common.sh line 40: ip -n peer${p} link set veth${p} up ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -n peer"${p}" link set veth"${p}" up In common.sh line 44: ip netns exec peer${1} ${OVPN_CLI} new_iface tun${1} $MODE ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec peer"${1}" "${OVPN_CLI}" new_iface tun"${1}" $MODE In common.sh line 45: ip -n peer${1} addr add ${2} dev tun${1} ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -n peer"${1}" addr add "${2}" dev tun"${1}" In common.sh line 47: if [ ${1} -eq 1 -a -n "${LAN_IP}" ]; then ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^-- SC2166 (warning): Prefer [ p ] && [ q ] as [ p -a q ] is not well defined. Did you mean: if [ "${1}" -eq 1 -a -n "${LAN_IP}" ]; then In common.sh line 48: ip -n peer${1} addr add ${LAN_IP} dev tun${1} ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -n peer"${1}" addr add ${LAN_IP} dev tun"${1}" In common.sh line 49: ip -n peer0 route add ${LAN_IP} via $(echo ${2} |sed -e s'!/.*!!') dev tun0 ^----------------------------^ SC2046 (warning): Quote this to prevent word splitting. ^-------------------------^ SC2001 (style): See if you can use ${variable//search/replace} instead. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -n peer0 route add ${LAN_IP} via $(echo "${2}" |sed -e s'!/.*!!') dev tun0 In common.sh line 52: ip -n peer${1} link set mtu ${3} dev tun${1} ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -n peer"${1}" link set mtu "${3}" dev tun"${1}" In common.sh line 54: ip -n peer${1} link set tun${1} up ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -n peer"${1}" link set tun"${1}" up In common.sh line 59: PYTHONUNBUFFERED=1 ip netns exec peer${p} ${YNL_CLI} --family ovpn \ ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: PYTHONUNBUFFERED=1 ip netns exec peer"${p}" "${YNL_CLI}" --family ovpn \ In common.sh line 60: --subscribe peers --output-json --duration 40 > ${file} & ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: --subscribe peers --output-json --duration 40 > "${file}" & In common.sh line 67: if [ ${1} -eq 0 ]; then ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: if [ "${1}" -eq 0 ]; then In common.sh line 68: ip netns exec peer0 ${OVPN_CLI} new_multi_peer tun0 1 ${UDP_PEERS_FILE} ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec peer0 "${OVPN_CLI}" new_multi_peer tun0 1 "${UDP_PEERS_FILE}" In common.sh line 70: for p in $(seq 1 ${NUM_PEERS}); do ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: for p in $(seq 1 "${NUM_PEERS}"); do In common.sh line 71: ip netns exec peer0 ${OVPN_CLI} new_key tun0 ${p} 1 0 ${ALG} 0 \ ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec peer0 "${OVPN_CLI}" new_key tun0 "${p}" 1 0 "${ALG}" 0 \ In common.sh line 75: RADDR=$(awk "NR == ${1} {print \$2}" ${UDP_PEERS_FILE}) ^---------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: RADDR=$(awk "NR == ${1} {print \$2}" "${UDP_PEERS_FILE}") In common.sh line 76: RPORT=$(awk "NR == ${1} {print \$3}" ${UDP_PEERS_FILE}) ^---------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: RPORT=$(awk "NR == ${1} {print \$3}" "${UDP_PEERS_FILE}") In common.sh line 77: LPORT=$(awk "NR == ${1} {print \$5}" ${UDP_PEERS_FILE}) ^---------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: LPORT=$(awk "NR == ${1} {print \$5}" "${UDP_PEERS_FILE}") In common.sh line 78: ip netns exec peer${1} ${OVPN_CLI} new_peer tun${1} ${1} ${LPORT} \ ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec peer"${1}" "${OVPN_CLI}" new_peer tun"${1}" "${1}" "${LPORT}" \ In common.sh line 79: ${RADDR} ${RPORT} ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: "${RADDR}" "${RPORT}" In common.sh line 80: ip netns exec peer${1} ${OVPN_CLI} new_key tun${1} ${1} 1 0 ${ALG} 1 \ ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec peer"${1}" "${OVPN_CLI}" new_key tun"${1}" "${1}" 1 0 "${ALG}" 1 \ In common.sh line 84: if [ ${1} -eq 0 ]; then ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: if [ "${1}" -eq 0 ]; then In common.sh line 85: (ip netns exec peer0 ${OVPN_CLI} listen tun0 1 ${TCP_PEERS_FILE} && { ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: (ip netns exec peer0 "${OVPN_CLI}" listen tun0 1 "${TCP_PEERS_FILE}" && { In common.sh line 86: for p in $(seq 1 ${NUM_PEERS}); do ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: for p in $(seq 1 "${NUM_PEERS}"); do In common.sh line 87: ip netns exec peer0 ${OVPN_CLI} new_key tun0 ${p} 1 0 \ ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec peer0 "${OVPN_CLI}" new_key tun0 "${p}" 1 0 \ In common.sh line 88: ${ALG} 0 data64.key ^----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: "${ALG}" 0 data64.key In common.sh line 93: ip netns exec peer${1} ${OVPN_CLI} connect tun${1} ${1} 10.10.${1}.1 1 \ ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec peer"${1}" "${OVPN_CLI}" connect tun"${1}" "${1}" 10.10."${1}".1 1 \ In common.sh line 105: kill -TERM ${listener_pids[$1]} || true ^------------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: kill -TERM "${listener_pids[$1]}" || true In common.sh line 106: wait ${listener_pids[$1]} || true ^------------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: wait "${listener_pids[$1]}" || true In common.sh line 107: printf "Checking notifications for peer ${1}... " ^-- SC2059 (info): Don't use variables in the printf format string. Use printf '..%s..' "$foo". In common.sh line 108: if diff <(jq -s "${JQ_FILTER}" ${expected}) \ ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: if diff <(jq -s "${JQ_FILTER}" "${expected}") \ In common.sh line 109: <(jq -s "${JQ_FILTER}" ${received}); then ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: <(jq -s "${JQ_FILTER}" "${received}"); then In common.sh line 113: rm -f ${received} || true ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: rm -f "${received}" || true In common.sh line 119: killall $(basename ${OVPN_CLI}) 2>/dev/null || true ^---------------------^ SC2046 (warning): Quote this to prevent word splitting. ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: killall $(basename "${OVPN_CLI}") 2>/dev/null || true In common.sh line 123: ip -n peer${p} link set tun${p} down 2>/dev/null || true ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -n peer"${p}" link set tun"${p}" down 2>/dev/null || true In common.sh line 124: ip netns exec peer${p} ${OVPN_CLI} del_iface tun${p} 2>/dev/null || true ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec peer"${p}" "${OVPN_CLI}" del_iface tun"${p}" 2>/dev/null || true In common.sh line 127: ip -n peer0 link del veth${p} 2>/dev/null || true ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -n peer0 link del veth"${p}" 2>/dev/null || true In common.sh line 130: ip netns del peer${p} 2>/dev/null || true ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns del peer"${p}" 2>/dev/null || true In common.sh line 135: NUM_PEERS=${NUM_PEERS:-$(wc -l ${UDP_PEERS_FILE} | awk '{print $1}')} ^---------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: NUM_PEERS=${NUM_PEERS:-$(wc -l "${UDP_PEERS_FILE}" | awk '{print $1}')} In common.sh line 137: NUM_PEERS=${NUM_PEERS:-$(wc -l ${TCP_PEERS_FILE} | awk '{print $1}')} ^---------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: NUM_PEERS=${NUM_PEERS:-$(wc -l "${TCP_PEERS_FILE}" | awk '{print $1}')} For more information: https://www.shellcheck.net/wiki/SC2046 -- Quote this to prevent word splitt... https://www.shellcheck.net/wiki/SC2166 -- Prefer [ p ] && [ q ] as [ p -a q... https://www.shellcheck.net/wiki/SC2059 -- Don't use variables in the printf... Checking tools/testing/selftests/net/ovpn/test-close-socket.sh - b0c89d8b64dcdfc73f643e1c7a7f2d1a8f30e575be458c34fe58ba2d562e9b34 In test-close-socket.sh line 16: for p in $(seq 0 ${NUM_PEERS}); do ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: for p in $(seq 0 "${NUM_PEERS}"); do In test-close-socket.sh line 17: create_ns ${p} ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: create_ns "${p}" In test-close-socket.sh line 20: for p in $(seq 0 ${NUM_PEERS}); do ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: for p in $(seq 0 "${NUM_PEERS}"); do In test-close-socket.sh line 21: setup_ns ${p} 5.5.5.$((${p} + 1))/24 ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2004 (style): $/${} is unnecessary on arithmetic variables. Did you mean: setup_ns "${p}" 5.5.5.$((${p} + 1))/24 In test-close-socket.sh line 24: for p in $(seq 0 ${NUM_PEERS}); do ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: for p in $(seq 0 "${NUM_PEERS}"); do In test-close-socket.sh line 25: add_peer ${p} ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: add_peer "${p}" In test-close-socket.sh line 28: for p in $(seq 1 ${NUM_PEERS}); do ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: for p in $(seq 1 "${NUM_PEERS}"); do In test-close-socket.sh line 29: ip netns exec peer0 ${OVPN_CLI} set_peer tun0 ${p} 60 120 ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec peer0 "${OVPN_CLI}" set_peer tun0 "${p}" 60 120 In test-close-socket.sh line 30: ip netns exec peer${p} ${OVPN_CLI} set_peer tun${p} ${p} 60 120 ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec peer"${p}" "${OVPN_CLI}" set_peer tun"${p}" "${p}" 60 120 In test-close-socket.sh line 35: for p in $(seq 1 ${NUM_PEERS}); do ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: for p in $(seq 1 "${NUM_PEERS}"); do In test-close-socket.sh line 36: ip netns exec peer0 ping -qfc 500 -w 3 5.5.5.$((${p} + 1)) ^--^ SC2004 (style): $/${} is unnecessary on arithmetic variables. For more information: https://www.shellcheck.net/wiki/SC2086 -- Double quote to prevent globbing ... https://www.shellcheck.net/wiki/SC2004 -- $/${} is unnecessary on arithmeti... Checking tools/testing/selftests/net/ovpn/test.sh - 8aea422bc8ffa29c1c10a341b4847c0fdf51abd61d5b98b552a435ac5f532301 In test.sh line 16: for p in $(seq 0 ${NUM_PEERS}); do ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: for p in $(seq 0 "${NUM_PEERS}"); do In test.sh line 17: create_ns ${p} ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: create_ns "${p}" In test.sh line 20: for p in $(seq 0 ${NUM_PEERS}); do ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: for p in $(seq 0 "${NUM_PEERS}"); do In test.sh line 21: setup_listener ${p} ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: setup_listener "${p}" In test.sh line 24: for p in $(seq 0 ${NUM_PEERS}); do ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: for p in $(seq 0 "${NUM_PEERS}"); do In test.sh line 25: setup_ns ${p} 5.5.5.$((${p} + 1))/24 ${MTU} ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2004 (style): $/${} is unnecessary on arithmetic variables. ^----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: setup_ns "${p}" 5.5.5.$((${p} + 1))/24 "${MTU}" In test.sh line 28: for p in $(seq 0 ${NUM_PEERS}); do ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: for p in $(seq 0 "${NUM_PEERS}"); do In test.sh line 29: add_peer ${p} ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: add_peer "${p}" In test.sh line 32: for p in $(seq 1 ${NUM_PEERS}); do ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: for p in $(seq 1 "${NUM_PEERS}"); do In test.sh line 33: ip netns exec peer0 ${OVPN_CLI} set_peer tun0 ${p} 60 120 ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec peer0 "${OVPN_CLI}" set_peer tun0 "${p}" 60 120 In test.sh line 34: ip netns exec peer${p} ${OVPN_CLI} set_peer tun${p} ${p} 60 120 ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec peer"${p}" "${OVPN_CLI}" set_peer tun"${p}" "${p}" 60 120 In test.sh line 39: for p in $(seq 1 ${NUM_PEERS}); do ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: for p in $(seq 1 "${NUM_PEERS}"); do In test.sh line 40: ip netns exec peer0 ping -qfc 500 -w 3 5.5.5.$((${p} + 1)) ^--^ SC2004 (style): $/${} is unnecessary on arithmetic variables. In test.sh line 41: ip netns exec peer0 ping -qfc 500 -s 3000 -w 3 5.5.5.$((${p} + 1)) ^--^ SC2004 (style): $/${} is unnecessary on arithmetic variables. In test.sh line 49: for p in $(seq 1 ${NUM_PEERS}); do ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: for p in $(seq 1 "${NUM_PEERS}"); do In test.sh line 50: ip -n peer${p} addr del 10.10.${p}.2/24 dev veth${p} ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -n peer"${p}" addr del 10.10."${p}".2/24 dev veth"${p}" In test.sh line 51: ip -n peer${p} addr add 10.10.${p}.3/24 dev veth${p} ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -n peer"${p}" addr add 10.10."${p}".3/24 dev veth"${p}" In test.sh line 53: for p in $(seq 1 ${NUM_PEERS}); do ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: for p in $(seq 1 "${NUM_PEERS}"); do In test.sh line 54: ip netns exec peer${p} ping -qfc 500 -w 3 5.5.5.1 ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec peer"${p}" ping -qfc 500 -w 3 5.5.5.1 In test.sh line 63: for p in $(seq 1 ${NUM_PEERS}); do ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: for p in $(seq 1 "${NUM_PEERS}"); do In test.sh line 64: ip netns exec peer0 ${OVPN_CLI} new_key tun0 ${p} 2 1 ${ALG} 0 data64.key ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec peer0 "${OVPN_CLI}" new_key tun0 "${p}" 2 1 "${ALG}" 0 data64.key In test.sh line 65: ip netns exec peer${p} ${OVPN_CLI} new_key tun${p} ${p} 2 1 ${ALG} 1 data64.key ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec peer"${p}" "${OVPN_CLI}" new_key tun"${p}" "${p}" 2 1 "${ALG}" 1 data64.key In test.sh line 66: ip netns exec peer${p} ${OVPN_CLI} swap_keys tun${p} ${p} ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec peer"${p}" "${OVPN_CLI}" swap_keys tun"${p}" "${p}" In test.sh line 72: ip netns exec peer0 ${OVPN_CLI} get_peer tun0 ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec peer0 "${OVPN_CLI}" get_peer tun0 In test.sh line 73: ip netns exec peer1 ${OVPN_CLI} get_peer tun1 ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec peer1 "${OVPN_CLI}" get_peer tun1 In test.sh line 76: ip netns exec peer0 ${OVPN_CLI} get_peer tun0 1 ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec peer0 "${OVPN_CLI}" get_peer tun0 1 In test.sh line 79: ip netns exec peer0 ${OVPN_CLI} get_peer tun0 10 || true ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec peer0 "${OVPN_CLI}" get_peer tun0 10 || true In test.sh line 82: ip netns exec peer0 ${OVPN_CLI} del_peer tun0 1 ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec peer0 "${OVPN_CLI}" del_peer tun0 1 In test.sh line 83: ip netns exec peer1 ${OVPN_CLI} del_peer tun1 1 ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec peer1 "${OVPN_CLI}" del_peer tun1 1 In test.sh line 86: for p in $(seq 2 ${NUM_PEERS}); do ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: for p in $(seq 2 "${NUM_PEERS}"); do In test.sh line 87: ip netns exec peer${p} ${OVPN_CLI} get_key tun${p} ${p} 1 ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec peer"${p}" "${OVPN_CLI}" get_key tun"${p}" "${p}" 1 In test.sh line 88: ip netns exec peer${p} ${OVPN_CLI} get_key tun${p} ${p} 2 ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec peer"${p}" "${OVPN_CLI}" get_key tun"${p}" "${p}" 2 In test.sh line 94: ip netns exec peer0 ${OVPN_CLI} del_peer tun0 2 ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec peer0 "${OVPN_CLI}" del_peer tun0 2 In test.sh line 97: ip netns exec peer2 ${OVPN_CLI} del_peer tun2 2 || true ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec peer2 "${OVPN_CLI}" del_peer tun2 2 || true In test.sh line 100: for p in $(seq 3 ${NUM_PEERS}); do ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: for p in $(seq 3 "${NUM_PEERS}"); do In test.sh line 101: ip netns exec peer${p} ${OVPN_CLI} del_key tun${p} ${p} 1 ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec peer"${p}" "${OVPN_CLI}" del_key tun"${p}" "${p}" 1 In test.sh line 102: ip netns exec peer${p} ${OVPN_CLI} del_key tun${p} ${p} 2 ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec peer"${p}" "${OVPN_CLI}" del_key tun"${p}" "${p}" 2 In test.sh line 106: for p in $(seq 3 ${NUM_PEERS}); do ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: for p in $(seq 3 "${NUM_PEERS}"); do In test.sh line 107: ip netns exec peer0 ${OVPN_CLI} set_peer tun0 ${p} 3 3 || true ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec peer0 "${OVPN_CLI}" set_peer tun0 "${p}" 3 3 || true In test.sh line 108: ip netns exec peer${p} ${OVPN_CLI} set_peer tun${p} ${p} 0 0 ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec peer"${p}" "${OVPN_CLI}" set_peer tun"${p}" "${p}" 0 0 In test.sh line 114: for p in $(seq 3 ${NUM_PEERS}); do ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: for p in $(seq 3 "${NUM_PEERS}"); do In test.sh line 115: ip netns exec peer${p} ${OVPN_CLI} set_peer tun${p} ${p} 3 3 ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec peer"${p}" "${OVPN_CLI}" set_peer tun"${p}" "${p}" 3 3 In test.sh line 119: for p in $(seq 0 ${NUM_PEERS}); do ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: for p in $(seq 0 "${NUM_PEERS}"); do In test.sh line 120: compare_ntfs ${p} ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: compare_ntfs "${p}" For more information: https://www.shellcheck.net/wiki/SC2086 -- Double quote to prevent globbing ... https://www.shellcheck.net/wiki/SC2004 -- $/${} is unnecessary on arithmeti... ====== Checking the tree with the patch ====== Checking tools/testing/selftests/net/ovpn/common.sh - e3a67af2e113ee92dfb9cddd321874ac9c303e36744b0c6b1f1fc22173315989 In common.sh line 26: ip netns add peer${1} ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns add peer"${1}" In common.sh line 32: if [ ${1} -eq 0 ]; then ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: if [ "${1}" -eq 0 ]; then In common.sh line 34: for p in $(seq 1 ${NUM_PEERS}); do ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: for p in $(seq 1 "${NUM_PEERS}"); do In common.sh line 35: ip link add veth${p} netns peer0 type veth peer name veth${p} netns peer${p} ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip link add veth"${p}" netns peer0 type veth peer name veth"${p}" netns peer"${p}" In common.sh line 37: ip -n peer0 addr add 10.10.${p}.1/24 dev veth${p} ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -n peer0 addr add 10.10."${p}".1/24 dev veth"${p}" In common.sh line 38: ip -n peer0 addr add fd00:0:0:${p}::1/64 dev veth${p} ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -n peer0 addr add fd00:0:0:"${p}"::1/64 dev veth"${p}" In common.sh line 39: ip -n peer0 link set veth${p} up ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -n peer0 link set veth"${p}" up In common.sh line 41: ip -n peer${p} addr add 10.10.${p}.2/24 dev veth${p} ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -n peer"${p}" addr add 10.10."${p}".2/24 dev veth"${p}" In common.sh line 42: ip -n peer${p} addr add fd00:0:0:${p}::2/64 dev veth${p} ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -n peer"${p}" addr add fd00:0:0:"${p}"::2/64 dev veth"${p}" In common.sh line 43: ip -n peer${p} link set veth${p} up ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -n peer"${p}" link set veth"${p}" up In common.sh line 47: ip netns exec peer${1} ${OVPN_CLI} new_iface tun${1} $MODE ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec peer"${1}" "${OVPN_CLI}" new_iface tun"${1}" $MODE In common.sh line 48: ip -n peer${1} addr add ${2} dev tun${1} ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -n peer"${1}" addr add "${2}" dev tun"${1}" In common.sh line 50: if [ ${1} -eq 1 -a -n "${LAN_IP}" ]; then ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^-- SC2166 (warning): Prefer [ p ] && [ q ] as [ p -a q ] is not well defined. Did you mean: if [ "${1}" -eq 1 -a -n "${LAN_IP}" ]; then In common.sh line 51: ip -n peer${1} addr add ${LAN_IP} dev tun${1} ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -n peer"${1}" addr add ${LAN_IP} dev tun"${1}" In common.sh line 52: ip -n peer0 route add ${LAN_IP} via $(echo ${2} |sed -e s'!/.*!!') dev tun0 ^----------------------------^ SC2046 (warning): Quote this to prevent word splitting. ^-------------------------^ SC2001 (style): See if you can use ${variable//search/replace} instead. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -n peer0 route add ${LAN_IP} via $(echo "${2}" |sed -e s'!/.*!!') dev tun0 In common.sh line 55: ip -n peer${1} link set mtu ${3} dev tun${1} ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -n peer"${1}" link set mtu "${3}" dev tun"${1}" In common.sh line 57: ip -n peer${1} link set tun${1} up ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -n peer"${1}" link set tun"${1}" up In common.sh line 81: PYTHONUNBUFFERED=1 ip netns exec peer${p} ${YNL_CLI} --family ovpn \ ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: PYTHONUNBUFFERED=1 ip netns exec peer"${p}" "${YNL_CLI}" --family ovpn \ In common.sh line 82: --subscribe peers --output-json --duration 40 > ${file} & ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: --subscribe peers --output-json --duration 40 > "${file}" & In common.sh line 92: if [ ${1} -eq 0 ]; then ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: if [ "${1}" -eq 0 ]; then In common.sh line 93: ip netns exec peer0 ${OVPN_CLI} new_multi_peer tun0 1 \ ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec peer0 "${OVPN_CLI}" new_multi_peer tun0 1 \ In common.sh line 94: ${M_ID} ${UDP_PEERS_FILE} ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: "${M_ID}" "${UDP_PEERS_FILE}" In common.sh line 96: for p in $(seq 1 ${NUM_PEERS}); do ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: for p in $(seq 1 "${NUM_PEERS}"); do In common.sh line 97: ip netns exec peer0 ${OVPN_CLI} new_key tun0 ${p} 1 0 ${ALG} 0 \ ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec peer0 "${OVPN_CLI}" new_key tun0 "${p}" 1 0 "${ALG}" 0 \ In common.sh line 106: ${UDP_PEERS_FILE}) ^---------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: "${UDP_PEERS_FILE}") In common.sh line 109: RADDR=$(awk "NR == ${1} {print \$3}" ${UDP_PEERS_FILE}) ^---------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: RADDR=$(awk "NR == ${1} {print \$3}" "${UDP_PEERS_FILE}") In common.sh line 110: RPORT=$(awk "NR == ${1} {print \$4}" ${UDP_PEERS_FILE}) ^---------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: RPORT=$(awk "NR == ${1} {print \$4}" "${UDP_PEERS_FILE}") In common.sh line 111: LPORT=$(awk "NR == ${1} {print \$6}" ${UDP_PEERS_FILE}) ^---------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: LPORT=$(awk "NR == ${1} {print \$6}" "${UDP_PEERS_FILE}") In common.sh line 112: ip netns exec peer${1} ${OVPN_CLI} new_peer tun${1} \ ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec peer"${1}" "${OVPN_CLI}" new_peer tun"${1}" \ In common.sh line 113: ${PEER_ID} ${TX_ID} ${LPORT} ${RADDR} ${RPORT} ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: "${PEER_ID}" "${TX_ID}" "${LPORT}" "${RADDR}" "${RPORT}" In common.sh line 114: ip netns exec peer${1} ${OVPN_CLI} new_key tun${1} \ ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec peer"${1}" "${OVPN_CLI}" new_key tun"${1}" \ In common.sh line 115: ${PEER_ID} 1 0 ${ALG} 1 data64.key ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: "${PEER_ID}" 1 0 "${ALG}" 1 data64.key In common.sh line 118: if [ ${1} -eq 0 ]; then ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: if [ "${1}" -eq 0 ]; then In common.sh line 119: (ip netns exec peer0 ${OVPN_CLI} listen tun0 1 ${M_ID} \ ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: (ip netns exec peer0 "${OVPN_CLI}" listen tun0 1 "${M_ID}" \ In common.sh line 120: ${TCP_PEERS_FILE} && { ^---------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: "${TCP_PEERS_FILE}" && { In common.sh line 121: for p in $(seq 1 ${NUM_PEERS}); do ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: for p in $(seq 1 "${NUM_PEERS}"); do In common.sh line 122: ip netns exec peer0 ${OVPN_CLI} new_key tun0 ${p} 1 0 \ ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec peer0 "${OVPN_CLI}" new_key tun0 "${p}" 1 0 \ In common.sh line 123: ${ALG} 0 data64.key ^----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: "${ALG}" 0 data64.key In common.sh line 133: ${TCP_PEERS_FILE}) ^---------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: "${TCP_PEERS_FILE}") In common.sh line 136: ip netns exec peer${1} ${OVPN_CLI} connect tun${1} \ ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec peer"${1}" "${OVPN_CLI}" connect tun"${1}" \ In common.sh line 137: ${PEER_ID} ${TX_ID} 10.10.${1}.1 1 data64.key ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: "${PEER_ID}" "${TX_ID}" 10.10."${1}".1 1 data64.key In common.sh line 150: kill -TERM ${listener_pids[$1]} || true ^------------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: kill -TERM "${listener_pids[$1]}" || true In common.sh line 151: wait ${listener_pids[$1]} || true ^------------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: wait "${listener_pids[$1]}" || true In common.sh line 152: printf "Checking notifications for peer ${1}... " ^-- SC2059 (info): Don't use variables in the printf format string. Use printf '..%s..' "$foo". In common.sh line 153: if diff <(jq -s "${JQ_FILTER}" ${expected}) \ ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: if diff <(jq -s "${JQ_FILTER}" "${expected}") \ In common.sh line 154: <(jq -s "${JQ_FILTER}" ${received}); then ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: <(jq -s "${JQ_FILTER}" "${received}"); then In common.sh line 158: rm -f ${received} || true ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: rm -f "${received}" || true In common.sh line 164: killall $(basename ${OVPN_CLI}) 2>/dev/null || true ^---------------------^ SC2046 (warning): Quote this to prevent word splitting. ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: killall $(basename "${OVPN_CLI}") 2>/dev/null || true In common.sh line 168: ip -n peer${p} link set tun${p} down 2>/dev/null || true ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -n peer"${p}" link set tun"${p}" down 2>/dev/null || true In common.sh line 169: ip netns exec peer${p} ${OVPN_CLI} del_iface tun${p} 2>/dev/null || true ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec peer"${p}" "${OVPN_CLI}" del_iface tun"${p}" 2>/dev/null || true In common.sh line 172: ip -n peer0 link del veth${p} 2>/dev/null || true ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -n peer0 link del veth"${p}" 2>/dev/null || true In common.sh line 175: ip netns del peer${p} 2>/dev/null || true ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns del peer"${p}" 2>/dev/null || true In common.sh line 180: NUM_PEERS=${NUM_PEERS:-$(wc -l ${UDP_PEERS_FILE} | awk '{print $1}')} ^---------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: NUM_PEERS=${NUM_PEERS:-$(wc -l "${UDP_PEERS_FILE}" | awk '{print $1}')} In common.sh line 182: NUM_PEERS=${NUM_PEERS:-$(wc -l ${TCP_PEERS_FILE} | awk '{print $1}')} ^---------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: NUM_PEERS=${NUM_PEERS:-$(wc -l "${TCP_PEERS_FILE}" | awk '{print $1}')} For more information: https://www.shellcheck.net/wiki/SC2046 -- Quote this to prevent word splitt... https://www.shellcheck.net/wiki/SC2166 -- Prefer [ p ] && [ q ] as [ p -a q... https://www.shellcheck.net/wiki/SC2059 -- Don't use variables in the printf... Checking tools/testing/selftests/net/ovpn/test-close-socket.sh - b0c89d8b64dcdfc73f643e1c7a7f2d1a8f30e575be458c34fe58ba2d562e9b34 In test-close-socket.sh line 16: for p in $(seq 0 ${NUM_PEERS}); do ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: for p in $(seq 0 "${NUM_PEERS}"); do In test-close-socket.sh line 17: create_ns ${p} ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: create_ns "${p}" In test-close-socket.sh line 20: for p in $(seq 0 ${NUM_PEERS}); do ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: for p in $(seq 0 "${NUM_PEERS}"); do In test-close-socket.sh line 21: setup_ns ${p} 5.5.5.$((${p} + 1))/24 ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2004 (style): $/${} is unnecessary on arithmetic variables. Did you mean: setup_ns "${p}" 5.5.5.$((${p} + 1))/24 In test-close-socket.sh line 24: for p in $(seq 0 ${NUM_PEERS}); do ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: for p in $(seq 0 "${NUM_PEERS}"); do In test-close-socket.sh line 25: add_peer ${p} ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: add_peer "${p}" In test-close-socket.sh line 28: for p in $(seq 1 ${NUM_PEERS}); do ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: for p in $(seq 1 "${NUM_PEERS}"); do In test-close-socket.sh line 29: ip netns exec peer0 ${OVPN_CLI} set_peer tun0 ${p} 60 120 ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec peer0 "${OVPN_CLI}" set_peer tun0 "${p}" 60 120 In test-close-socket.sh line 30: ip netns exec peer${p} ${OVPN_CLI} set_peer tun${p} $((${p}+9)) 60 120 ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2004 (style): $/${} is unnecessary on arithmetic variables. Did you mean: ip netns exec peer"${p}" "${OVPN_CLI}" set_peer tun"${p}" $((${p}+9)) 60 120 In test-close-socket.sh line 35: for p in $(seq 1 ${NUM_PEERS}); do ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: for p in $(seq 1 "${NUM_PEERS}"); do In test-close-socket.sh line 36: ip netns exec peer0 ping -qfc 500 -w 3 5.5.5.$((${p} + 1)) ^--^ SC2004 (style): $/${} is unnecessary on arithmetic variables. For more information: https://www.shellcheck.net/wiki/SC2086 -- Double quote to prevent globbing ... https://www.shellcheck.net/wiki/SC2004 -- $/${} is unnecessary on arithmeti... Checking tools/testing/selftests/net/ovpn/test-symmetric-id-float.sh - 1ceef86f02471c1600f72dc78f4e06fc8f3708e771d1dcc179b64a5a293ca0a2 Checking tools/testing/selftests/net/ovpn/test-symmetric-id-tcp.sh - d5b4e39ef0b8b93d1421f44a07e96534ef5b3e62e771c9954c66b20d42860751 Checking tools/testing/selftests/net/ovpn/test-symmetric-id.sh - 9b9b27d9d6b381fc8d28d22e9c4a198c673fcac52c315668e76f174bb4ea444d Checking tools/testing/selftests/net/ovpn/test.sh - 8aea422bc8ffa29c1c10a341b4847c0fdf51abd61d5b98b552a435ac5f532301 In test.sh line 16: for p in $(seq 0 ${NUM_PEERS}); do ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: for p in $(seq 0 "${NUM_PEERS}"); do In test.sh line 17: create_ns ${p} ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: create_ns "${p}" In test.sh line 20: for p in $(seq 0 ${NUM_PEERS}); do ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: for p in $(seq 0 "${NUM_PEERS}"); do In test.sh line 21: setup_listener ${p} ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: setup_listener "${p}" In test.sh line 24: for p in $(seq 0 ${NUM_PEERS}); do ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: for p in $(seq 0 "${NUM_PEERS}"); do In test.sh line 25: setup_ns ${p} 5.5.5.$((${p} + 1))/24 ${MTU} ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2004 (style): $/${} is unnecessary on arithmetic variables. ^----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: setup_ns "${p}" 5.5.5.$((${p} + 1))/24 "${MTU}" In test.sh line 28: for p in $(seq 0 ${NUM_PEERS}); do ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: for p in $(seq 0 "${NUM_PEERS}"); do In test.sh line 29: add_peer ${p} ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: add_peer "${p}" In test.sh line 32: for p in $(seq 1 ${NUM_PEERS}); do ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: for p in $(seq 1 "${NUM_PEERS}"); do In test.sh line 33: ip netns exec peer0 ${OVPN_CLI} set_peer tun0 ${p} 60 120 ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec peer0 "${OVPN_CLI}" set_peer tun0 "${p}" 60 120 In test.sh line 34: ip netns exec peer${p} ${OVPN_CLI} set_peer tun${p} \ ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec peer"${p}" "${OVPN_CLI}" set_peer tun"${p}" \ In test.sh line 35: $((${p}+ID_OFFSET)) 60 120 ^--^ SC2004 (style): $/${} is unnecessary on arithmetic variables. In test.sh line 41: for p in $(seq 1 ${NUM_PEERS}); do ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: for p in $(seq 1 "${NUM_PEERS}"); do In test.sh line 49: HEADER1=$(printf "0x4800000%x" ${p}) ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: HEADER1=$(printf "0x4800000%x" "${p}") In test.sh line 50: HEADER2=$(printf "0x4800000%x" $((${p} + ID_OFFSET))) ^--^ SC2004 (style): $/${} is unnecessary on arithmetic variables. In test.sh line 53: RADDR=$(awk "NR == ${p} {print \$3}" ${UDP_PEERS_FILE}) ^---------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: RADDR=$(awk "NR == ${p} {print \$3}" "${UDP_PEERS_FILE}") In test.sh line 56: timeout ${TCPDUMP_TIMEOUT} ip netns exec peer${p} \ ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: timeout ${TCPDUMP_TIMEOUT} ip netns exec peer"${p}" \ In test.sh line 57: tcpdump --immediate-mode -p -ni veth${p} -c 1 \ ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: tcpdump --immediate-mode -p -ni veth"${p}" -c 1 \ In test.sh line 61: timeout ${TCPDUMP_TIMEOUT} ip netns exec peer${p} \ ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: timeout ${TCPDUMP_TIMEOUT} ip netns exec peer"${p}" \ In test.sh line 62: tcpdump --immediate-mode -p -ni veth${p} -c 1 \ ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: tcpdump --immediate-mode -p -ni veth"${p}" -c 1 \ In test.sh line 68: ip netns exec peer0 ping -qfc 500 -w 3 5.5.5.$((${p} + 1)) ^--^ SC2004 (style): $/${} is unnecessary on arithmetic variables. In test.sh line 69: ip netns exec peer0 ping -qfc 500 -s 3000 -w 3 5.5.5.$((${p} + 1)) ^--^ SC2004 (style): $/${} is unnecessary on arithmetic variables. In test.sh line 80: for p in $(seq 1 ${NUM_PEERS}); do ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: for p in $(seq 1 "${NUM_PEERS}"); do In test.sh line 81: ip -n peer${p} addr del 10.10.${p}.2/24 dev veth${p} ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -n peer"${p}" addr del 10.10."${p}".2/24 dev veth"${p}" In test.sh line 82: ip -n peer${p} addr add 10.10.${p}.3/24 dev veth${p} ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -n peer"${p}" addr add 10.10."${p}".3/24 dev veth"${p}" In test.sh line 84: for p in $(seq 1 ${NUM_PEERS}); do ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: for p in $(seq 1 "${NUM_PEERS}"); do In test.sh line 85: ip netns exec peer${p} ping -qfc 500 -w 3 5.5.5.1 ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec peer"${p}" ping -qfc 500 -w 3 5.5.5.1 In test.sh line 94: for p in $(seq 1 ${NUM_PEERS}); do ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: for p in $(seq 1 "${NUM_PEERS}"); do In test.sh line 95: ip netns exec peer0 ${OVPN_CLI} new_key tun0 ${p} 2 1 ${ALG} 0 \ ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec peer0 "${OVPN_CLI}" new_key tun0 "${p}" 2 1 "${ALG}" 0 \ In test.sh line 97: ip netns exec peer${p} ${OVPN_CLI} new_key tun${p} \ ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec peer"${p}" "${OVPN_CLI}" new_key tun"${p}" \ In test.sh line 98: $((${p} + ID_OFFSET)) 2 1 ${ALG} 1 data64.key ^--^ SC2004 (style): $/${} is unnecessary on arithmetic variables. ^----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: $((${p} + ID_OFFSET)) 2 1 "${ALG}" 1 data64.key In test.sh line 99: ip netns exec peer${p} ${OVPN_CLI} swap_keys tun${p} \ ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec peer"${p}" "${OVPN_CLI}" swap_keys tun"${p}" \ In test.sh line 100: $((${p} + ID_OFFSET)) ^--^ SC2004 (style): $/${} is unnecessary on arithmetic variables. In test.sh line 106: ip netns exec peer0 ${OVPN_CLI} get_peer tun0 ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec peer0 "${OVPN_CLI}" get_peer tun0 In test.sh line 107: ip netns exec peer1 ${OVPN_CLI} get_peer tun1 ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec peer1 "${OVPN_CLI}" get_peer tun1 In test.sh line 110: ip netns exec peer0 ${OVPN_CLI} get_peer tun0 1 ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec peer0 "${OVPN_CLI}" get_peer tun0 1 In test.sh line 113: ip netns exec peer0 ${OVPN_CLI} get_peer tun0 20 || true ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec peer0 "${OVPN_CLI}" get_peer tun0 20 || true In test.sh line 116: ip netns exec peer0 ${OVPN_CLI} del_peer tun0 1 ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec peer0 "${OVPN_CLI}" del_peer tun0 1 In test.sh line 117: ip netns exec peer1 ${OVPN_CLI} del_peer tun1 $((1 + ID_OFFSET)) ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec peer1 "${OVPN_CLI}" del_peer tun1 $((1 + ID_OFFSET)) In test.sh line 120: for p in $(seq 2 ${NUM_PEERS}); do ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: for p in $(seq 2 "${NUM_PEERS}"); do In test.sh line 121: ip netns exec peer${p} ${OVPN_CLI} get_key tun${p} \ ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec peer"${p}" "${OVPN_CLI}" get_key tun"${p}" \ In test.sh line 122: $((${p} + ID_OFFSET)) 1 ^--^ SC2004 (style): $/${} is unnecessary on arithmetic variables. In test.sh line 123: ip netns exec peer${p} ${OVPN_CLI} get_key tun${p} \ ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec peer"${p}" "${OVPN_CLI}" get_key tun"${p}" \ In test.sh line 124: $((${p} + ID_OFFSET)) 2 ^--^ SC2004 (style): $/${} is unnecessary on arithmetic variables. In test.sh line 130: ip netns exec peer0 ${OVPN_CLI} del_peer tun0 2 ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec peer0 "${OVPN_CLI}" del_peer tun0 2 In test.sh line 133: ip netns exec peer2 ${OVPN_CLI} del_peer tun2 $((2 + ID_OFFSET)) || true ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec peer2 "${OVPN_CLI}" del_peer tun2 $((2 + ID_OFFSET)) || true In test.sh line 136: for p in $(seq 3 ${NUM_PEERS}); do ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: for p in $(seq 3 "${NUM_PEERS}"); do In test.sh line 137: ip netns exec peer${p} ${OVPN_CLI} del_key tun${p} \ ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec peer"${p}" "${OVPN_CLI}" del_key tun"${p}" \ In test.sh line 138: $((${p} + ID_OFFSET)) 1 ^--^ SC2004 (style): $/${} is unnecessary on arithmetic variables. In test.sh line 139: ip netns exec peer${p} ${OVPN_CLI} del_key tun${p} \ ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec peer"${p}" "${OVPN_CLI}" del_key tun"${p}" \ In test.sh line 140: $((${p} + ID_OFFSET)) 2 ^--^ SC2004 (style): $/${} is unnecessary on arithmetic variables. In test.sh line 144: for p in $(seq 3 ${NUM_PEERS}); do ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: for p in $(seq 3 "${NUM_PEERS}"); do In test.sh line 145: ip netns exec peer0 ${OVPN_CLI} set_peer tun0 ${p} 3 3 || true ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec peer0 "${OVPN_CLI}" set_peer tun0 "${p}" 3 3 || true In test.sh line 146: ip netns exec peer${p} ${OVPN_CLI} set_peer tun${p} \ ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec peer"${p}" "${OVPN_CLI}" set_peer tun"${p}" \ In test.sh line 147: $((${p} + ID_OFFSET)) 0 0 ^--^ SC2004 (style): $/${} is unnecessary on arithmetic variables. In test.sh line 153: for p in $(seq 3 ${NUM_PEERS}); do ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: for p in $(seq 3 "${NUM_PEERS}"); do In test.sh line 154: ip netns exec peer${p} ${OVPN_CLI} set_peer tun${p} \ ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec peer"${p}" "${OVPN_CLI}" set_peer tun"${p}" \ In test.sh line 155: $((${p} + ID_OFFSET)) 3 3 ^--^ SC2004 (style): $/${} is unnecessary on arithmetic variables. In test.sh line 159: for p in $(seq 0 ${NUM_PEERS}); do ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: for p in $(seq 0 "${NUM_PEERS}"); do In test.sh line 160: compare_ntfs ${p} ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: compare_ntfs "${p}" For more information: https://www.shellcheck.net/wiki/SC2086 -- Double quote to prevent globbing ... https://www.shellcheck.net/wiki/SC2004 -- $/${} is unnecessary on arithmeti... tools/testing/selftests/net/ovpn/test-symmetric-id-float.sh is shellcheck compliant tools/testing/selftests/net/ovpn/test-symmetric-id.sh is shellcheck compliant tools/testing/selftests/net/ovpn/test-symmetric-id-tcp.sh is shellcheck compliant