All of lore.kernel.org
 help / color / mirror / Atom feed
From: Petr Vorel <pvorel@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH 1/1] network/stress: Fix using undefined variables in interface tests
Date: Mon, 11 Sep 2017 17:11:04 +0200	[thread overview]
Message-ID: <20170911151104.30692-1-pvorel@suse.cz> (raw)

This is a regression introduced in 364df04c8 ("network/stress: Add
library helper for stress testing")

Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
I'm sorry to introduce this bug.
---
 testcases/network/stress/interface/if-addr-adddel    | 4 ++--
 testcases/network/stress/interface/if-addr-addlarge  | 4 ++--
 testcases/network/stress/interface/if-mtu-change     | 4 ++--
 testcases/network/stress/interface/if-route-adddel   | 4 ++--
 testcases/network/stress/interface/if-route-addlarge | 4 ++--
 testcases/network/stress/interface/if-updown         | 4 ++--
 6 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/testcases/network/stress/interface/if-addr-adddel b/testcases/network/stress/interface/if-addr-adddel
index 3b1ab50bb..4a0501e09 100644
--- a/testcases/network/stress/interface/if-addr-adddel
+++ b/testcases/network/stress/interface/if-addr-adddel
@@ -21,11 +21,11 @@ TST_TOTAL=2
 
 TST_CLEANUP="netstress_cleanup"
 
+. test_net_stress.sh
+
 # The interval of the check interface activity
 CHECK_INTERVAL=${CHECK_INTERVAL:-$(($NS_TIMES / 20))}
 
-. test_net_stress.sh
-
 test_body()
 {
 	local cmd_type=$1
diff --git a/testcases/network/stress/interface/if-addr-addlarge b/testcases/network/stress/interface/if-addr-addlarge
index c3cdb8fa9..a81cf6129 100644
--- a/testcases/network/stress/interface/if-addr-addlarge
+++ b/testcases/network/stress/interface/if-addr-addlarge
@@ -21,11 +21,11 @@ TST_TOTAL=2
 
 TST_CLEANUP="netstress_cleanup"
 
+. test_net_stress.sh
+
 # The interval of the check interface activity
 CHECK_INTERVAL=${CHECK_INTERVAL:-$(($IP_TOTAL / 20))}
 
-. test_net_stress.sh
-
 test_body()
 {
 	local cmd_type=$1
diff --git a/testcases/network/stress/interface/if-mtu-change b/testcases/network/stress/interface/if-mtu-change
index 3658f69ce..15293c4a9 100644
--- a/testcases/network/stress/interface/if-mtu-change
+++ b/testcases/network/stress/interface/if-mtu-change
@@ -21,11 +21,11 @@ TST_TOTAL=2
 
 TST_CLEANUP="do_cleanup"
 
+. test_net_stress.sh
+
 # The interval of the mtu change [second]
 CHANGE_INTERVAL=${CHANGE_INTERVAL:-5}
 
-. test_net_stress.sh
-
 # The array of the value which MTU is changed into sequentially
 # 552 - net.ipv4.route.min_pmtu
 CHANGE_VALUES="784 1142 552 1500 552 1500 552 748 552 1142 1500"
diff --git a/testcases/network/stress/interface/if-route-adddel b/testcases/network/stress/interface/if-route-adddel
index 64366fc52..8c1dfeee2 100644
--- a/testcases/network/stress/interface/if-route-adddel
+++ b/testcases/network/stress/interface/if-route-adddel
@@ -21,10 +21,10 @@ TST_TOTAL=2
 
 TST_CLEANUP="netstress_cleanup"
 
-CHECK_INTERVAL=${CHECK_INTERVAL:-$(($NS_TIMES / 20))}
-
 . test_net_stress.sh
 
+CHECK_INTERVAL=${CHECK_INTERVAL:-$(($NS_TIMES / 20))}
+
 test_body()
 {
 	local cmd_type=$1
diff --git a/testcases/network/stress/interface/if-route-addlarge b/testcases/network/stress/interface/if-route-addlarge
index b7e6952c2..eee0959c8 100644
--- a/testcases/network/stress/interface/if-route-addlarge
+++ b/testcases/network/stress/interface/if-route-addlarge
@@ -21,10 +21,10 @@ TST_TOTAL=2
 
 TST_CLEANUP="netstress_cleanup"
 
-CHECK_INTERVAL=${CHECK_INTERVAL:-$(($ROUTE_TOTAL / 20))}
-
 . test_net_stress.sh
 
+CHECK_INTERVAL=${CHECK_INTERVAL:-$(($ROUTE_TOTAL / 20))}
+
 test_body()
 {
 	local cmd_type=$1
diff --git a/testcases/network/stress/interface/if-updown b/testcases/network/stress/interface/if-updown
index 5ab54a1f8..264331adb 100644
--- a/testcases/network/stress/interface/if-updown
+++ b/testcases/network/stress/interface/if-updown
@@ -21,10 +21,10 @@ TST_TOTAL=2
 
 TST_CLEANUP="netstress_cleanup"
 
-CHECK_INTERVAL=${CHECK_INTERVAL:-$(($IF_UPDOWN_TIMES / 20))}
-
 . test_net_stress.sh
 
+CHECK_INTERVAL=${CHECK_INTERVAL:-$(($IF_UPDOWN_TIMES / 20))}
+
 test_body()
 {
 	local cmd_type=$1
-- 
2.14.1


             reply	other threads:[~2017-09-11 15:11 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-11 15:11 Petr Vorel [this message]
2017-09-13 11:39 ` [LTP] [PATCH 1/1] network/stress: Fix using undefined variables in interface tests Alexey Kodanev

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=20170911151104.30692-1-pvorel@suse.cz \
    --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 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.