From: Xiao Yang <yangx.jy@cn.fujitsu.com>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH v2 1/1] rpc: TCONF when tests aren't compiled + remove kill warning
Date: Mon, 18 May 2020 21:04:46 +0800 [thread overview]
Message-ID: <5EC287EE.9070508@cn.fujitsu.com> (raw)
In-Reply-To: <20200512201416.8299-1-pvorel@suse.cz>
On 2020/5/13 4:14, Petr Vorel wrote:
> Without this test failure was wrongly reported:
> rpc_test 1 TFAIL: tirpc_rpcb_getaddr 10.0.0.2 536875000 failed unexpectedly
Hi Petr,
Do you know which caused this failure?
Best Regards,
Xiao Yang
>
> 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
>
> Reviewed-by: Alexey Kodanev<alexey.kodanev@oracle.com>
> Signed-off-by: Petr Vorel<pvorel@suse.cz>
> ---
> 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 found
> rpc_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(-)
>
> diff --git a/testcases/network/rpc/rpc-tirpc/rpc_test.sh b/testcases/network/rpc/rpc-tirpc/rpc_test.sh
> index 30cfd2564..dc97213d0 100755
> --- a/testcases/network/rpc/rpc-tirpc/rpc_test.sh
> +++ b/testcases/network/rpc/rpc-tirpc/rpc_test.sh
> @@ -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
next prev parent reply other threads:[~2020-05-18 13:04 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-12 20:14 [LTP] [PATCH v2 1/1] rpc: TCONF when tests aren't compiled + remove kill warning Petr Vorel
2020-05-14 14:47 ` Petr Vorel
2020-05-14 16:05 ` Xiao Yang
2020-05-14 16:52 ` Petr Vorel
2020-05-15 11:45 ` Cyril Hrubis
2020-05-15 12:17 ` Petr Vorel
2020-05-18 13:04 ` Xiao Yang [this message]
2020-05-18 21:42 ` Petr Vorel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5EC287EE.9070508@cn.fujitsu.com \
--to=yangx.jy@cn.fujitsu.com \
--cc=ltp@lists.linux.it \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox