selftests: drivers: hw: Include tc_common.sh in hw_stats_l3
authorPetr Machata <petrm@nvidia.com>
Fri, 12 Apr 2024 17:03:09 +0000 (19:03 +0200)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 16 Apr 2024 10:14:41 +0000 (12:14 +0200)
The tests use the constant TC_HIT_TIMEOUT when waiting on the counter
values. However it does not include tc_common.sh where the counter is
specified. The test has been robust in our testing, which means the counter
is bumped quickly enough that the updated value is available already on the
first iteration. Nevertheless it's not correct. Include tc_common.sh as
appropriate.

Signed-off-by: Petr Machata <petrm@nvidia.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
tools/testing/selftests/drivers/net/hw/hw_stats_l3.sh
tools/testing/selftests/drivers/net/hw/hw_stats_l3_gre.sh

index 7dfc50366c992e273665b6fc5efcc882a3bc6241..67fafefc80bea6c828ed3d6846fd41852f7cac10 100755 (executable)
@@ -50,6 +50,7 @@ ALL_TESTS="
 NUM_NETIFS=4
 lib_dir=$(dirname "$0")
 source "$lib_dir"/../../../net/forwarding/lib.sh
+source "$lib_dir"/../../../net/forwarding/tc_common.sh
 
 h1_create()
 {
index ab8d04855af5c68303b858ba63733f146aedb914..a94d92e1abce6a4ae1ffdd4feca912dc8938fb2e 100755 (executable)
@@ -15,6 +15,7 @@ NUM_NETIFS=6
 lib_dir=$(dirname "$0")
 source "$lib_dir"/../../../net/forwarding/lib.sh
 source "$lib_dir"/../../../net/forwarding/ipip_lib.sh
+source "$lib_dir"/../../../net/forwarding/tc_common.sh
 
 setup_prepare()
 {