All of lore.kernel.org
 help / color / mirror / Atom feed
* [LTP] [PATCH] tirpc: Pass all extra client options to client program
@ 2020-05-20  7:26 Xiao Yang
  2020-05-20 13:25 ` Petr Vorel
  0 siblings, 1 reply; 3+ messages in thread
From: Xiao Yang @ 2020-05-20  7:26 UTC (permalink / raw)
  To: ltp

New rpc_test.sh only passes the first extra client option to
client program if extra client options are two or more.
For example, only "1" is passed into tirpc_rpc_broadcast_exp:
-------------------------------------------
./runltp -f net.tirpc_tests -s tirpc_rpc_broadcast_exp
...
tag=tirpc_rpc_broadcast_exp stime=1589957933
cmdline="rpc_test.sh -s tirpc_svc_1 -c tirpc_rpc_broadcast_exp -e "1 2""
...
rpc_test 1 TFAIL: tirpc_rpc_broadcast_exp 10.0.0.2 536875000 1 failed unexpectedly
-------------------------------------------
For extra client options, use comma as a delimiter in net.tirpc_tests
and replace it with white space in rpc_test.sh

Fixes: 3190368d2df8 ("rpc/rpc_test.sh: Rewrite into new shell API")
Signed-off-by: Xiao Yang <yangx.jy@cn.fujitsu.com>
---
 runtest/net.tirpc_tests                     | 2 +-
 testcases/network/rpc/rpc-tirpc/rpc_test.sh | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/runtest/net.tirpc_tests b/runtest/net.tirpc_tests
index 48e9ba3f5..8aa69ef4d 100644
--- a/runtest/net.tirpc_tests
+++ b/runtest/net.tirpc_tests
@@ -38,7 +38,7 @@ tirpc_clnt_control rpc_test.sh -s tirpc_svc_3 -c tirpc_clnt_control
 tirpc_rpc_reg rpc_test.sh -c tirpc_rpc_reg
 tirpc_rpc_call rpc_test.sh -s tirpc_svc_1 -c tirpc_rpc_call
 tirpc_rpc_broadcast rpc_test.sh -s tirpc_svc_1 -c tirpc_rpc_broadcast
-tirpc_rpc_broadcast_exp rpc_test.sh -s tirpc_svc_1 -c tirpc_rpc_broadcast_exp -e "1 2"
+tirpc_rpc_broadcast_exp rpc_test.sh -s tirpc_svc_1 -c tirpc_rpc_broadcast_exp -e "1,2"
 
 tirpc_clnt_create rpc_test.sh -s tirpc_svc_2 -c tirpc_clnt_create
 tirpc_clnt_create_timed rpc_test.sh -s tirpc_svc_2 -c tirpc_clnt_create_timed
diff --git a/testcases/network/rpc/rpc-tirpc/rpc_test.sh b/testcases/network/rpc/rpc-tirpc/rpc_test.sh
index dc97213d0..bcefadbdb 100755
--- a/testcases/network/rpc/rpc-tirpc/rpc_test.sh
+++ b/testcases/network/rpc/rpc-tirpc/rpc_test.sh
@@ -37,7 +37,7 @@ rpc_parse_args()
 {
 	case "$1" in
 		c) CLIENT="$OPTARG" ;;
-		e) CLIENT_EXTRA_OPTS="$OPTARG" ;;
+		e) CLIENT_EXTRA_OPTS="${OPTARG//','/' '}" ;;
 		s) SERVER="$OPTARG" ;;
 	esac
 }
-- 
2.21.0




^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [LTP] [PATCH] tirpc: Pass all extra client options to client program
  2020-05-20  7:26 [LTP] [PATCH] tirpc: Pass all extra client options to client program Xiao Yang
@ 2020-05-20 13:25 ` Petr Vorel
  2020-05-20 14:17   ` Xiao Yang
  0 siblings, 1 reply; 3+ messages in thread
From: Petr Vorel @ 2020-05-20 13:25 UTC (permalink / raw)
  To: ltp

Hi Yang,

> New rpc_test.sh only passes the first extra client option to
> client program if extra client options are two or more.
> For example, only "1" is passed into tirpc_rpc_broadcast_exp:
> -------------------------------------------
> ./runltp -f net.tirpc_tests -s tirpc_rpc_broadcast_exp
> ...
> tag=tirpc_rpc_broadcast_exp stime=1589957933
> cmdline="rpc_test.sh -s tirpc_svc_1 -c tirpc_rpc_broadcast_exp -e "1 2""
> ...
> rpc_test 1 TFAIL: tirpc_rpc_broadcast_exp 10.0.0.2 536875000 1 failed unexpectedly
> -------------------------------------------
> For extra client options, use comma as a delimiter in net.tirpc_tests
> and replace it with white space in rpc_test.sh

> Fixes: 3190368d2df8 ("rpc/rpc_test.sh: Rewrite into new shell API")
> Signed-off-by: Xiao Yang <yangx.jy@cn.fujitsu.com>

Thanks a lot for a fix!

I replaced bashism in OPTARG handling with sed (otherwise it'd fail on dash) and
merged.

Kind regards,
Petr

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [LTP] [PATCH] tirpc: Pass all extra client options to client program
  2020-05-20 13:25 ` Petr Vorel
@ 2020-05-20 14:17   ` Xiao Yang
  0 siblings, 0 replies; 3+ messages in thread
From: Xiao Yang @ 2020-05-20 14:17 UTC (permalink / raw)
  To: ltp

ON 2020/5/20 21:25, Petr Vorel wrote:
> Hi Yang,
>
>> New rpc_test.sh only passes the first extra client option to
>> client program if extra client options are two or more.
>> For example, only "1" is passed into tirpc_rpc_broadcast_exp:
>> -------------------------------------------
>> ./runltp -f net.tirpc_tests -s tirpc_rpc_broadcast_exp
>> ...
>> tag=tirpc_rpc_broadcast_exp stime=1589957933
>> cmdline="rpc_test.sh -s tirpc_svc_1 -c tirpc_rpc_broadcast_exp -e "1 2""
>> ...
>> rpc_test 1 TFAIL: tirpc_rpc_broadcast_exp 10.0.0.2 536875000 1 failed unexpectedly
>> -------------------------------------------
>> For extra client options, use comma as a delimiter in net.tirpc_tests
>> and replace it with white space in rpc_test.sh
>
>> Fixes: 3190368d2df8 ("rpc/rpc_test.sh: Rewrite into new shell API")
>> Signed-off-by: Xiao Yang<yangx.jy@cn.fujitsu.com>
>
> Thanks a lot for a fix!
>
> I replaced bashism in OPTARG handling with sed (otherwise it'd fail on dash) and
> merged.
Hi Petr,

Thanks for your change.
I will avoid bashism next time.

Best Regards,
Xiao Yang
>
> Kind regards,
> Petr
>
>
> .
>




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-05-20 14:17 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-20  7:26 [LTP] [PATCH] tirpc: Pass all extra client options to client program Xiao Yang
2020-05-20 13:25 ` Petr Vorel
2020-05-20 14:17   ` Xiao Yang

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.