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.nvgElHi2OK and /tmp/tmp.ZaGjuQvhk5 Tree base: 4fcbbb454b0a ("ovpn: add support for asymmetric peer IDs") Now at: 334b1613fa1e ("selftests: ovpn: check asymmetric peer-id") ====== Checking before the patch ====== Checking tools/testing/selftests/net/ovpn/common.sh - e3a67af2e113ee92dfb9cddd321874ac9c303e36744b0c6b1f1fc22173315989 In common.sh line 22: 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 28: 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 30: 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 31: 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 33: 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 34: 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 35: 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 37: 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 38: 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 39: 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 43: 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 44: 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 46: 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 47: 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 48: 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 51: 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 53: 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 62: 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 63: --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 70: 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 71: 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 73: 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 74: 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 78: 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 79: 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 80: 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 81: 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 82: ${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 83: 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 87: 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 88: (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 89: 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 90: 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 91: ${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 96: 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 108: 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 109: 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 110: 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 111: diff <(jq -s "${JQ_FILTER}" ${expexted}) \ ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: diff <(jq -s "${JQ_FILTER}" "${expexted}") \ In common.sh line 112: <(jq -s "${JQ_FILTER}" ${received}) ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: <(jq -s "${JQ_FILTER}" "${received}") In common.sh line 115: 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 121: 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 125: 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 126: 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 129: 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 132: 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 137: 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 139: 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 21: 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 22: setup_listener ${p} ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: setup_listener "${p}" In test.sh line 26: 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 27: 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 30: 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 31: add_peer ${p} ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: add_peer "${p}" In test.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 test.sh line 35: 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 36: 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 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 42: 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 43: 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 51: 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 52: 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 53: 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 55: 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 56: 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 65: 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 66: 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 67: 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 68: 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 74: 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 75: 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 78: 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 81: 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 84: 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 85: 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 88: 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 89: 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 90: 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 96: 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 99: 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 102: 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 103: 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 104: 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 108: 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 109: 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 110: 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 116: 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 117: 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 121: 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 122: 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 22: 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 28: 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 30: 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 31: 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 33: 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 34: 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 35: 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 37: 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 38: 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 39: 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 43: 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 44: 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 46: 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 47: 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 48: 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 51: 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 53: 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 62: 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 63: --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 70: 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 71: 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 73: 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 74: 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 78: TX_ID=$(awk "NR == ${1} {print \$2}" ${UDP_PEERS_FILE}) ^---------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: TX_ID=$(awk "NR == ${1} {print \$2}" "${UDP_PEERS_FILE}") In common.sh line 79: 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 80: 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 81: 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 82: ip netns exec peer${1} ${OVPN_CLI} new_peer tun${1} ${TX_ID} ${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_peer tun"${1}" "${TX_ID}" "${1}" \ In common.sh line 83: ${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. Did you mean: "${LPORT}" "${RADDR}" "${RPORT}" In common.sh line 84: ip netns exec peer${1} ${OVPN_CLI} new_key tun${1} ${TX_ID} 1 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"${1}" "${OVPN_CLI}" new_key tun"${1}" "${TX_ID}" 1 0 \ In common.sh line 85: ${ALG} 1 data64.key ^----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: "${ALG}" 1 data64.key In common.sh line 88: 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 89: (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 90: 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 91: 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 92: ${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 97: TX_ID=$(awk "NR == ${1} {print \$2}" ${TCP_PEERS_FILE}) ^---------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: TX_ID=$(awk "NR == ${1} {print \$2}" "${TCP_PEERS_FILE}") In common.sh line 98: ip netns exec peer${1} ${OVPN_CLI} connect tun${1} ${TX_ID} ${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}" "${TX_ID}" "${1}" \ In common.sh line 99: 10.10.${1}.1 1 data64.key ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: 10.10."${1}".1 1 data64.key In common.sh line 110: 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 111: 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 112: 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 113: diff <(jq -s "${JQ_FILTER}" ${expexted}) \ ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: diff <(jq -s "${JQ_FILTER}" "${expexted}") \ In common.sh line 114: <(jq -s "${JQ_FILTER}" ${received}) ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: <(jq -s "${JQ_FILTER}" "${received}") In common.sh line 117: 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 123: 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 127: 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 128: 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 131: 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 134: 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 139: 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 141: 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.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 21: 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 22: setup_listener ${p} ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: setup_listener "${p}" In test.sh line 26: 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 27: 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 30: 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 31: add_peer ${p} ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: add_peer "${p}" In test.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 test.sh line 35: 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 36: 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.sh line 42: 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 48: 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 49: HEADER2=$(printf "0x4800000%x" $((${p} + 9))) ^--^ SC2004 (style): $/${} is unnecessary on arithmetic variables. In test.sh line 52: timeout ${NGREP_TIMEOUT} ip netns exec peer${p} ngrep -xqn 1 -X "${HEADER1}" \ ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: timeout ${NGREP_TIMEOUT} ip netns exec peer"${p}" ngrep -xqn 1 -X "${HEADER1}" \ In test.sh line 53: -S ${CAPTURE_LEN} -d veth${p} 1>/dev/null & ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: -S ${CAPTURE_LEN} -d veth"${p}" 1>/dev/null & In test.sh line 55: timeout ${NGREP_TIMEOUT} ip netns exec peer${p} ngrep -xqn 1 -X "${HEADER2}" \ ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: timeout ${NGREP_TIMEOUT} ip netns exec peer"${p}" ngrep -xqn 1 -X "${HEADER2}" \ In test.sh line 56: -S ${CAPTURE_LEN} -d veth${p} 1>/dev/null & ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: -S ${CAPTURE_LEN} -d veth"${p}" 1>/dev/null & In test.sh line 60: 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 61: 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 72: 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 73: 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 74: 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 76: 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 77: 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 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 test.sh line 87: 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 88: ip netns exec peer${p} ${OVPN_CLI} new_key tun${p} $((${p} + 9)) 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. ^--^ SC2004 (style): $/${} is unnecessary on arithmetic variables. ^----^ 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} + 9)) 2 1 "${ALG}" 1 data64.key In test.sh line 89: ip netns exec peer${p} ${OVPN_CLI} swap_keys tun${p} $((${p} + 9)) ^--^ 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}" swap_keys tun"${p}" $((${p} + 9)) In test.sh line 95: 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 96: 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 99: 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 102: 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 105: 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 106: ip netns exec peer1 ${OVPN_CLI} del_peer tun1 10 ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec peer1 "${OVPN_CLI}" del_peer tun1 10 In test.sh line 109: 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 110: ip netns exec peer${p} ${OVPN_CLI} get_key tun${p} $((${p} + 9)) 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. ^--^ SC2004 (style): $/${} is unnecessary on arithmetic variables. Did you mean: ip netns exec peer"${p}" "${OVPN_CLI}" get_key tun"${p}" $((${p} + 9)) 1 In test.sh line 111: ip netns exec peer${p} ${OVPN_CLI} get_key tun${p} $((${p} + 9)) 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. ^--^ SC2004 (style): $/${} is unnecessary on arithmetic variables. Did you mean: ip netns exec peer"${p}" "${OVPN_CLI}" get_key tun"${p}" $((${p} + 9)) 2 In test.sh line 117: 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 120: ip netns exec peer2 ${OVPN_CLI} del_peer tun2 11 || true ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec peer2 "${OVPN_CLI}" del_peer tun2 11 || true In test.sh line 123: 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 124: ip netns exec peer${p} ${OVPN_CLI} del_key tun${p} $((${p} + 9)) 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. ^--^ SC2004 (style): $/${} is unnecessary on arithmetic variables. Did you mean: ip netns exec peer"${p}" "${OVPN_CLI}" del_key tun"${p}" $((${p} + 9)) 1 In test.sh line 125: ip netns exec peer${p} ${OVPN_CLI} del_key tun${p} $((${p} + 9)) 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. ^--^ SC2004 (style): $/${} is unnecessary on arithmetic variables. Did you mean: ip netns exec peer"${p}" "${OVPN_CLI}" del_key tun"${p}" $((${p} + 9)) 2 In test.sh line 129: 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 130: 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 131: ip netns exec peer${p} ${OVPN_CLI} set_peer tun${p} $((${p} + 9)) 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. ^--^ SC2004 (style): $/${} is unnecessary on arithmetic variables. Did you mean: ip netns exec peer"${p}" "${OVPN_CLI}" set_peer tun"${p}" $((${p} + 9)) 0 0 In test.sh line 137: 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 138: ip netns exec peer${p} ${OVPN_CLI} set_peer tun${p} $((${p} + 9)) 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. ^--^ SC2004 (style): $/${} is unnecessary on arithmetic variables. Did you mean: ip netns exec peer"${p}" "${OVPN_CLI}" set_peer tun"${p}" $((${p} + 9)) 3 3 In test.sh line 142: 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 143: 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...