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.p4FSej0vS0 and /tmp/tmp.GgifolWpIy Tree base: 2c3abde2fb34 ("selftests: ovpn: add prefix to helpers and shared variables") Now at: dc095353879a ("selftests: ovpn: align command flow with TAP") ====== Checking before the patch ====== Checking tools/testing/selftests/net/ovpn/common.sh - e3a67af2e113ee92dfb9cddd321874ac9c303e36744b0c6b1f1fc22173315989 In common.sh line 36: 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 38: for p in $(seq 1 ${OVPN_NUM_PEERS}); do ^---------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: for p in $(seq 1 "${OVPN_NUM_PEERS}"); do In common.sh line 40: ip link add veth${p} netns "${server_ns}" type veth \ ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip link add veth"${p}" netns "${server_ns}" type veth \ In common.sh line 41: peer name veth${p} netns "${peer_ns}" ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: peer name veth"${p}" netns "${peer_ns}" In common.sh line 43: ip -n "${server_ns}" addr add 10.10.${p}.1/24 dev \ ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -n "${server_ns}" addr add 10.10."${p}".1/24 dev \ In common.sh line 44: veth${p} ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: veth"${p}" In common.sh line 45: ip -n "${server_ns}" addr add fd00:0:0:${p}::1/64 dev \ ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -n "${server_ns}" addr add fd00:0:0:"${p}"::1/64 dev \ In common.sh line 46: veth${p} ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: veth"${p}" In common.sh line 47: ip -n "${server_ns}" link set veth${p} up ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -n "${server_ns}" link set veth"${p}" up In common.sh line 49: ip -n "${peer_ns}" 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. Did you mean: ip -n "${peer_ns}" addr add 10.10."${p}".2/24 dev veth"${p}" In common.sh line 50: ip -n "${peer_ns}" addr add fd00:0:0:${p}::2/64 dev \ ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -n "${peer_ns}" addr add fd00:0:0:"${p}"::2/64 dev \ In common.sh line 51: veth${p} ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: veth"${p}" In common.sh line 52: ip -n "${peer_ns}" link set veth${p} up ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -n "${peer_ns}" link set veth"${p}" up In common.sh line 56: ip netns exec "${peer}" ${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. Did you mean: ip netns exec "${peer}" "${OVPN_CLI}" new_iface tun"${1}" $MODE In common.sh line 57: ip -n "${peer}" 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. Did you mean: ip -n "${peer}" addr add "${2}" dev tun"${1}" In common.sh line 59: if [ ${1} -eq 1 -a -n "${OVPN_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 "${OVPN_LAN_IP}" ]; then In common.sh line 60: ip -n "${peer}" addr add ${OVPN_LAN_IP} dev tun${1} ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -n "${peer}" addr add ${OVPN_LAN_IP} dev tun"${1}" In common.sh line 62: $(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: $(echo "${2}" |sed -e s'!/.*!!') dev tun0 In common.sh line 65: ip -n "${peer}" 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. Did you mean: ip -n "${peer}" link set mtu "${3}" dev tun"${1}" In common.sh line 67: ip -n "${peer}" link set tun${1} up ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -n "${peer}" link set tun"${1}" up In common.sh line 93: ovpn --subscribe peers --output-json --duration 40 > ${file} & ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ovpn --subscribe peers --output-json --duration 40 > "${file}" & In common.sh line 105: 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 106: ip netns exec "${server_ns}" ${OVPN_CLI} \ ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "${server_ns}" "${OVPN_CLI}" \ In common.sh line 107: new_multi_peer tun0 1 ${M_ID} \ ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: new_multi_peer tun0 1 "${M_ID}" \ In common.sh line 108: ${OVPN_UDP_PEERS_FILE} ^--------------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: "${OVPN_UDP_PEERS_FILE}" In common.sh line 110: for p in $(seq 1 ${OVPN_NUM_PEERS}); do ^---------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: for p in $(seq 1 "${OVPN_NUM_PEERS}"); do In common.sh line 111: ip netns exec "${server_ns}" ${OVPN_CLI} \ ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "${server_ns}" "${OVPN_CLI}" \ In common.sh line 112: new_key tun0 ${p} 1 0 ${OVPN_ALG} 0 \ ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: new_key tun0 "${p}" 1 0 "${OVPN_ALG}" 0 \ In common.sh line 122: ${OVPN_UDP_PEERS_FILE}) ^--------------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: "${OVPN_UDP_PEERS_FILE}") In common.sh line 126: ${OVPN_UDP_PEERS_FILE}) ^--------------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: "${OVPN_UDP_PEERS_FILE}") In common.sh line 128: ${OVPN_UDP_PEERS_FILE}) ^--------------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: "${OVPN_UDP_PEERS_FILE}") In common.sh line 130: ${OVPN_UDP_PEERS_FILE}) ^--------------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: "${OVPN_UDP_PEERS_FILE}") In common.sh line 131: ip netns exec "${peer_ns}" ${OVPN_CLI} new_peer \ ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "${peer_ns}" "${OVPN_CLI}" new_peer \ In common.sh line 132: tun${1} ${PEER_ID} ${TX_ID} ${LPORT} ${RADDR} \ ^--^ 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: tun"${1}" "${PEER_ID}" "${TX_ID}" "${LPORT}" "${RADDR}" \ In common.sh line 133: ${RPORT} ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: "${RPORT}" In common.sh line 134: ip netns exec "${peer_ns}" ${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. Did you mean: ip netns exec "${peer_ns}" "${OVPN_CLI}" new_key tun"${1}" \ In common.sh line 135: ${PEER_ID} 1 0 ${OVPN_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 "${OVPN_ALG}" 1 data64.key In common.sh line 138: 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 139: (ip netns exec "${server_ns}" ${OVPN_CLI} listen tun0 \ ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: (ip netns exec "${server_ns}" "${OVPN_CLI}" listen tun0 \ In common.sh line 140: 1 ${M_ID} ${OVPN_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: 1 "${M_ID}" "${OVPN_TCP_PEERS_FILE}" && { In common.sh line 141: for p in $(seq 1 ${OVPN_NUM_PEERS}); do ^---------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: for p in $(seq 1 "${OVPN_NUM_PEERS}"); do In common.sh line 143: ${OVPN_CLI} new_key tun0 ${p} \ ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: "${OVPN_CLI}" new_key tun0 "${p}" \ In common.sh line 144: 1 0 ${OVPN_ALG} 0 data64.key ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: 1 0 "${OVPN_ALG}" 0 data64.key In common.sh line 155: ${OVPN_TCP_PEERS_FILE}) ^--------------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: "${OVPN_TCP_PEERS_FILE}") In common.sh line 158: ip netns exec "${peer_ns}" ${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. Did you mean: ip netns exec "${peer_ns}" "${OVPN_CLI}" connect tun"${1}" \ In common.sh line 159: ${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 176: kill -TERM ${OVPN_LISTENER_PIDS[$1]} || true ^-----------------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: kill -TERM "${OVPN_LISTENER_PIDS[$1]}" || true In common.sh line 177: wait ${OVPN_LISTENER_PIDS[$1]} || true ^-----------------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: wait "${OVPN_LISTENER_PIDS[$1]}" || true In common.sh line 178: 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 179: if diff <(jq -s "${OVPN_JQ_FILTER}" ${expected}) \ ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: if diff <(jq -s "${OVPN_JQ_FILTER}" "${expected}") \ In common.sh line 180: <(jq -s "${OVPN_JQ_FILTER}" ${received}) \ ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: <(jq -s "${OVPN_JQ_FILTER}" "${received}") \ In common.sh line 190: 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 199: 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 204: ip -n "${peer_ns}" link set tun${p} down 2>/dev/null || true ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -n "${peer_ns}" link set tun"${p}" down 2>/dev/null || true In common.sh line 205: ip netns exec "${peer_ns}" ${OVPN_CLI} del_iface tun${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 netns exec "${peer_ns}" "${OVPN_CLI}" del_iface tun"${p}" \ In common.sh line 209: ip -n ovpn_peer0 link del veth${p} 2>/dev/null || true ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -n ovpn_peer0 link del veth"${p}" 2>/dev/null || true In common.sh line 217: OVPN_NUM_PEERS=${OVPN_NUM_PEERS:-$(wc -l ${OVPN_UDP_PEERS_FILE} | \ ^--------------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: OVPN_NUM_PEERS=${OVPN_NUM_PEERS:-$(wc -l "${OVPN_UDP_PEERS_FILE}" | \ In common.sh line 220: OVPN_NUM_PEERS=${OVPN_NUM_PEERS:-$(wc -l ${OVPN_TCP_PEERS_FILE} | \ ^--------------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: OVPN_NUM_PEERS=${OVPN_NUM_PEERS:-$(wc -l "${OVPN_TCP_PEERS_FILE}" | \ 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 17: for p in $(seq 0 ${OVPN_NUM_PEERS}); do ^---------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: for p in $(seq 0 "${OVPN_NUM_PEERS}"); do In test-close-socket.sh line 18: ovpn_create_ns ${p} ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ovpn_create_ns "${p}" In test-close-socket.sh line 21: for p in $(seq 0 ${OVPN_NUM_PEERS}); do ^---------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: for p in $(seq 0 "${OVPN_NUM_PEERS}"); do In test-close-socket.sh line 22: ovpn_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: ovpn_setup_ns "${p}" 5.5.5.$((${p} + 1))/24 In test-close-socket.sh line 25: for p in $(seq 0 ${OVPN_NUM_PEERS}); do ^---------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: for p in $(seq 0 "${OVPN_NUM_PEERS}"); do In test-close-socket.sh line 26: ovpn_add_peer ${p} ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ovpn_add_peer "${p}" In test-close-socket.sh line 29: for p in $(seq 1 ${OVPN_NUM_PEERS}); do ^---------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: for p in $(seq 1 "${OVPN_NUM_PEERS}"); do In test-close-socket.sh line 30: ip netns exec "${server_ns}" ${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 "${server_ns}" "${OVPN_CLI}" set_peer tun0 "${p}" 60 120 In test-close-socket.sh line 31: ip netns exec "ovpn_peer${p}" ${OVPN_CLI} set_peer tun${p} $((${p}+9)) \ ^---------^ 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 "ovpn_peer${p}" "${OVPN_CLI}" set_peer tun"${p}" $((${p}+9)) \ In test-close-socket.sh line 37: for p in $(seq 1 ${OVPN_NUM_PEERS}); do ^---------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: for p in $(seq 1 "${OVPN_NUM_PEERS}"); do In test-close-socket.sh line 38: ip netns exec "${server_ns}" 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-mark.sh - 62413f616b2d8c2c30c9460fb0e3f9143841b79f6c88f785583b2a23156390a9 Checking tools/testing/selftests/net/ovpn/test.sh - 8aea422bc8ffa29c1c10a341b4847c0fdf51abd61d5b98b552a435ac5f532301 In test.sh line 17: for p in $(seq 0 ${OVPN_NUM_PEERS}); do ^---------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: for p in $(seq 0 "${OVPN_NUM_PEERS}"); do In test.sh line 18: ovpn_create_ns ${p} ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ovpn_create_ns "${p}" In test.sh line 21: for p in $(seq 0 ${OVPN_NUM_PEERS}); do ^---------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: for p in $(seq 0 "${OVPN_NUM_PEERS}"); do In test.sh line 22: ovpn_setup_listener ${p} ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ovpn_setup_listener "${p}" In test.sh line 25: for p in $(seq 0 ${OVPN_NUM_PEERS}); do ^---------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: for p in $(seq 0 "${OVPN_NUM_PEERS}"); do In test.sh line 26: ovpn_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: ovpn_setup_ns "${p}" 5.5.5.$((${p} + 1))/24 "${MTU}" In test.sh line 29: for p in $(seq 0 ${OVPN_NUM_PEERS}); do ^---------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: for p in $(seq 0 "${OVPN_NUM_PEERS}"); do In test.sh line 30: ovpn_add_peer ${p} ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ovpn_add_peer "${p}" In test.sh line 33: for p in $(seq 1 ${OVPN_NUM_PEERS}); do ^---------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: for p in $(seq 1 "${OVPN_NUM_PEERS}"); do In test.sh line 34: ip netns exec "${server_ns}" ${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 "${server_ns}" "${OVPN_CLI}" set_peer tun0 "${p}" 60 120 In test.sh line 35: ip netns exec "ovpn_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. Did you mean: ip netns exec "ovpn_peer${p}" "${OVPN_CLI}" set_peer tun"${p}" \ In test.sh line 36: $((${p}+OVPN_ID_OFFSET)) 60 120 ^--^ SC2004 (style): $/${} is unnecessary on arithmetic variables. In test.sh line 42: for p in $(seq 1 ${OVPN_NUM_PEERS}); do ^---------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: for p in $(seq 1 "${OVPN_NUM_PEERS}"); do In test.sh line 50: 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 51: HEADER2=$(printf "0x4800000%x" $((${p} + OVPN_ID_OFFSET))) ^--^ SC2004 (style): $/${} is unnecessary on arithmetic variables. In test.sh line 54: RADDR=$(awk "NR == ${p} {print \$3}" ${OVPN_UDP_PEERS_FILE}) ^--------------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: RADDR=$(awk "NR == ${p} {print \$3}" "${OVPN_UDP_PEERS_FILE}") In test.sh line 58: 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 63: 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 69: ip netns exec "${server_ns}" ping -qfc 500 -w 3 5.5.5.$((${p} + 1)) ^--^ SC2004 (style): $/${} is unnecessary on arithmetic variables. In test.sh line 71: 5.5.5.$((${p} + 1)) ^--^ SC2004 (style): $/${} is unnecessary on arithmetic variables. In test.sh line 82: for p in $(seq 1 ${OVPN_NUM_PEERS}); do ^---------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: for p in $(seq 1 "${OVPN_NUM_PEERS}"); do In test.sh line 83: ip -n "ovpn_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. Did you mean: ip -n "ovpn_peer${p}" addr del 10.10."${p}".2/24 dev veth"${p}" In test.sh line 84: ip -n "ovpn_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. Did you mean: ip -n "ovpn_peer${p}" addr add 10.10."${p}".3/24 dev veth"${p}" In test.sh line 86: for p in $(seq 1 ${OVPN_NUM_PEERS}); do ^---------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: for p in $(seq 1 "${OVPN_NUM_PEERS}"); do In test.sh line 96: for p in $(seq 1 ${OVPN_NUM_PEERS}); do ^---------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: for p in $(seq 1 "${OVPN_NUM_PEERS}"); do In test.sh line 97: ip netns exec "${server_ns}" ${OVPN_CLI} new_key tun0 ${p} 2 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 netns exec "${server_ns}" "${OVPN_CLI}" new_key tun0 "${p}" 2 1 \ In test.sh line 98: ${OVPN_ALG} 0 data64.key ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: "${OVPN_ALG}" 0 data64.key In test.sh line 99: ip netns exec "ovpn_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. Did you mean: ip netns exec "ovpn_peer${p}" "${OVPN_CLI}" new_key tun"${p}" \ In test.sh line 100: $((${p} + OVPN_ID_OFFSET)) 2 1 ${OVPN_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} + OVPN_ID_OFFSET)) 2 1 "${OVPN_ALG}" 1 data64.key In test.sh line 101: ip netns exec "ovpn_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. Did you mean: ip netns exec "ovpn_peer${p}" "${OVPN_CLI}" swap_keys tun"${p}" \ In test.sh line 102: $((${p} + OVPN_ID_OFFSET)) ^--^ SC2004 (style): $/${} is unnecessary on arithmetic variables. In test.sh line 108: ip netns exec "${server_ns}" ${OVPN_CLI} get_peer tun0 ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "${server_ns}" "${OVPN_CLI}" get_peer tun0 In test.sh line 109: ip netns exec ovpn_peer1 ${OVPN_CLI} get_peer tun1 ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec ovpn_peer1 "${OVPN_CLI}" get_peer tun1 In test.sh line 112: ip netns exec "${server_ns}" ${OVPN_CLI} get_peer tun0 1 ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "${server_ns}" "${OVPN_CLI}" get_peer tun0 1 In test.sh line 115: ip netns exec "${server_ns}" ${OVPN_CLI} get_peer tun0 20 || true ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "${server_ns}" "${OVPN_CLI}" get_peer tun0 20 || true In test.sh line 118: ip netns exec "${server_ns}" ${OVPN_CLI} del_peer tun0 1 ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "${server_ns}" "${OVPN_CLI}" del_peer tun0 1 In test.sh line 119: ip netns exec ovpn_peer1 ${OVPN_CLI} del_peer tun1 $((1 + OVPN_ID_OFFSET)) ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec ovpn_peer1 "${OVPN_CLI}" del_peer tun1 $((1 + OVPN_ID_OFFSET)) In test.sh line 122: for p in $(seq 2 ${OVPN_NUM_PEERS}); do ^---------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: for p in $(seq 2 "${OVPN_NUM_PEERS}"); do In test.sh line 123: ip netns exec "ovpn_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. Did you mean: ip netns exec "ovpn_peer${p}" "${OVPN_CLI}" get_key tun"${p}" \ In test.sh line 124: $((${p} + OVPN_ID_OFFSET)) 1 ^--^ SC2004 (style): $/${} is unnecessary on arithmetic variables. In test.sh line 125: ip netns exec "ovpn_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. Did you mean: ip netns exec "ovpn_peer${p}" "${OVPN_CLI}" get_key tun"${p}" \ In test.sh line 126: $((${p} + OVPN_ID_OFFSET)) 2 ^--^ SC2004 (style): $/${} is unnecessary on arithmetic variables. In test.sh line 132: ip netns exec "${server_ns}" ${OVPN_CLI} del_peer tun0 2 ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "${server_ns}" "${OVPN_CLI}" del_peer tun0 2 In test.sh line 135: ip netns exec ovpn_peer2 ${OVPN_CLI} del_peer tun2 $((2 + OVPN_ID_OFFSET)) || \ ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec ovpn_peer2 "${OVPN_CLI}" del_peer tun2 $((2 + OVPN_ID_OFFSET)) || \ In test.sh line 139: for p in $(seq 3 ${OVPN_NUM_PEERS}); do ^---------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: for p in $(seq 3 "${OVPN_NUM_PEERS}"); do In test.sh line 140: ip netns exec "ovpn_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. Did you mean: ip netns exec "ovpn_peer${p}" "${OVPN_CLI}" del_key tun"${p}" \ In test.sh line 141: $((${p} + OVPN_ID_OFFSET)) 1 ^--^ SC2004 (style): $/${} is unnecessary on arithmetic variables. In test.sh line 142: ip netns exec "ovpn_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. Did you mean: ip netns exec "ovpn_peer${p}" "${OVPN_CLI}" del_key tun"${p}" \ In test.sh line 143: $((${p} + OVPN_ID_OFFSET)) 2 ^--^ SC2004 (style): $/${} is unnecessary on arithmetic variables. In test.sh line 147: for p in $(seq 3 ${OVPN_NUM_PEERS}); do ^---------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: for p in $(seq 3 "${OVPN_NUM_PEERS}"); do In test.sh line 148: ip netns exec "${server_ns}" ${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 "${server_ns}" "${OVPN_CLI}" set_peer tun0 "${p}" 3 3 || true In test.sh line 149: ip netns exec "ovpn_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. Did you mean: ip netns exec "ovpn_peer${p}" "${OVPN_CLI}" set_peer tun"${p}" \ In test.sh line 150: $((${p} + OVPN_ID_OFFSET)) 0 0 ^--^ SC2004 (style): $/${} is unnecessary on arithmetic variables. In test.sh line 156: for p in $(seq 3 ${OVPN_NUM_PEERS}); do ^---------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: for p in $(seq 3 "${OVPN_NUM_PEERS}"); do In test.sh line 157: ip netns exec "ovpn_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. Did you mean: ip netns exec "ovpn_peer${p}" "${OVPN_CLI}" set_peer tun"${p}" \ In test.sh line 158: $((${p} + OVPN_ID_OFFSET)) 3 3 ^--^ SC2004 (style): $/${} is unnecessary on arithmetic variables. In test.sh line 162: for p in $(seq 0 ${OVPN_NUM_PEERS}); do ^---------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: for p in $(seq 0 "${OVPN_NUM_PEERS}"); do In test.sh line 163: ovpn_compare_ntfs ${p} ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ovpn_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 145: 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 147: for p in $(seq 1 ${OVPN_NUM_PEERS}); do ^---------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: for p in $(seq 1 "${OVPN_NUM_PEERS}"); do In common.sh line 149: ip link add veth${p} netns "${server_ns}" type veth \ ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip link add veth"${p}" netns "${server_ns}" type veth \ In common.sh line 150: peer name veth${p} netns "${peer_ns}" ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: peer name veth"${p}" netns "${peer_ns}" In common.sh line 152: ip -n "${server_ns}" addr add 10.10.${p}.1/24 dev \ ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -n "${server_ns}" addr add 10.10."${p}".1/24 dev \ In common.sh line 153: veth${p} ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: veth"${p}" In common.sh line 154: ip -n "${server_ns}" addr add fd00:0:0:${p}::1/64 dev \ ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -n "${server_ns}" addr add fd00:0:0:"${p}"::1/64 dev \ In common.sh line 155: veth${p} ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: veth"${p}" In common.sh line 156: ip -n "${server_ns}" link set veth${p} up ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -n "${server_ns}" link set veth"${p}" up In common.sh line 158: ip -n "${peer_ns}" 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. Did you mean: ip -n "${peer_ns}" addr add 10.10."${p}".2/24 dev veth"${p}" In common.sh line 159: ip -n "${peer_ns}" addr add fd00:0:0:${p}::2/64 dev \ ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -n "${peer_ns}" addr add fd00:0:0:"${p}"::2/64 dev \ In common.sh line 160: veth${p} ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: veth"${p}" In common.sh line 161: ip -n "${peer_ns}" link set veth${p} up ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -n "${peer_ns}" link set veth"${p}" up In common.sh line 165: ip netns exec "${peer}" ${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. Did you mean: ip netns exec "${peer}" "${OVPN_CLI}" new_iface tun"${1}" $MODE In common.sh line 166: ip -n "${peer}" 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. Did you mean: ip -n "${peer}" addr add "${2}" dev tun"${1}" In common.sh line 168: if [ ${1} -eq 1 -a -n "${OVPN_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 "${OVPN_LAN_IP}" ]; then In common.sh line 169: ip -n "${peer}" addr add ${OVPN_LAN_IP} dev tun${1} ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -n "${peer}" addr add ${OVPN_LAN_IP} dev tun"${1}" In common.sh line 171: $(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: $(echo "${2}" |sed -e s'!/.*!!') dev tun0 In common.sh line 174: ip -n "${peer}" 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. Did you mean: ip -n "${peer}" link set mtu "${3}" dev tun"${1}" In common.sh line 176: ip -n "${peer}" link set tun${1} up ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -n "${peer}" link set tun"${1}" up In common.sh line 218: 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 219: ip netns exec "${server_ns}" ${OVPN_CLI} \ ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "${server_ns}" "${OVPN_CLI}" \ In common.sh line 220: new_multi_peer tun0 1 ${M_ID} \ ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: new_multi_peer tun0 1 "${M_ID}" \ In common.sh line 221: ${OVPN_UDP_PEERS_FILE} ^--------------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: "${OVPN_UDP_PEERS_FILE}" In common.sh line 223: for p in $(seq 1 ${OVPN_NUM_PEERS}); do ^---------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: for p in $(seq 1 "${OVPN_NUM_PEERS}"); do In common.sh line 224: ip netns exec "${server_ns}" ${OVPN_CLI} \ ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "${server_ns}" "${OVPN_CLI}" \ In common.sh line 225: new_key tun0 ${p} 1 0 ${OVPN_ALG} 0 \ ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: new_key tun0 "${p}" 1 0 "${OVPN_ALG}" 0 \ In common.sh line 235: ${OVPN_UDP_PEERS_FILE}) ^--------------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: "${OVPN_UDP_PEERS_FILE}") In common.sh line 239: ${OVPN_UDP_PEERS_FILE}) ^--------------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: "${OVPN_UDP_PEERS_FILE}") In common.sh line 241: ${OVPN_UDP_PEERS_FILE}) ^--------------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: "${OVPN_UDP_PEERS_FILE}") In common.sh line 243: ${OVPN_UDP_PEERS_FILE}) ^--------------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: "${OVPN_UDP_PEERS_FILE}") In common.sh line 244: ip netns exec "${peer_ns}" ${OVPN_CLI} new_peer \ ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "${peer_ns}" "${OVPN_CLI}" new_peer \ In common.sh line 245: tun${1} ${PEER_ID} ${TX_ID} ${LPORT} ${RADDR} \ ^--^ 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: tun"${1}" "${PEER_ID}" "${TX_ID}" "${LPORT}" "${RADDR}" \ In common.sh line 246: ${RPORT} ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: "${RPORT}" In common.sh line 247: ip netns exec "${peer_ns}" ${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. Did you mean: ip netns exec "${peer_ns}" "${OVPN_CLI}" new_key tun"${1}" \ In common.sh line 248: ${PEER_ID} 1 0 ${OVPN_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 "${OVPN_ALG}" 1 data64.key In common.sh line 251: 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 252: (ip netns exec "${server_ns}" ${OVPN_CLI} listen tun0 \ ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: (ip netns exec "${server_ns}" "${OVPN_CLI}" listen tun0 \ In common.sh line 253: 1 ${M_ID} ${OVPN_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: 1 "${M_ID}" "${OVPN_TCP_PEERS_FILE}" && { In common.sh line 254: for p in $(seq 1 ${OVPN_NUM_PEERS}); do ^---------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: for p in $(seq 1 "${OVPN_NUM_PEERS}"); do In common.sh line 256: ${OVPN_CLI} new_key tun0 ${p} \ ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: "${OVPN_CLI}" new_key tun0 "${p}" \ In common.sh line 257: 1 0 ${OVPN_ALG} 0 data64.key ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: 1 0 "${OVPN_ALG}" 0 data64.key In common.sh line 268: ${OVPN_TCP_PEERS_FILE}) ^--------------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: "${OVPN_TCP_PEERS_FILE}") In common.sh line 271: ip netns exec "${peer_ns}" ${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. Did you mean: ip netns exec "${peer_ns}" "${OVPN_CLI}" connect tun"${1}" \ In common.sh line 272: ${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 290: 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 291: if diff <(jq -s "${OVPN_JQ_FILTER}" ${expected}) \ ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: if diff <(jq -s "${OVPN_JQ_FILTER}" "${expected}") \ In common.sh line 292: <(jq -s "${OVPN_JQ_FILTER}" ${received}) \ ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: <(jq -s "${OVPN_JQ_FILTER}" "${received}") \ In common.sh line 331: ip -n "${peer}" link set tun${peer_id} down 2>/dev/null || true ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -n "${peer}" link set tun"${peer_id}" down 2>/dev/null || true In common.sh line 332: ip netns exec "${peer}" ${OVPN_CLI} del_iface tun${peer_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 "${peer}" "${OVPN_CLI}" del_iface tun"${peer_id}" \ In common.sh line 348: ip -n ovpn_peer0 link del veth${p} 2>/dev/null || true ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -n ovpn_peer0 link del veth"${p}" 2>/dev/null || true In common.sh line 359: OVPN_NUM_PEERS=${OVPN_NUM_PEERS:-$(wc -l ${OVPN_UDP_PEERS_FILE} | \ ^--------------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: OVPN_NUM_PEERS=${OVPN_NUM_PEERS:-$(wc -l "${OVPN_UDP_PEERS_FILE}" | \ In common.sh line 362: OVPN_NUM_PEERS=${OVPN_NUM_PEERS:-$(wc -l ${OVPN_TCP_PEERS_FILE} | \ ^--------------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: OVPN_NUM_PEERS=${OVPN_NUM_PEERS:-$(wc -l "${OVPN_TCP_PEERS_FILE}" | \ 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 27: for p in $(seq 0 ${OVPN_NUM_PEERS}); do ^---------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: for p in $(seq 0 "${OVPN_NUM_PEERS}"); do In test-close-socket.sh line 31: for p in $(seq 0 ${OVPN_NUM_PEERS}); do ^---------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: for p in $(seq 0 "${OVPN_NUM_PEERS}"); do In test-close-socket.sh line 36: for p in $(seq 0 ${OVPN_NUM_PEERS}); do ^---------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: for p in $(seq 0 "${OVPN_NUM_PEERS}"); do In test-close-socket.sh line 40: for p in $(seq 1 ${OVPN_NUM_PEERS}); do ^---------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: for p in $(seq 1 "${OVPN_NUM_PEERS}"); do In test-close-socket.sh line 43: ip netns exec ovpn_peer0 ${OVPN_CLI} set_peer tun0 \ ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec ovpn_peer0 "${OVPN_CLI}" set_peer tun0 \ In test-close-socket.sh line 44: ${p} 60 120 ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: "${p}" 60 120 In test-close-socket.sh line 46: ip netns exec "${peer_ns}" ${OVPN_CLI} set_peer \ ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "${peer_ns}" "${OVPN_CLI}" set_peer \ In test-close-socket.sh line 47: tun${p} $((p + OVPN_ID_OFFSET)) 60 120 ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: tun"${p}" $((p + OVPN_ID_OFFSET)) 60 120 In test-close-socket.sh line 54: for p in $(seq 1 ${OVPN_NUM_PEERS}); do ^---------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: for p in $(seq 1 "${OVPN_NUM_PEERS}"); do For more information: https://www.shellcheck.net/wiki/SC2086 -- Double quote to prevent globbing ... Checking tools/testing/selftests/net/ovpn/test-mark.sh - 62413f616b2d8c2c30c9460fb0e3f9143841b79f6c88f785583b2a23156390a9 Checking tools/testing/selftests/net/ovpn/test.sh - 8aea422bc8ffa29c1c10a341b4847c0fdf51abd61d5b98b552a435ac5f532301 In test.sh line 27: for p in $(seq 0 ${OVPN_NUM_PEERS}); do ^---------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: for p in $(seq 0 "${OVPN_NUM_PEERS}"); do In test.sh line 31: for p in $(seq 0 ${OVPN_NUM_PEERS}); do ^---------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: for p in $(seq 0 "${OVPN_NUM_PEERS}"); do In test.sh line 36: for p in $(seq 0 ${OVPN_NUM_PEERS}); do ^---------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: for p in $(seq 0 "${OVPN_NUM_PEERS}"); do In test.sh line 41: for p in $(seq 0 ${OVPN_NUM_PEERS}); do ^---------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: for p in $(seq 0 "${OVPN_NUM_PEERS}"); do In test.sh line 45: for p in $(seq 1 ${OVPN_NUM_PEERS}); do ^---------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: for p in $(seq 1 "${OVPN_NUM_PEERS}"); do In test.sh line 48: ip netns exec ovpn_peer0 ${OVPN_CLI} set_peer tun0 \ ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec ovpn_peer0 "${OVPN_CLI}" set_peer tun0 \ In test.sh line 49: ${p} 60 120 ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: "${p}" 60 120 In test.sh line 51: ip netns exec "${peer_ns}" ${OVPN_CLI} set_peer \ ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "${peer_ns}" "${OVPN_CLI}" set_peer \ In test.sh line 52: tun${p} $((p + OVPN_ID_OFFSET)) 60 120 ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: tun"${p}" $((p + OVPN_ID_OFFSET)) 60 120 In test.sh line 66: for p in $(seq 1 ${OVPN_NUM_PEERS}); do ^---------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: for p in $(seq 1 "${OVPN_NUM_PEERS}"); do In test.sh line 75: 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 84: timeout ${tcpdump_timeout} ip netns exec "${peer_ns}" \ ^----------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: timeout "${tcpdump_timeout}" ip netns exec "${peer_ns}" \ In test.sh line 85: 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 89: timeout ${tcpdump_timeout} ip netns exec "${peer_ns}" \ ^----------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: timeout "${tcpdump_timeout}" ip netns exec "${peer_ns}" \ In test.sh line 90: 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 117: for p in $(seq 1 ${OVPN_NUM_PEERS}); do ^---------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: for p in $(seq 1 "${OVPN_NUM_PEERS}"); do In test.sh line 120: ip -n "${peer_ns}" 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. Did you mean: ip -n "${peer_ns}" addr del 10.10."${p}".2/24 dev veth"${p}" In test.sh line 122: ip -n "${peer_ns}" 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. Did you mean: ip -n "${peer_ns}" addr add 10.10."${p}".3/24 dev veth"${p}" In test.sh line 124: for p in $(seq 1 ${OVPN_NUM_PEERS}); do ^---------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: for p in $(seq 1 "${OVPN_NUM_PEERS}"); do In test.sh line 148: for p in $(seq 1 ${OVPN_NUM_PEERS}); do ^---------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: for p in $(seq 1 "${OVPN_NUM_PEERS}"); do In test.sh line 151: ip netns exec ovpn_peer0 ${OVPN_CLI} new_key tun0 \ ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec ovpn_peer0 "${OVPN_CLI}" new_key tun0 \ In test.sh line 152: ${p} 2 1 ${OVPN_ALG} 0 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: "${p}" 2 1 "${OVPN_ALG}" 0 data64.key In test.sh line 154: ip netns exec "${peer_ns}" ${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. Did you mean: ip netns exec "${peer_ns}" "${OVPN_CLI}" new_key tun"${p}" \ In test.sh line 155: $((p + OVPN_ID_OFFSET)) 2 1 ${OVPN_ALG} 1 \ ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: $((p + OVPN_ID_OFFSET)) 2 1 "${OVPN_ALG}" 1 \ In test.sh line 158: ip netns exec "${peer_ns}" ${OVPN_CLI} swap_keys \ ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "${peer_ns}" "${OVPN_CLI}" swap_keys \ In test.sh line 159: tun${p} $((p + OVPN_ID_OFFSET)) ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: tun"${p}" $((p + OVPN_ID_OFFSET)) In test.sh line 167: ip netns exec ovpn_peer0 ${OVPN_CLI} get_peer tun0 ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec ovpn_peer0 "${OVPN_CLI}" get_peer tun0 In test.sh line 169: ip netns exec ovpn_peer1 ${OVPN_CLI} get_peer tun1 ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec ovpn_peer1 "${OVPN_CLI}" get_peer tun1 In test.sh line 174: ip netns exec ovpn_peer0 ${OVPN_CLI} get_peer tun0 1 ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec ovpn_peer0 "${OVPN_CLI}" get_peer tun0 1 In test.sh line 181: ip netns exec ovpn_peer0 ${OVPN_CLI} get_peer tun0 20 ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec ovpn_peer0 "${OVPN_CLI}" get_peer tun0 20 In test.sh line 191: ip netns exec ovpn_peer0 ${OVPN_CLI} del_peer tun0 1 ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec ovpn_peer0 "${OVPN_CLI}" del_peer tun0 1 In test.sh line 193: ip netns exec ovpn_peer1 ${OVPN_CLI} del_peer tun1 \ ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec ovpn_peer1 "${OVPN_CLI}" del_peer tun1 \ In test.sh line 198: for p in $(seq 2 ${OVPN_NUM_PEERS}); do ^---------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: for p in $(seq 2 "${OVPN_NUM_PEERS}"); do In test.sh line 201: ip netns exec "${peer_ns}" ${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. Did you mean: ip netns exec "${peer_ns}" "${OVPN_CLI}" get_key tun"${p}" \ In test.sh line 204: ip netns exec "${peer_ns}" ${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. Did you mean: ip netns exec "${peer_ns}" "${OVPN_CLI}" get_key tun"${p}" \ In test.sh line 217: ip netns exec ovpn_peer0 ${OVPN_CLI} del_peer tun0 2 ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec ovpn_peer0 "${OVPN_CLI}" del_peer tun0 2 In test.sh line 222: ip netns exec ovpn_peer2 ${OVPN_CLI} del_peer tun2 \ ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec ovpn_peer2 "${OVPN_CLI}" del_peer tun2 \ In test.sh line 226: ${OVPN_CLI} del_peer tun2 $((2 + OVPN_ID_OFFSET)) ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: "${OVPN_CLI}" del_peer tun2 $((2 + OVPN_ID_OFFSET)) In test.sh line 238: for p in $(seq 3 ${OVPN_NUM_PEERS}); do ^---------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: for p in $(seq 3 "${OVPN_NUM_PEERS}"); do In test.sh line 241: ip netns exec "${peer_ns}" ${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. Did you mean: ip netns exec "${peer_ns}" "${OVPN_CLI}" del_key tun"${p}" \ In test.sh line 244: ip netns exec "${peer_ns}" ${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. Did you mean: ip netns exec "${peer_ns}" "${OVPN_CLI}" del_key tun"${p}" \ In test.sh line 255: for p in $(seq 3 ${OVPN_NUM_PEERS}); do ^---------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: for p in $(seq 3 "${OVPN_NUM_PEERS}"); do In test.sh line 258: ip netns exec ovpn_peer0 ${OVPN_CLI} set_peer tun0 \ ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec ovpn_peer0 "${OVPN_CLI}" set_peer tun0 \ In test.sh line 259: ${p} 3 3 ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: "${p}" 3 3 In test.sh line 262: state" ip netns exec "${peer_ns}" ${OVPN_CLI} set_peer \ ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: state" ip netns exec "${peer_ns}" "${OVPN_CLI}" set_peer \ In test.sh line 263: tun${p} $((p + OVPN_ID_OFFSET)) 0 0 ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: tun"${p}" $((p + OVPN_ID_OFFSET)) 0 0 In test.sh line 270: for p in $(seq 3 ${OVPN_NUM_PEERS}); do ^---------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: for p in $(seq 3 "${OVPN_NUM_PEERS}"); do In test.sh line 273: ip netns exec "${peer_ns}" ${OVPN_CLI} set_peer \ ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "${peer_ns}" "${OVPN_CLI}" set_peer \ In test.sh line 274: tun${p} $((p + OVPN_ID_OFFSET)) 3 3 ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: tun"${p}" $((p + OVPN_ID_OFFSET)) 3 3 In test.sh line 282: for p in $(seq 0 ${OVPN_NUM_PEERS}); do ^---------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: for p in $(seq 0 "${OVPN_NUM_PEERS}"); do For more information: https://www.shellcheck.net/wiki/SC2086 -- Double quote to prevent globbing ... tools/testing/selftests/net/ovpn/test-mark.sh is shellcheck compliant