* [LTP] [PATCH] net_stress: Fix usage of variables from tst_net.sh
@ 2022-06-27 7:27 Joerg Vehlow
2022-07-14 14:07 ` Joerg Vehlow
0 siblings, 1 reply; 3+ messages in thread
From: Joerg Vehlow @ 2022-06-27 7:27 UTC (permalink / raw)
To: ltp, pvorel; +Cc: Joerg Vehlow
From: Joerg Vehlow <joerg.vehlow@aox.de>
These tests use variables (NS_TIMES, IP_TOTAL, ROUTE_TOTAL
and IF_UPDOWN_TIMES) from tst_net.sh, before sourcing it.
Fixes: 04021637f4749a4797bf105862c45fe07374a161 ("tst_test.sh: Cleanup getopts usage")
Signed-off-by: Joerg Vehlow <joerg.vehlow@aox.de>
---
testcases/network/stress/interface/if-addr-adddel.sh | 7 ++++---
testcases/network/stress/interface/if-addr-addlarge.sh | 7 ++++---
testcases/network/stress/interface/if-route-adddel.sh | 5 +++--
testcases/network/stress/interface/if-route-addlarge.sh | 5 +++--
testcases/network/stress/interface/if-updown.sh | 5 +++--
testcases/network/stress/interface/if4-addr-change.sh | 4 +++-
6 files changed, 20 insertions(+), 13 deletions(-)
diff --git a/testcases/network/stress/interface/if-addr-adddel.sh b/testcases/network/stress/interface/if-addr-adddel.sh
index cb453e612..0750501f0 100755
--- a/testcases/network/stress/interface/if-addr-adddel.sh
+++ b/testcases/network/stress/interface/if-addr-adddel.sh
@@ -7,9 +7,6 @@
IF_CMD='ifconfig'
-# The interval of the check interface activity
-CHECK_INTERVAL=${CHECK_INTERVAL:-$(($NS_TIMES / 20))}
-
test_body()
{
local cmd="$CMD"
@@ -89,4 +86,8 @@ test_body()
}
. if-lib.sh
+
+# The interval of the check interface activity
+CHECK_INTERVAL=${CHECK_INTERVAL:-$(($NS_TIMES / 20))}
+
tst_run
diff --git a/testcases/network/stress/interface/if-addr-addlarge.sh b/testcases/network/stress/interface/if-addr-addlarge.sh
index 3c876c17d..d0759c86b 100755
--- a/testcases/network/stress/interface/if-addr-addlarge.sh
+++ b/testcases/network/stress/interface/if-addr-addlarge.sh
@@ -7,9 +7,6 @@
IF_CMD='ifconfig'
-# The interval of the check interface activity
-CHECK_INTERVAL=${CHECK_INTERVAL:-$(($IP_TOTAL / 20))}
-
test_body()
{
local cmd="$CMD"
@@ -110,4 +107,8 @@ test_body()
}
. if-lib.sh
+
+# The interval of the check interface activity
+CHECK_INTERVAL=${CHECK_INTERVAL:-$(($IP_TOTAL / 20))}
+
tst_run
diff --git a/testcases/network/stress/interface/if-route-adddel.sh b/testcases/network/stress/interface/if-route-adddel.sh
index b50da268a..51445e4f7 100755
--- a/testcases/network/stress/interface/if-route-adddel.sh
+++ b/testcases/network/stress/interface/if-route-adddel.sh
@@ -7,8 +7,6 @@
IF_CMD='route'
-CHECK_INTERVAL=${CHECK_INTERVAL:-$(($NS_TIMES / 20))}
-
test_body()
{
local cmd="$CMD"
@@ -64,4 +62,7 @@ test_body()
}
. if-lib.sh
+
+CHECK_INTERVAL=${CHECK_INTERVAL:-$(($NS_TIMES / 20))}
+
tst_run
diff --git a/testcases/network/stress/interface/if-route-addlarge.sh b/testcases/network/stress/interface/if-route-addlarge.sh
index 7d09d1216..355b6b4ab 100755
--- a/testcases/network/stress/interface/if-route-addlarge.sh
+++ b/testcases/network/stress/interface/if-route-addlarge.sh
@@ -7,8 +7,6 @@
IF_CMD='route'
-CHECK_INTERVAL=${CHECK_INTERVAL:-$(($ROUTE_TOTAL / 20))}
-
test_body()
{
local cmd="$CMD"
@@ -76,4 +74,7 @@ test_body()
}
. if-lib.sh
+
+CHECK_INTERVAL=${CHECK_INTERVAL:-$(($ROUTE_TOTAL / 20))}
+
tst_run
diff --git a/testcases/network/stress/interface/if-updown.sh b/testcases/network/stress/interface/if-updown.sh
index 9a5709c85..71c78d785 100755
--- a/testcases/network/stress/interface/if-updown.sh
+++ b/testcases/network/stress/interface/if-updown.sh
@@ -8,8 +8,6 @@
IF_CMD='ifconfig'
TST_CLEANUP="if_cleanup_restore"
-CHECK_INTERVAL=${CHECK_INTERVAL:-$(($IF_UPDOWN_TIMES / 20))}
-
test_body()
{
local cmd="$CMD"
@@ -47,4 +45,7 @@ test_body()
}
. if-lib.sh
+
+CHECK_INTERVAL=${CHECK_INTERVAL:-$(($IF_UPDOWN_TIMES / 20))}
+
tst_run
diff --git a/testcases/network/stress/interface/if4-addr-change.sh b/testcases/network/stress/interface/if4-addr-change.sh
index b9ece2af9..f162e6a51 100755
--- a/testcases/network/stress/interface/if4-addr-change.sh
+++ b/testcases/network/stress/interface/if4-addr-change.sh
@@ -9,7 +9,6 @@ TST_CLEANUP="do_cleanup"
TST_TESTFUNC="test_body"
TST_NEEDS_CMDS="ifconfig"
-CHECK_INTERVAL=${CHECK_INTERVAL:-$(($NS_TIMES / 20))}
# Maximum host portion of the IPv4 address on the local host
LHOST_IPV4_HOST_MAX="254"
@@ -61,4 +60,7 @@ test_body()
}
. tst_net.sh
+
+CHECK_INTERVAL=${CHECK_INTERVAL:-$(($NS_TIMES / 20))}
+
tst_run
--
2.25.1
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [LTP] [PATCH] net_stress: Fix usage of variables from tst_net.sh
2022-06-27 7:27 [LTP] [PATCH] net_stress: Fix usage of variables from tst_net.sh Joerg Vehlow
@ 2022-07-14 14:07 ` Joerg Vehlow
2022-07-14 17:46 ` Petr Vorel
0 siblings, 1 reply; 3+ messages in thread
From: Joerg Vehlow @ 2022-07-14 14:07 UTC (permalink / raw)
To: ltp, pvorel
Hi Petr,
did you miss this patch (and the other one for memcg/functional with the
same type of bug)?
Joerg
Am 6/27/2022 um 9:27 AM schrieb Joerg Vehlow:
> From: Joerg Vehlow <joerg.vehlow@aox.de>
>
> These tests use variables (NS_TIMES, IP_TOTAL, ROUTE_TOTAL
> and IF_UPDOWN_TIMES) from tst_net.sh, before sourcing it.
>
> Fixes: 04021637f4749a4797bf105862c45fe07374a161 ("tst_test.sh: Cleanup getopts usage")
> Signed-off-by: Joerg Vehlow <joerg.vehlow@aox.de>
> ---
> testcases/network/stress/interface/if-addr-adddel.sh | 7 ++++---
> testcases/network/stress/interface/if-addr-addlarge.sh | 7 ++++---
> testcases/network/stress/interface/if-route-adddel.sh | 5 +++--
> testcases/network/stress/interface/if-route-addlarge.sh | 5 +++--
> testcases/network/stress/interface/if-updown.sh | 5 +++--
> testcases/network/stress/interface/if4-addr-change.sh | 4 +++-
> 6 files changed, 20 insertions(+), 13 deletions(-)
>
> diff --git a/testcases/network/stress/interface/if-addr-adddel.sh b/testcases/network/stress/interface/if-addr-adddel.sh
> index cb453e612..0750501f0 100755
> --- a/testcases/network/stress/interface/if-addr-adddel.sh
> +++ b/testcases/network/stress/interface/if-addr-adddel.sh
> @@ -7,9 +7,6 @@
>
> IF_CMD='ifconfig'
>
> -# The interval of the check interface activity
> -CHECK_INTERVAL=${CHECK_INTERVAL:-$(($NS_TIMES / 20))}
> -
> test_body()
> {
> local cmd="$CMD"
> @@ -89,4 +86,8 @@ test_body()
> }
>
> . if-lib.sh
> +
> +# The interval of the check interface activity
> +CHECK_INTERVAL=${CHECK_INTERVAL:-$(($NS_TIMES / 20))}
> +
> tst_run
> diff --git a/testcases/network/stress/interface/if-addr-addlarge.sh b/testcases/network/stress/interface/if-addr-addlarge.sh
> index 3c876c17d..d0759c86b 100755
> --- a/testcases/network/stress/interface/if-addr-addlarge.sh
> +++ b/testcases/network/stress/interface/if-addr-addlarge.sh
> @@ -7,9 +7,6 @@
>
> IF_CMD='ifconfig'
>
> -# The interval of the check interface activity
> -CHECK_INTERVAL=${CHECK_INTERVAL:-$(($IP_TOTAL / 20))}
> -
> test_body()
> {
> local cmd="$CMD"
> @@ -110,4 +107,8 @@ test_body()
> }
>
> . if-lib.sh
> +
> +# The interval of the check interface activity
> +CHECK_INTERVAL=${CHECK_INTERVAL:-$(($IP_TOTAL / 20))}
> +
> tst_run
> diff --git a/testcases/network/stress/interface/if-route-adddel.sh b/testcases/network/stress/interface/if-route-adddel.sh
> index b50da268a..51445e4f7 100755
> --- a/testcases/network/stress/interface/if-route-adddel.sh
> +++ b/testcases/network/stress/interface/if-route-adddel.sh
> @@ -7,8 +7,6 @@
>
> IF_CMD='route'
>
> -CHECK_INTERVAL=${CHECK_INTERVAL:-$(($NS_TIMES / 20))}
> -
> test_body()
> {
> local cmd="$CMD"
> @@ -64,4 +62,7 @@ test_body()
> }
>
> . if-lib.sh
> +
> +CHECK_INTERVAL=${CHECK_INTERVAL:-$(($NS_TIMES / 20))}
> +
> tst_run
> diff --git a/testcases/network/stress/interface/if-route-addlarge.sh b/testcases/network/stress/interface/if-route-addlarge.sh
> index 7d09d1216..355b6b4ab 100755
> --- a/testcases/network/stress/interface/if-route-addlarge.sh
> +++ b/testcases/network/stress/interface/if-route-addlarge.sh
> @@ -7,8 +7,6 @@
>
> IF_CMD='route'
>
> -CHECK_INTERVAL=${CHECK_INTERVAL:-$(($ROUTE_TOTAL / 20))}
> -
> test_body()
> {
> local cmd="$CMD"
> @@ -76,4 +74,7 @@ test_body()
> }
>
> . if-lib.sh
> +
> +CHECK_INTERVAL=${CHECK_INTERVAL:-$(($ROUTE_TOTAL / 20))}
> +
> tst_run
> diff --git a/testcases/network/stress/interface/if-updown.sh b/testcases/network/stress/interface/if-updown.sh
> index 9a5709c85..71c78d785 100755
> --- a/testcases/network/stress/interface/if-updown.sh
> +++ b/testcases/network/stress/interface/if-updown.sh
> @@ -8,8 +8,6 @@
> IF_CMD='ifconfig'
> TST_CLEANUP="if_cleanup_restore"
>
> -CHECK_INTERVAL=${CHECK_INTERVAL:-$(($IF_UPDOWN_TIMES / 20))}
> -
> test_body()
> {
> local cmd="$CMD"
> @@ -47,4 +45,7 @@ test_body()
> }
>
> . if-lib.sh
> +
> +CHECK_INTERVAL=${CHECK_INTERVAL:-$(($IF_UPDOWN_TIMES / 20))}
> +
> tst_run
> diff --git a/testcases/network/stress/interface/if4-addr-change.sh b/testcases/network/stress/interface/if4-addr-change.sh
> index b9ece2af9..f162e6a51 100755
> --- a/testcases/network/stress/interface/if4-addr-change.sh
> +++ b/testcases/network/stress/interface/if4-addr-change.sh
> @@ -9,7 +9,6 @@ TST_CLEANUP="do_cleanup"
> TST_TESTFUNC="test_body"
> TST_NEEDS_CMDS="ifconfig"
>
> -CHECK_INTERVAL=${CHECK_INTERVAL:-$(($NS_TIMES / 20))}
> # Maximum host portion of the IPv4 address on the local host
> LHOST_IPV4_HOST_MAX="254"
>
> @@ -61,4 +60,7 @@ test_body()
> }
>
> . tst_net.sh
> +
> +CHECK_INTERVAL=${CHECK_INTERVAL:-$(($NS_TIMES / 20))}
> +
> tst_run
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [LTP] [PATCH] net_stress: Fix usage of variables from tst_net.sh
2022-07-14 14:07 ` Joerg Vehlow
@ 2022-07-14 17:46 ` Petr Vorel
0 siblings, 0 replies; 3+ messages in thread
From: Petr Vorel @ 2022-07-14 17:46 UTC (permalink / raw)
To: Joerg Vehlow; +Cc: ltp
Hi Joerg,
> Hi Petr,
> did you miss this patch (and the other one for memcg/functional with the
> same type of bug)?
Thanks for ping and the patches, I indeed overlook them. Both fixes merged.
Kind regards,
Petr
> Joerg
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-07-14 17:46 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-06-27 7:27 [LTP] [PATCH] net_stress: Fix usage of variables from tst_net.sh Joerg Vehlow
2022-07-14 14:07 ` Joerg Vehlow
2022-07-14 17:46 ` Petr Vorel
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.