* [LTP] [PATCH ltp] network/stress/ssh/ssh-stress01-rmt: fix shellcheck error
@ 2018-05-25 7:51 Yixin Zhang
2018-05-28 14:38 ` Alexey Kodanev
0 siblings, 1 reply; 3+ messages in thread
From: Yixin Zhang @ 2018-05-25 7:51 UTC (permalink / raw)
To: ltp
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]
Signed-off-by: Yixin Zhang <yixin.zhang@intel.com>
---
testcases/network/stress/ssh/ssh-stress01-rmt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/testcases/network/stress/ssh/ssh-stress01-rmt b/testcases/network/stress/ssh/ssh-stress01-rmt
index 2a84957ca..3f670a3b8 100644
--- a/testcases/network/stress/ssh/ssh-stress01-rmt
+++ b/testcases/network/stress/ssh/ssh-stress01-rmt
@@ -54,7 +54,7 @@ done
all_conn=$(ps auxw | grep -Fv grep | \
grep "ssh[[:blank:]].*${ssh_config}" | awk '{print $2}')
-for ssh_pid in "$all_conn"; do
+for ssh_pid in $all_conn; do
kill $ssh_pid
done
--
2.14.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [LTP] [PATCH ltp] network/stress/ssh/ssh-stress01-rmt: fix shellcheck error
2018-05-25 7:51 [LTP] [PATCH ltp] network/stress/ssh/ssh-stress01-rmt: fix shellcheck error Yixin Zhang
@ 2018-05-28 14:38 ` Alexey Kodanev
2018-05-31 2:43 ` Zhang, Yixin
0 siblings, 1 reply; 3+ messages in thread
From: Alexey Kodanev @ 2018-05-28 14:38 UTC (permalink / raw)
To: ltp
On 05/25/2018 10:51 AM, Yixin Zhang wrote:
> 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]
>
Right. Hopefully 'kill' accepts a list of pids.
> Signed-off-by: Yixin Zhang <yixin.zhang@intel.com>
> ---
> testcases/network/stress/ssh/ssh-stress01-rmt | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/testcases/network/stress/ssh/ssh-stress01-rmt b/testcases/network/stress/ssh/ssh-stress01-rmt
> index 2a84957ca..3f670a3b8 100644
> --- a/testcases/network/stress/ssh/ssh-stress01-rmt
> +++ b/testcases/network/stress/ssh/ssh-stress01-rmt
> @@ -54,7 +54,7 @@ done
> all_conn=$(ps auxw | grep -Fv grep | \
> grep "ssh[[:blank:]].*${ssh_config}" | awk '{print $2}')
>
> -for ssh_pid in "$all_conn"; do
> +for ssh_pid in $all_conn; do
> kill $ssh_pid
Could we just add 'kill $all_conn', or use the above pattern with pkill, i.e.
pkill -f "ssh .*$ssh_config"
instead of adding $all_conn and the 'for' loop?
^ permalink raw reply [flat|nested] 3+ messages in thread
* [LTP] [PATCH ltp] network/stress/ssh/ssh-stress01-rmt: fix shellcheck error
2018-05-28 14:38 ` Alexey Kodanev
@ 2018-05-31 2:43 ` Zhang, Yixin
0 siblings, 0 replies; 3+ messages in thread
From: Zhang, Yixin @ 2018-05-31 2:43 UTC (permalink / raw)
To: ltp
Hi Alexey,
Thanks for the comment, a V2 patch is sent.
Yixin
On 2018-05-28 at 17:38:26 +0300, Alexey Kodanev wrote:
> On 05/25/2018 10:51 AM, Yixin Zhang wrote:
> > 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]
> >
>
> Right. Hopefully 'kill' accepts a list of pids.
>
> > Signed-off-by: Yixin Zhang <yixin.zhang@intel.com>
> > ---
> > testcases/network/stress/ssh/ssh-stress01-rmt | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/testcases/network/stress/ssh/ssh-stress01-rmt b/testcases/network/stress/ssh/ssh-stress01-rmt
> > index 2a84957ca..3f670a3b8 100644
> > --- a/testcases/network/stress/ssh/ssh-stress01-rmt
> > +++ b/testcases/network/stress/ssh/ssh-stress01-rmt
> > @@ -54,7 +54,7 @@ done
> > all_conn=$(ps auxw | grep -Fv grep | \
> > grep "ssh[[:blank:]].*${ssh_config}" | awk '{print $2}')
> >
> > -for ssh_pid in "$all_conn"; do
> > +for ssh_pid in $all_conn; do
> > kill $ssh_pid
>
> Could we just add 'kill $all_conn', or use the above pattern with pkill, i.e.
>
> pkill -f "ssh .*$ssh_config"
>
> instead of adding $all_conn and the 'for' loop?
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-05-31 2:43 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-25 7:51 [LTP] [PATCH ltp] network/stress/ssh/ssh-stress01-rmt: fix shellcheck error Yixin Zhang
2018-05-28 14:38 ` Alexey Kodanev
2018-05-31 2:43 ` Zhang, Yixin
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.