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.UPdOZIrAYO and /tmp/tmp.Uzcpr4rHCL Tree base: f66736669645 ("selftests: ovpn: add namespace to helpers and shared variables") Now at: dfc4695fa3a0 ("selftests: ovpn: align command flow with TAP") ====== Checking before the patch ====== Checking tools/testing/selftests/net/ovpn/common.sh - e3a67af2e113ee92dfb9cddd321874ac9c303e36744b0c6b1f1fc22173315989 In common.sh line 27: 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 33: 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 35: 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 36: 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 38: 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 39: 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 40: 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 42: 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 43: 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 44: 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 48: 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 49: 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 51: 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 52: ip -n peer${1} addr add ${OVPN_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 ${OVPN_LAN_IP} dev tun"${1}" In common.sh line 53: ip -n peer0 route add ${OVPN_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 ${OVPN_LAN_IP} via $(echo "${2}" |sed -e s'!/.*!!') dev tun0 In common.sh line 56: 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 58: 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 82: PYTHONUNBUFFERED=1 ip netns exec peer${p} ${OVPN_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}" "${OVPN_YNL_CLI}" --family ovpn \ In common.sh line 83: --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 93: 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 94: ip netns exec peer0 ${OVPN_CLI} new_multi_peer tun0 1 \ ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec peer0 "${OVPN_CLI}" new_multi_peer tun0 1 \ In common.sh line 95: ${M_ID} ${OVPN_UDP_PEERS_FILE} ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--------------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: "${M_ID}" "${OVPN_UDP_PEERS_FILE}" In common.sh line 97: 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 98: ip netns exec peer0 ${OVPN_CLI} new_key tun0 ${p} 1 0 ${OVPN_ALG} \ ^---------^ 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 "${OVPN_ALG}" \ In common.sh line 107: ${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: RADDR=$(awk "NR == ${1} {print \$3}" ${OVPN_UDP_PEERS_FILE}) ^--------------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: RADDR=$(awk "NR == ${1} {print \$3}" "${OVPN_UDP_PEERS_FILE}") In common.sh line 111: RPORT=$(awk "NR == ${1} {print \$4}" ${OVPN_UDP_PEERS_FILE}) ^--------------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: RPORT=$(awk "NR == ${1} {print \$4}" "${OVPN_UDP_PEERS_FILE}") In common.sh line 112: LPORT=$(awk "NR == ${1} {print \$6}" ${OVPN_UDP_PEERS_FILE}) ^--------------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: LPORT=$(awk "NR == ${1} {print \$6}" "${OVPN_UDP_PEERS_FILE}") In common.sh line 113: ip netns exec peer${1} ${OVPN_CLI} new_peer tun${1} \ ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec peer"${1}" "${OVPN_CLI}" new_peer tun"${1}" \ In common.sh line 114: ${PEER_ID} ${TX_ID} ${LPORT} ${RADDR} ${RPORT} ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: "${PEER_ID}" "${TX_ID}" "${LPORT}" "${RADDR}" "${RPORT}" In common.sh line 115: ip netns exec peer${1} ${OVPN_CLI} new_key tun${1} \ ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec peer"${1}" "${OVPN_CLI}" new_key tun"${1}" \ In common.sh line 116: ${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 119: 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 120: (ip netns exec peer0 ${OVPN_CLI} listen tun0 1 ${M_ID} \ ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: (ip netns exec peer0 "${OVPN_CLI}" listen tun0 1 "${M_ID}" \ In common.sh line 121: ${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 122: 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 123: 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 124: ${OVPN_ALG} 0 data64.key ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: "${OVPN_ALG}" 0 data64.key In common.sh line 134: ${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 137: ip netns exec peer${1} ${OVPN_CLI} connect tun${1} \ ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec peer"${1}" "${OVPN_CLI}" connect tun"${1}" \ In common.sh line 138: ${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 155: 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 156: 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 157: 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 158: 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 159: <(jq -s "${OVPN_JQ_FILTER}" ${received}) >"${diff_file}" 2>&1; then ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: <(jq -s "${OVPN_JQ_FILTER}" "${received}") >"${diff_file}" 2>&1; then In common.sh line 168: 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 176: 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 180: 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 181: 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 184: 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 187: 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 192: OVPN_NUM_PEERS=${OVPN_NUM_PEERS:-$(wc -l ${OVPN_UDP_PEERS_FILE} | awk '{print $1}')} ^--------------------^ 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}" | awk '{print $1}')} In common.sh line 194: OVPN_NUM_PEERS=${OVPN_NUM_PEERS:-$(wc -l ${OVPN_TCP_PEERS_FILE} | awk '{print $1}')} ^--------------------^ 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}" | 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 ${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 17: 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 20: 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 21: 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 24: 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 25: 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 28: 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 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 ${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 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-mark.sh - 62413f616b2d8c2c30c9460fb0e3f9143841b79f6c88f785583b2a23156390a9 Checking tools/testing/selftests/net/ovpn/test.sh - 8aea422bc8ffa29c1c10a341b4847c0fdf51abd61d5b98b552a435ac5f532301 In test.sh line 16: 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 17: 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 20: 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 21: 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 24: 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 25: 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 28: 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 29: 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 32: 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 33: ip netns exec peer0 ${OVPN_CLI} set_peer tun0 ${p} 60 120 ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec peer0 "${OVPN_CLI}" set_peer tun0 "${p}" 60 120 In test.sh line 34: ip netns exec peer${p} ${OVPN_CLI} set_peer tun${p} \ ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec peer"${p}" "${OVPN_CLI}" set_peer tun"${p}" \ In test.sh line 35: $((${p}+OVPN_ID_OFFSET)) 60 120 ^--^ SC2004 (style): $/${} is unnecessary on arithmetic variables. In test.sh line 41: 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 49: HEADER1=$(printf "0x4800000%x" ${p}) ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: HEADER1=$(printf "0x4800000%x" "${p}") In test.sh line 50: HEADER2=$(printf "0x4800000%x" $((${p} + OVPN_ID_OFFSET))) ^--^ SC2004 (style): $/${} is unnecessary on arithmetic variables. In test.sh line 53: 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 56: timeout ${TCPDUMP_TIMEOUT} ip netns exec peer${p} \ ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: timeout ${TCPDUMP_TIMEOUT} ip netns exec peer"${p}" \ In test.sh line 57: tcpdump --immediate-mode -p -ni veth${p} -c 1 \ ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: tcpdump --immediate-mode -p -ni veth"${p}" -c 1 \ In test.sh line 61: timeout ${TCPDUMP_TIMEOUT} ip netns exec peer${p} \ ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: timeout ${TCPDUMP_TIMEOUT} ip netns exec peer"${p}" \ In test.sh line 62: tcpdump --immediate-mode -p -ni veth${p} -c 1 \ ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: tcpdump --immediate-mode -p -ni veth"${p}" -c 1 \ In test.sh line 68: ip netns exec peer0 ping -qfc 500 -w 3 5.5.5.$((${p} + 1)) ^--^ SC2004 (style): $/${} is unnecessary on arithmetic variables. In test.sh line 69: ip netns exec peer0 ping -qfc 500 -s 3000 -w 3 5.5.5.$((${p} + 1)) ^--^ SC2004 (style): $/${} is unnecessary on arithmetic variables. In test.sh line 80: for p in $(seq 1 ${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 81: ip -n peer${p} addr del 10.10.${p}.2/24 dev veth${p} ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -n peer"${p}" addr del 10.10."${p}".2/24 dev veth"${p}" In test.sh line 82: ip -n peer${p} addr add 10.10.${p}.3/24 dev veth${p} ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -n peer"${p}" addr add 10.10."${p}".3/24 dev veth"${p}" In test.sh line 84: for p in $(seq 1 ${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 85: ip netns exec peer${p} ping -qfc 500 -w 3 5.5.5.1 ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec peer"${p}" ping -qfc 500 -w 3 5.5.5.1 In test.sh line 94: for p in $(seq 1 ${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 95: ip netns exec peer0 ${OVPN_CLI} new_key tun0 ${p} 2 1 ${OVPN_ALG} 0 \ ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec peer0 "${OVPN_CLI}" new_key tun0 "${p}" 2 1 "${OVPN_ALG}" 0 \ In test.sh line 97: ip netns exec peer${p} ${OVPN_CLI} new_key tun${p} \ ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec peer"${p}" "${OVPN_CLI}" new_key tun"${p}" \ In test.sh line 98: $((${p} + 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 99: ip netns exec peer${p} ${OVPN_CLI} swap_keys tun${p} \ ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec peer"${p}" "${OVPN_CLI}" swap_keys tun"${p}" \ In test.sh line 100: $((${p} + OVPN_ID_OFFSET)) ^--^ SC2004 (style): $/${} is unnecessary on arithmetic variables. In test.sh line 106: ip netns exec peer0 ${OVPN_CLI} get_peer tun0 ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec peer0 "${OVPN_CLI}" get_peer tun0 In test.sh line 107: ip netns exec peer1 ${OVPN_CLI} get_peer tun1 ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec peer1 "${OVPN_CLI}" get_peer tun1 In test.sh line 110: ip netns exec peer0 ${OVPN_CLI} get_peer tun0 1 ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec peer0 "${OVPN_CLI}" get_peer tun0 1 In test.sh line 113: ip netns exec peer0 ${OVPN_CLI} get_peer tun0 20 || true ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec peer0 "${OVPN_CLI}" get_peer tun0 20 || true In test.sh line 116: ip netns exec peer0 ${OVPN_CLI} del_peer tun0 1 ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec peer0 "${OVPN_CLI}" del_peer tun0 1 In test.sh line 117: ip netns exec peer1 ${OVPN_CLI} del_peer tun1 $((1 + OVPN_ID_OFFSET)) ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec peer1 "${OVPN_CLI}" del_peer tun1 $((1 + OVPN_ID_OFFSET)) In test.sh line 120: 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 121: ip netns exec peer${p} ${OVPN_CLI} get_key tun${p} \ ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec peer"${p}" "${OVPN_CLI}" get_key tun"${p}" \ In test.sh line 122: $((${p} + OVPN_ID_OFFSET)) 1 ^--^ SC2004 (style): $/${} is unnecessary on arithmetic variables. In test.sh line 123: ip netns exec peer${p} ${OVPN_CLI} get_key tun${p} \ ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec peer"${p}" "${OVPN_CLI}" get_key tun"${p}" \ In test.sh line 124: $((${p} + OVPN_ID_OFFSET)) 2 ^--^ SC2004 (style): $/${} is unnecessary on arithmetic variables. In test.sh line 130: ip netns exec peer0 ${OVPN_CLI} del_peer tun0 2 ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec peer0 "${OVPN_CLI}" del_peer tun0 2 In test.sh line 133: ip netns exec peer2 ${OVPN_CLI} del_peer tun2 $((2 + OVPN_ID_OFFSET)) || true ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec peer2 "${OVPN_CLI}" del_peer tun2 $((2 + OVPN_ID_OFFSET)) || true In test.sh line 136: 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 137: ip netns exec peer${p} ${OVPN_CLI} del_key tun${p} \ ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec peer"${p}" "${OVPN_CLI}" del_key tun"${p}" \ In test.sh line 138: $((${p} + OVPN_ID_OFFSET)) 1 ^--^ SC2004 (style): $/${} is unnecessary on arithmetic variables. In test.sh line 139: ip netns exec peer${p} ${OVPN_CLI} del_key tun${p} \ ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec peer"${p}" "${OVPN_CLI}" del_key tun"${p}" \ In test.sh line 140: $((${p} + OVPN_ID_OFFSET)) 2 ^--^ SC2004 (style): $/${} is unnecessary on arithmetic variables. In test.sh line 144: 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 145: ip netns exec peer0 ${OVPN_CLI} set_peer tun0 ${p} 3 3 || true ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec peer0 "${OVPN_CLI}" set_peer tun0 "${p}" 3 3 || true In test.sh line 146: ip netns exec peer${p} ${OVPN_CLI} set_peer tun${p} \ ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec peer"${p}" "${OVPN_CLI}" set_peer tun"${p}" \ In test.sh line 147: $((${p} + OVPN_ID_OFFSET)) 0 0 ^--^ SC2004 (style): $/${} is unnecessary on arithmetic variables. In test.sh line 153: 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 154: ip netns exec peer${p} ${OVPN_CLI} set_peer tun${p} \ ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec peer"${p}" "${OVPN_CLI}" set_peer tun"${p}" \ In test.sh line 155: $((${p} + OVPN_ID_OFFSET)) 3 3 ^--^ SC2004 (style): $/${} is unnecessary on arithmetic variables. In test.sh line 159: 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 160: 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 135: 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 141: 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 143: 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 144: 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 146: 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 147: 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 148: 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 150: 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 151: 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 152: 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 156: 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 157: 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 159: 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 160: ip -n peer${1} addr add ${OVPN_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 ${OVPN_LAN_IP} dev tun"${1}" In common.sh line 161: ip -n peer0 route add ${OVPN_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 ${OVPN_LAN_IP} via $(echo "${2}" |sed -e s'!/.*!!') dev tun0 In common.sh line 164: 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 166: 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 204: 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 205: ip netns exec peer0 ${OVPN_CLI} new_multi_peer tun0 1 \ ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec peer0 "${OVPN_CLI}" new_multi_peer tun0 1 \ In common.sh line 206: ${M_ID} ${OVPN_UDP_PEERS_FILE} ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--------------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: "${M_ID}" "${OVPN_UDP_PEERS_FILE}" In common.sh line 208: 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 209: ip netns exec peer0 ${OVPN_CLI} new_key tun0 ${p} 1 0 ${OVPN_ALG} \ ^---------^ 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 "${OVPN_ALG}" \ In common.sh line 218: ${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 221: RADDR=$(awk "NR == ${1} {print \$3}" ${OVPN_UDP_PEERS_FILE}) ^--------------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: RADDR=$(awk "NR == ${1} {print \$3}" "${OVPN_UDP_PEERS_FILE}") In common.sh line 222: RPORT=$(awk "NR == ${1} {print \$4}" ${OVPN_UDP_PEERS_FILE}) ^--------------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: RPORT=$(awk "NR == ${1} {print \$4}" "${OVPN_UDP_PEERS_FILE}") In common.sh line 223: LPORT=$(awk "NR == ${1} {print \$6}" ${OVPN_UDP_PEERS_FILE}) ^--------------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: LPORT=$(awk "NR == ${1} {print \$6}" "${OVPN_UDP_PEERS_FILE}") In common.sh line 224: ip netns exec peer${1} ${OVPN_CLI} new_peer tun${1} \ ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec peer"${1}" "${OVPN_CLI}" new_peer tun"${1}" \ In common.sh line 225: ${PEER_ID} ${TX_ID} ${LPORT} ${RADDR} ${RPORT} ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: "${PEER_ID}" "${TX_ID}" "${LPORT}" "${RADDR}" "${RPORT}" In common.sh line 226: ip netns exec peer${1} ${OVPN_CLI} new_key tun${1} \ ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec peer"${1}" "${OVPN_CLI}" new_key tun"${1}" \ In common.sh line 227: ${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 230: 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 231: (ip netns exec peer0 ${OVPN_CLI} listen tun0 1 ${M_ID} \ ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: (ip netns exec peer0 "${OVPN_CLI}" listen tun0 1 "${M_ID}" \ In common.sh line 232: ${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 233: 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 234: 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 235: ${OVPN_ALG} 0 data64.key ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: "${OVPN_ALG}" 0 data64.key In common.sh line 245: ${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 248: ip netns exec peer${1} ${OVPN_CLI} connect tun${1} \ ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec peer"${1}" "${OVPN_CLI}" connect tun"${1}" \ In common.sh line 249: ${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 266: kill -TERM ${OVPN_LISTENER_PIDS[$1]} 2>/dev/null || true ^-----------------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: kill -TERM "${OVPN_LISTENER_PIDS[$1]}" 2>/dev/null || true In common.sh line 267: wait ${OVPN_LISTENER_PIDS[$1]} 2>/dev/null || true ^-----------------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: wait "${OVPN_LISTENER_PIDS[$1]}" 2>/dev/null || true In common.sh line 268: 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 269: 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 270: <(jq -s "${OVPN_JQ_FILTER}" ${received}) >"${diff_file}" 2>&1; then ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: <(jq -s "${OVPN_JQ_FILTER}" "${received}") >"${diff_file}" 2>&1; then In common.sh line 279: 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 309: ip -n "${peer}" link set tun${peer#peer} 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#peer}" down 2>/dev/null || true In common.sh line 310: ip netns exec "${peer}" ${OVPN_CLI} del_iface tun${peer#peer} \ ^---------^ 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#peer}" \ In common.sh line 324: 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 332: OVPN_NUM_PEERS=${OVPN_NUM_PEERS:-$(wc -l ${OVPN_UDP_PEERS_FILE} | awk '{print $1}')} ^--------------------^ 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}" | awk '{print $1}')} In common.sh line 334: OVPN_NUM_PEERS=${OVPN_NUM_PEERS:-$(wc -l ${OVPN_TCP_PEERS_FILE} | awk '{print $1}')} ^--------------------^ 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}" | 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 26: 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 30: 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 35: 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 39: 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 41: 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 43: ip netns exec peer${p} ${OVPN_CLI} set_peer tun${p} \ ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec peer"${p}" "${OVPN_CLI}" set_peer tun"${p}" \ In test-close-socket.sh line 51: 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 26: 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: 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 35: 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 40: 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 44: 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 46: ip netns exec peer0 ${OVPN_CLI} set_peer tun0 \ ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec peer0 "${OVPN_CLI}" set_peer tun0 \ In test.sh line 47: ${p} 60 120 ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: "${p}" 60 120 In test.sh line 49: ip netns exec peer${p} ${OVPN_CLI} set_peer tun${p} \ ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec peer"${p}" "${OVPN_CLI}" set_peer tun"${p}" \ In test.sh line 63: 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 71: 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 78: timeout ${tcpdump_timeout} ip netns exec peer${p} \ ^----------------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: timeout "${tcpdump_timeout}" ip netns exec peer"${p}" \ In test.sh line 79: 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 83: timeout ${tcpdump_timeout} ip netns exec peer${p} \ ^----------------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: timeout "${tcpdump_timeout}" ip netns exec peer"${p}" \ In test.sh line 84: 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 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 test.sh line 112: 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 114: 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 116: 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 118: 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 138: 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 140: ip netns exec peer0 ${OVPN_CLI} new_key tun0 \ ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec peer0 "${OVPN_CLI}" new_key tun0 \ In test.sh line 141: ${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 143: ip netns exec peer${p} ${OVPN_CLI} new_key tun${p} \ ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec peer"${p}" "${OVPN_CLI}" new_key tun"${p}" \ In test.sh line 144: $((p + OVPN_ID_OFFSET)) 2 1 ${OVPN_ALG} 1 data64.key ^---------^ 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 146: ip netns exec peer${p} ${OVPN_CLI} swap_keys tun${p} \ ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec peer"${p}" "${OVPN_CLI}" swap_keys tun"${p}" \ In test.sh line 155: 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 157: 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 162: 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 169: ip netns exec peer0 ${OVPN_CLI} get_peer tun0 20 ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec peer0 "${OVPN_CLI}" get_peer tun0 20 In test.sh line 178: 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 180: ip netns exec 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 peer1 "${OVPN_CLI}" del_peer tun1 $((1 + OVPN_ID_OFFSET)) In test.sh line 184: 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 186: ip netns exec peer${p} ${OVPN_CLI} get_key tun${p} \ ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec peer"${p}" "${OVPN_CLI}" get_key tun"${p}" \ In test.sh line 189: ip netns exec peer${p} ${OVPN_CLI} get_key tun${p} \ ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec peer"${p}" "${OVPN_CLI}" get_key tun"${p}" \ In test.sh line 202: 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 207: ip netns exec 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 peer2 "${OVPN_CLI}" del_peer tun2 $((2 + OVPN_ID_OFFSET)) In test.sh line 210: ${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 221: 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 223: ip netns exec peer${p} ${OVPN_CLI} del_key tun${p} \ ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec peer"${p}" "${OVPN_CLI}" del_key tun"${p}" \ In test.sh line 226: ip netns exec peer${p} ${OVPN_CLI} del_key tun${p} \ ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec peer"${p}" "${OVPN_CLI}" del_key tun"${p}" \ In test.sh line 236: 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 239: ip netns exec peer0 ${OVPN_CLI} set_peer tun0 ${p} 3 3 ^---------^ 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 In test.sh line 241: ip netns exec peer${p} ${OVPN_CLI} set_peer tun${p} \ ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec peer"${p}" "${OVPN_CLI}" set_peer tun"${p}" \ In test.sh line 249: 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 251: ip netns exec peer${p} ${OVPN_CLI} set_peer tun${p} \ ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec peer"${p}" "${OVPN_CLI}" set_peer tun"${p}" \ In test.sh line 260: 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