All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexey Kodanev <alexey.kodanev@oracle.com>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH 1/4] net/multicast: Create mcast_setup_normal()
Date: Wed, 10 Feb 2021 14:56:13 +0300	[thread overview]
Message-ID: <5f9aecc2-096b-6b24-bdfa-f9d361fcbac7@oracle.com> (raw)
In-Reply-To: <YB7qefsNWbCJXUEu@pevik>

On 06.02.2021 22:14, Petr Vorel wrote:
> Hi,
> 
>> +++ b/testcases/network/stress/multicast/packet-flood/mcast-pktfld01.sh
>> @@ -8,14 +8,11 @@
>>  # a single socket, then receiving a large number of UDP packets at the socket
> 
>>  TST_NEEDS_ROOT=1
>> +TST_SETUP="mcast_setup_normal"
>>  . mcast-lib.sh
> 
>> -do_setup()
>> -{
>> -	mcast_setup $MCASTNUM_NORMAL
>> -	MCAST_LCMD=ns-mcast_receiver
>> -	MCAST_RCMD=ns-udpsender
>> -}
>> +MCAST_LCMD="ns-mcast_receiver"
>> +MCAST_RCMD="ns-udpsender"
> Actually, this is wrong.
> Variables must be set after setup has been run.
> 
>>  do_test()
>>  {
>> diff --git a/testcases/network/stress/multicast/packet-flood/mcast-pktfld02.sh b/testcases/network/stress/multicast/packet-flood/mcast-pktfld02.sh
>> index 76d184995..2c356917a 100755
>> --- a/testcases/network/stress/multicast/packet-flood/mcast-pktfld02.sh
>> +++ b/testcases/network/stress/multicast/packet-flood/mcast-pktfld02.sh
>> @@ -9,14 +9,11 @@
>>  # packets at each socket
> 
>>  TST_NEEDS_ROOT=1
>> +TST_SETUP="mcast_setup_normal"
>>  . mcast-lib.sh
> 
>> -do_setup()
>> -{
>> -	mcast_setup $MCASTNUM_NORMAL
>> -	MCAST_LCMD=ns-mcast_receiver
>> -	MCAST_RCMD=ns-udpsender
>> -}
>> +MCAST_LCMD="ns-mcast_receiver"
>> +MCAST_RCMD="ns-udpsender"
> And here as well.
> 
> Fix is to move it into test function.
> 
> Kind regards,
> Petr
> 
> diff --git testcases/network/stress/multicast/packet-flood/mcast-pktfld01.sh testcases/network/stress/multicast/packet-flood/mcast-pktfld01.sh
> index 1db7b0605..1b9fe9d79 100755
> --- testcases/network/stress/multicast/packet-flood/mcast-pktfld01.sh
> +++ testcases/network/stress/multicast/packet-flood/mcast-pktfld01.sh
> @@ -11,13 +11,13 @@ TST_NEEDS_ROOT=1
>  TST_SETUP="mcast_setup_normal"
>  . mcast-lib.sh
>  
> -MCAST_LCMD="ns-mcast_receiver"
> -MCAST_RCMD="ns-udpsender"
> -
>  do_test()
>  {
>  	tst_res TINFO "joining an IPv${TST_IPVER} multicast group with a single socket, then receiving a large number of UDP packets at the socket in $NS_DURATION seconds"
>  
> +	MCAST_LCMD="ns-mcast_receiver"
> +	MCAST_RCMD="ns-udpsender"
> +
>  	local addr="$MCAST_IPV4_ADDR"
>  	[ "$TST_IPV6" ] && addr="$MCAST_IPV6_ADDR"
>  
> diff --git testcases/network/stress/multicast/packet-flood/mcast-pktfld02.sh testcases/network/stress/multicast/packet-flood/mcast-pktfld02.sh
> index ee62b347e..9b5de60db 100755
> --- testcases/network/stress/multicast/packet-flood/mcast-pktfld02.sh
> +++ testcases/network/stress/multicast/packet-flood/mcast-pktfld02.sh
> @@ -12,13 +12,13 @@ TST_NEEDS_ROOT=1
>  TST_SETUP="mcast_setup_normal"
>  . mcast-lib.sh
>  
> -MCAST_LCMD="ns-mcast_receiver"
> -MCAST_RCMD="ns-udpsender"
> -
>  do_test()
>  {
>  	tst_res TINFO "joining $MCASTNUM_NORMAL IPv${TST_IPVER} multicast groups on separate sockets, then receiving a large number of UDP packets at each socket in $NS_DURATION seconds"
>  
> +	MCAST_LCMD="ns-mcast_receiver"
> +	MCAST_RCMD="ns-udpsender"
> +

Hi Petr,

Perhaps it would be better to move this to another wrapper
in the lib along with mcast_setup_normal()?

mcast_setup_normal_udp()
{
        mcast_setup_normal
	MCAST_LCMD="ns-mcast_receiver"
	MCAST_RCMD="ns-udpsender"
}

  reply	other threads:[~2021-02-10 11:56 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-05 15:10 [LTP] [PATCH 1/4] net/multicast: Create mcast_setup_normal() Petr Vorel
2021-02-05 15:10 ` [LTP] [PATCH 2/4] net/multicast: Move API variables from setup to tests Petr Vorel
2021-02-05 15:10 ` [LTP] [PATCH 3/4] net/multicast: Remove duplicity Petr Vorel
2021-02-05 15:10 ` [LTP] [PATCH 4/4] net/multicast: Use SPDX-License-Identifier Petr Vorel
2021-02-06 19:14 ` [LTP] [PATCH 1/4] net/multicast: Create mcast_setup_normal() Petr Vorel
2021-02-10 11:56   ` Alexey Kodanev [this message]
2021-02-10 13:08     ` Petr Vorel
2021-02-12 19:26     ` 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=5f9aecc2-096b-6b24-bdfa-f9d361fcbac7@oracle.com \
    --to=alexey.kodanev@oracle.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 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.