Skip to contentSkip to conversation

network/stress/ssh/ssh-stress01-rmt: fix shellcheck error

PATCH New Yixin Zhang 2 participants 2 messages May 31, 2018 – Jun 6, 2018

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 network/stress/ssh/ssh-stress01-rmt: fix shellcheck error

testcases/network/stress/ssh/ssh-stress01-rmt:57:16: error: Since you double quoted this, it will not word split, and the loop will only run once. [SC2066]

---
 testcases/network/stress/ssh/ssh-stress01-rmt | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
testcases/network/stress/ssh/ssh-stress01-rmt +1 -4
index 2a84957ca..b2f65793e 100644
@@ -53,10 +53,7 @@ done
 # Disconnect all ssh connection
 all_conn=$(ps auxw | grep -Fv grep | \
 	grep "ssh[[:blank:]].*${ssh_config}" | awk '{print $2}')
-
-for ssh_pid in "$all_conn"; do
-	kill $ssh_pid
-done
+kill $all_conn
 
 # Check the connectivity again
 ssh -$ip_ver -F $ssh_config $server_ipaddr \
Signature · 1 line
2.14.1
#1 lore raw

PATCH v2 1/1 network/stress/ssh/ssh-stress01-rmt: fix shellcheck error

Quoted 6 lines · Yixin Zhang

testcases/network/stress/ssh/ssh-stress01-rmt:57:16: error: Since you double quoted this, it will not word split, and the loop will only run once. [SC2066]

---

Applied, thanks!