rpc: TCONF when tests aren't compiled + remove kill warning
PATCH v2 1/1 rpc: TCONF when tests aren't compiled + remove kill warning
Without this test failure was wrongly reported:rpc_test 1 TFAIL: tirpc_rpcb_getaddr 10.0.0.2 536875000 failed unexpectedly
Also make sure with variable that server has started before trying to kill it.
Kill server with SIGPIPE, should be enough and SIGKILL
produced warning, which might be confused:/opt/ltp/testcases/bin/rpc_test.sh: line 61: 3827 Killed $SERVER $PROGNUMNOSVC
---
Hi,
with this implementation (suggested by Alexey), we get TCONF twice. It's a bit strange, but I'll keep it, because I like that required binary is printed:rpc_test 1 TCONF: 'tirpc_rpcb_getaddr' not foundrpc_test 1 TCONF: LTP compiled without TI-RPC support?
Also added proper detection if kill is needed (related to the change in the commit) and kill with SIGPIPE (unrelated change, I can add it as separate commit).
Kind regards,
Petr
testcases/network/rpc/rpc-tirpc/rpc_test.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
testcases/network/rpc/rpc-tirpc/rpc_test.sh +4 -2
@@ -54,12 +54,13 @@ setup() fi [ -n "$CLIENT" ] || tst_brk TBROK "client program not set" + tst_check_cmds $CLIENT $SERVER || tst_brk TCONF "LTP compiled without TI-RPC support?" } cleanup() { - if [ ! -z "$SERVER" ]; then - pkill -9 $SERVER > /dev/null 2>&1 + if [ "$SERVER_STARTED" ]; then + pkill -13 -x $SERVER $CLEANER $PROGNUMNOSVC fi }
@@ -70,6 +71,7 @@ do_test() if [ -n "$SERVER" ]; then $SERVER $PROGNUMNOSVC & + SERVER_STARTED=1 for i in $(seq 1 10); do rpcinfo -p localhost | grep -q $PROGNUMNOSVC && break
Signature · 1 line
2.26.2
PATCH v2 1/1 rpc: TCONF when tests aren't compiled + remove kill warning
Hi,
Quoted 5 lines
with this implementation (suggested by Alexey), we get TCONF twice. It's a bit strange, but I'll keep it, because I like that required binary is printed:
rpc_test1 TCONF: 'tirpc_rpcb_getaddr' not foundrpc_test1 TCONF: LTP compiled without TI-RPC support?
Please any comment for 2x TCONF. It's a bit strange, but just a tiny detail. I'd like to have this fix in the release.
Kind regards,
Petr
PATCH v2 1/1 rpc: TCONF when tests aren't compiled + remove kill warning
Quoted 9 lines · Petr Vorel
Hi,
Quoted 5 lines
with this implementation (suggested by Alexey), we get TCONF twice. It's a bit strange, but I'll keep it, because I like that required binary is printed:
rpc_test1 TCONF: 'tirpc_rpcb_getaddr' not foundrpc_test1 TCONF: LTP compiled without TI-RPC support?Please any comment for 2x TCONF. It's a bit strange, but just a tiny detail. I'd like to have this fix in the release.
Hi Petr,
Why don't you use tst_cmd_available? like this:
for i in $CLIENT $SERVER; do
??? tst_cmd_available $i || tst_brk TCONF "$i not found.? LTP compiled
without TI-RPC support?"
done
Best Regards,
Xiao Yang
Quoted 5 lines
Kind regards,
Petr
PATCH v2 1/1 rpc: TCONF when tests aren't compiled + remove kill warning
Quoted 8 lines · Petr Vorel
Quoted 7 lines
Hi,
Quoted 5 lines
with this implementation (suggested by Alexey), we get TCONF twice. It's a bit strange, but I'll keep it, because I like that required binary is printed:
rpc_test1 TCONF: 'tirpc_rpcb_getaddr' not foundrpc_test1 TCONF: LTP compiled without TI-RPC support?
Quoted 4 lines
Quoted 2 lines
Please any comment for 2x TCONF. It's a bit strange, but just a tiny detail. I'd like to have this fix in the release.
Hi Petr,
Hi Yang,
Quoted 6 lines
Why don't you use
tst_cmd_available? like this:for i in $CLIENT $SERVER; do
???
tst_cmd_available$i ||tst_brkTCONF "$i not found.? LTP compiled without TI-RPC support?"
Thanks for a review.
Yep, I suggested similar solution in v1
https://patchwork.ozlabs.org/project/ltp/patch/[email protected]/
I like solution from v2 (suggested by Alexey) as more elegant, just 2xTCONF is a bit confusing. But I'm hesitating too much about such a tiny detail :).
Kind regards,
Petr
PATCH v2 1/1 rpc: TCONF when tests aren't compiled + remove kill warning
In reply to Petr VorelHi!
Quoted 7 lines
Quoted 5 lines
with this implementation (suggested by Alexey), we get TCONF twice. It's a bit strange, but I'll keep it, because I like that required binary is printed:
rpc_test1 TCONF: 'tirpc_rpcb_getaddr' not foundrpc_test1 TCONF: LTP compiled without TI-RPC support?Please any comment for 2x TCONF. It's a bit strange, but just a tiny detail. I'd like to have this fix in the release.
I do not really care how many TCONF the test prints as long as the user gets a reasonable message.
With that the patch looks good, acked.
Signature · 2 lines
Cyril Hrubis [email protected]
PATCH v2 1/1 rpc: TCONF when tests aren't compiled + remove kill warning
Hi Cyril,
Quoted 10 lines
Quoted 7 lines
Quoted 5 lines
with this implementation (suggested by Alexey), we get TCONF twice. It's a bit strange, but I'll keep it, because I like that required binary is printed:
rpc_test1 TCONF: 'tirpc_rpcb_getaddr' not foundrpc_test1 TCONF: LTP compiled without TI-RPC support?Please any comment for 2x TCONF. It's a bit strange, but just a tiny detail. I'd like to have this fix in the release.
I do not really care how many TCONF the test prints as long as the user gets a reasonable message.
Yep, it's a really tiny detail.
Quoted 1 line
With that the patch looks good, acked.
Thanks for your review, pushed.
Kind regards,
Petr
PATCH v2 1/1 rpc: TCONF when tests aren't compiled + remove kill warning
In reply to Petr VorelQuoted 2 lines · Petr Vorel
Without this test failure was wrongly reported:
rpc_test1 TFAIL:tirpc_rpcb_getaddr10.0.0.2 536875000 failed unexpectedly
Hi Petr,
Do you know which caused this failure?
Best Regards,
Xiao Yang
Quoted 57 lines
Also make sure with variable that server has started before trying to kill it.
Kill server with SIGPIPE, should be enough and SIGKILL
produced warning, which might be confused:/opt/ltp/testcases/bin/rpc_test.sh: line 61: 3827 Killed $SERVER $PROGNUMNOSVCReviewed-by Alexey Kodanev<[email protected]>Signed-off-by Petr Vorel<[email protected]>---
Hi,with this implementation (suggested by Alexey), we get TCONF twice. It's a bit strange, but I'll keep it, because I like that required binary is printed:
rpc_test1 TCONF: 'tirpc_rpcb_getaddr' not foundrpc_test1 TCONF: LTP compiled without TI-RPC support?Also added proper detection if kill is needed (related to the change in the commit) and kill with SIGPIPE (unrelated change, I can add it as separate commit).
Kind regards,
Petrtestcases/network/rpc/rpc-tirpc/rpc_test.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)testcases/network/rpc/rpc-tirpc/rpc_test.sh +4
-2@@ -54,12 +54,13 @@ setup() fi [ -n "$CLIENT" ] || tst_brk TBROK "client program not set" + tst_check_cmds $CLIENT $SERVER || tst_brk TCONF "LTP compiled without TI-RPC support?" } cleanup() { - if [ ! -z "$SERVER" ]; then - pkill -9 $SERVER> /dev/null 2>&1 + if [ "$SERVER_STARTED" ]; then + pkill -13 -x $SERVER $CLEANER $PROGNUMNOSVC fi }@@ -70,6 +71,7 @@ do_test() if [ -n "$SERVER" ]; then $SERVER $PROGNUMNOSVC& + SERVER_STARTED=1 for i in $(seq 1 10); do rpcinfo -p localhost | grep -q $PROGNUMNOSVC&& break
PATCH v2 1/1 rpc: TCONF when tests aren't compiled + remove kill warning
Hi Xiao,
Quoted 6 lines · Petr Vorel
Quoted 2 lines
Without this test failure was wrongly reported:
rpc_test1 TFAIL:tirpc_rpcb_getaddr10.0.0.2 536875000 failed unexpectedlyHi Petr,
Do you know which caused this failure?
Certain tests compiled with TI-RPC on glibc (not on libtirpc): rpc_pmap_set, rpc_pmap_unset, rpc_svc_register. NOTE glibc implementation is fading out, nothing really important.
Before I just disable these tests, I've asked the experts [1] and posted patchset to show some debug info.
Kind regards,
Petr
[1] https://sourceforge.net/p/libtirpc/mailman/message/37014386/
[2] https://patchwork.ozlabs.org/project/ltp/list/?series=177741&state=*