From: Petr Vorel <pvorel@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH 1/4] net/multicast: Create mcast_setup_normal()
Date: Sat, 6 Feb 2021 20:14:01 +0100 [thread overview]
Message-ID: <YB7qefsNWbCJXUEu@pevik> (raw)
In-Reply-To: <20210205151015.7465-1-pvorel@suse.cz>
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"
+
local addr port
local n=0
next prev parent reply other threads:[~2021-02-06 19:14 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 ` Petr Vorel [this message]
2021-02-10 11:56 ` [LTP] [PATCH 1/4] net/multicast: Create mcast_setup_normal() Alexey Kodanev
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=YB7qefsNWbCJXUEu@pevik \
--to=pvorel@suse.cz \
--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