netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net 0/4] Fix small bugs and annoyances in tc-testing
@ 2023-06-12  7:57 Vlad Buslov
  2023-06-12  7:57 ` [PATCH net 1/4] selftests/tc-testing: Fix Error: Specified qdisc kind is unknown Vlad Buslov
                   ` (5 more replies)
  0 siblings, 6 replies; 11+ messages in thread
From: Vlad Buslov @ 2023-06-12  7:57 UTC (permalink / raw)
  To: pabeni, davem, kuba, shuah, jhs, xiyou.wangcong, jiri
  Cc: netdev, linux-kselftest, marcelo.leitner, shaozhengchao, victor,
	Vlad Buslov

Vlad Buslov (4):
  selftests/tc-testing: Fix Error: Specified qdisc kind is unknown.
  selftests/tc-testing: Fix Error: failed to find target LOG
  selftests/tc-testing: Fix SFB db test
  selftests/tc-testing: Remove configs that no longer exist

 tools/testing/selftests/tc-testing/config                   | 6 +-----
 tools/testing/selftests/tc-testing/tc-tests/qdiscs/sfb.json | 4 ++--
 tools/testing/selftests/tc-testing/tdc.sh                   | 1 +
 3 files changed, 4 insertions(+), 7 deletions(-)

-- 
2.39.2


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH net 1/4] selftests/tc-testing: Fix Error: Specified qdisc kind is unknown.
  2023-06-12  7:57 [PATCH net 0/4] Fix small bugs and annoyances in tc-testing Vlad Buslov
@ 2023-06-12  7:57 ` Vlad Buslov
  2023-06-12 10:35   ` shaozhengchao
  2023-06-12 13:22   ` Victor Nogueira
  2023-06-12  7:57 ` [PATCH net 2/4] selftests/tc-testing: Fix Error: failed to find target LOG Vlad Buslov
                   ` (4 subsequent siblings)
  5 siblings, 2 replies; 11+ messages in thread
From: Vlad Buslov @ 2023-06-12  7:57 UTC (permalink / raw)
  To: pabeni, davem, kuba, shuah, jhs, xiyou.wangcong, jiri
  Cc: netdev, linux-kselftest, marcelo.leitner, shaozhengchao, victor,
	Vlad Buslov

All TEQL tests assume that sch_teql module is loaded. Load module in tdc.sh
before running qdisc tests.

Fixes following example error when running tests via tdc.sh for all TEQL
tests:

 # $ sudo ./tdc.py -d eth2 -e 84a0
 #  -- ns/SubPlugin.__init__
 # Test 84a0: Create TEQL with default setting
 # exit: 2
 # exit: 0
 # Error: Specified qdisc kind is unknown.
 #
 # -----> teardown stage *** Could not execute: "$TC qdisc del dev $DUMMY handle 1: root"
 #
 # -----> teardown stage *** Error message: "Error: Invalid handle.
 # "
 # returncode 2; expected [0]
 #
 # -----> teardown stage *** Aborting test run.
 #
 # <_io.BufferedReader name=3> *** stdout ***
 #
 # <_io.BufferedReader name=5> *** stderr ***
 # "-----> teardown stage" did not complete successfully
 # Exception <class '__main__.PluginMgrTestFail'> ('teardown', 'Error: Specified qdisc kind is unknown.\n', '"-----> teardown stage" did not complete successfully') (caught in test_runner, running test 2 84a0 Create TEQL with default setting stage teardown)
 # ---------------
 # traceback
 #   File "/images/src/linux/tools/testing/selftests/tc-testing/./tdc.py", line 495, in test_runner
 #     res = run_one_test(pm, args, index, tidx)
 #   File "/images/src/linux/tools/testing/selftests/tc-testing/./tdc.py", line 434, in run_one_test
 #     prepare_env(args, pm, 'teardown', '-----> teardown stage', tidx['teardown'], procout)
 #   File "/images/src/linux/tools/testing/selftests/tc-testing/./tdc.py", line 245, in prepare_env
 #     raise PluginMgrTestFail(
 # ---------------
 # accumulated output for this test:
 # Error: Specified qdisc kind is unknown.
 #
 # ---------------
 #
 # All test results:
 #
 # 1..1
 # ok 1 84a0 - Create TEQL with default setting # skipped - "-----> teardown stage" did not complete successfully

Fixes: cc62fbe114c9 ("selftests/tc-testing: add selftests for teql qdisc")
Signed-off-by: Vlad Buslov <vladbu@nvidia.com>
---
 tools/testing/selftests/tc-testing/tdc.sh | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tools/testing/selftests/tc-testing/tdc.sh b/tools/testing/selftests/tc-testing/tdc.sh
index afb0cd86fa3d..eb357bd7923c 100755
--- a/tools/testing/selftests/tc-testing/tdc.sh
+++ b/tools/testing/selftests/tc-testing/tdc.sh
@@ -2,5 +2,6 @@
 # SPDX-License-Identifier: GPL-2.0
 
 modprobe netdevsim
+modprobe sch_teql
 ./tdc.py -c actions --nobuildebpf
 ./tdc.py -c qdisc
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH net 2/4] selftests/tc-testing: Fix Error: failed to find target LOG
  2023-06-12  7:57 [PATCH net 0/4] Fix small bugs and annoyances in tc-testing Vlad Buslov
  2023-06-12  7:57 ` [PATCH net 1/4] selftests/tc-testing: Fix Error: Specified qdisc kind is unknown Vlad Buslov
@ 2023-06-12  7:57 ` Vlad Buslov
  2023-06-12  7:57 ` [PATCH net 3/4] selftests/tc-testing: Fix SFB db test Vlad Buslov
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 11+ messages in thread
From: Vlad Buslov @ 2023-06-12  7:57 UTC (permalink / raw)
  To: pabeni, davem, kuba, shuah, jhs, xiyou.wangcong, jiri
  Cc: netdev, linux-kselftest, marcelo.leitner, shaozhengchao, victor,
	Vlad Buslov

Add missing netfilter config dependency.

Fixes following example error when running tests via tdc.sh for all XT
tests:

 # $ sudo ./tdc.py -d eth2 -e 2029
 # Test 2029: Add xt action with log-prefix
 # exit: 255
 # exit: 0
 #  failed to find target LOG
 #
 # bad action parsing
 # parse_action: bad value (7:xt)!
 # Illegal "action"
 #
 # -----> teardown stage *** Could not execute: "$TC actions flush action xt"
 #
 # -----> teardown stage *** Error message: "Error: Cannot flush unknown TC action.
 # We have an error flushing
 # "
 # returncode 1; expected [0]
 #
 # -----> teardown stage *** Aborting test run.
 #
 # <_io.BufferedReader name=3> *** stdout ***
 #
 # <_io.BufferedReader name=5> *** stderr ***
 # "-----> teardown stage" did not complete successfully
 # Exception <class '__main__.PluginMgrTestFail'> ('teardown', ' failed to find target LOG\n\nbad action parsing\nparse_action: bad value (7:xt)!\nIllegal "action"\n', '"-----> teardown stage" did not complete successfully') (caught in test_runner, running test 2 2029 Add xt action with log-prefix stage teardown)
 # ---------------
 # traceback
 #   File "/images/src/linux/tools/testing/selftests/tc-testing/./tdc.py", line 495, in test_runner
 #     res = run_one_test(pm, args, index, tidx)
 #   File "/images/src/linux/tools/testing/selftests/tc-testing/./tdc.py", line 434, in run_one_test
 #     prepare_env(args, pm, 'teardown', '-----> teardown stage', tidx['teardown'], procout)
 #   File "/images/src/linux/tools/testing/selftests/tc-testing/./tdc.py", line 245, in prepare_env
 #     raise PluginMgrTestFail(
 # ---------------
 # accumulated output for this test:
 #  failed to find target LOG
 #
 # bad action parsing
 # parse_action: bad value (7:xt)!
 # Illegal "action"
 #
 # ---------------
 #
 # All test results:
 #
 # 1..1
 # ok 1 2029 - Add xt action with log-prefix # skipped - "-----> teardown stage" did not complete successfully

Fixes: 910d504bc187 ("selftests/tc-testings: add selftests for xt action")
Signed-off-by: Vlad Buslov <vladbu@nvidia.com>
---
 tools/testing/selftests/tc-testing/config | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tools/testing/selftests/tc-testing/config b/tools/testing/selftests/tc-testing/config
index 4638c63a339f..aec4de8bea78 100644
--- a/tools/testing/selftests/tc-testing/config
+++ b/tools/testing/selftests/tc-testing/config
@@ -6,6 +6,7 @@ CONFIG_NF_CONNTRACK_MARK=y
 CONFIG_NF_CONNTRACK_ZONES=y
 CONFIG_NF_CONNTRACK_LABELS=y
 CONFIG_NF_NAT=m
+CONFIG_NETFILTER_XT_TARGET_LOG=m
 
 CONFIG_NET_SCHED=y
 
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH net 3/4] selftests/tc-testing: Fix SFB db test
  2023-06-12  7:57 [PATCH net 0/4] Fix small bugs and annoyances in tc-testing Vlad Buslov
  2023-06-12  7:57 ` [PATCH net 1/4] selftests/tc-testing: Fix Error: Specified qdisc kind is unknown Vlad Buslov
  2023-06-12  7:57 ` [PATCH net 2/4] selftests/tc-testing: Fix Error: failed to find target LOG Vlad Buslov
@ 2023-06-12  7:57 ` Vlad Buslov
  2023-06-12  7:57 ` [PATCH net 4/4] selftests/tc-testing: Remove configs that no longer exist Vlad Buslov
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 11+ messages in thread
From: Vlad Buslov @ 2023-06-12  7:57 UTC (permalink / raw)
  To: pabeni, davem, kuba, shuah, jhs, xiyou.wangcong, jiri
  Cc: netdev, linux-kselftest, marcelo.leitner, shaozhengchao, victor,
	Vlad Buslov

Setting very small value of db like 10ms introduces rounding errors when
converting to/from jiffies on some kernel configs. For example, on 250hz
the actual value will be set to 12ms which causes the test to fail:

 # $ sudo ./tdc.py  -d eth2 -e 3410
 #  -- ns/SubPlugin.__init__
 # Test 3410: Create SFB with db setting
 #
 # All test results:
 #
 # 1..1
 # not ok 1 3410 - Create SFB with db setting
 #         Could not match regex pattern. Verify command output:
 # qdisc sfb 1: root refcnt 2 rehash 600s db 12ms limit 1000p max 25p target 20p increment 0.000503548 decrement 4.57771e-05 penalty_rate 10pps penalty_burst 20p

Set the value to 100ms instead which currently seem to work on 100hz,
250hz, 300hz and 1000hz kernel configs.

Fixes: 6ad92dc56fca ("selftests/tc-testing: add selftests for sfb qdisc")
Signed-off-by: Vlad Buslov <vladbu@nvidia.com>
---
 tools/testing/selftests/tc-testing/tc-tests/qdiscs/sfb.json | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/testing/selftests/tc-testing/tc-tests/qdiscs/sfb.json b/tools/testing/selftests/tc-testing/tc-tests/qdiscs/sfb.json
index ba2f5e79cdbf..e21c7f22c6d4 100644
--- a/tools/testing/selftests/tc-testing/tc-tests/qdiscs/sfb.json
+++ b/tools/testing/selftests/tc-testing/tc-tests/qdiscs/sfb.json
@@ -58,10 +58,10 @@
         "setup": [
             "$IP link add dev $DUMMY type dummy || /bin/true"
         ],
-        "cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root sfb db 10",
+        "cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root sfb db 100",
         "expExitCode": "0",
         "verifyCmd": "$TC qdisc show dev $DUMMY",
-        "matchPattern": "qdisc sfb 1: root refcnt [0-9]+ rehash 600s db 10ms",
+        "matchPattern": "qdisc sfb 1: root refcnt [0-9]+ rehash 600s db 100ms",
         "matchCount": "1",
         "teardown": [
             "$TC qdisc del dev $DUMMY handle 1: root",
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH net 4/4] selftests/tc-testing: Remove configs that no longer exist
  2023-06-12  7:57 [PATCH net 0/4] Fix small bugs and annoyances in tc-testing Vlad Buslov
                   ` (2 preceding siblings ...)
  2023-06-12  7:57 ` [PATCH net 3/4] selftests/tc-testing: Fix SFB db test Vlad Buslov
@ 2023-06-12  7:57 ` Vlad Buslov
  2023-06-12 14:06 ` [PATCH net 0/4] Fix small bugs and annoyances in tc-testing Pedro Tammela
  2023-06-14  3:50 ` patchwork-bot+netdevbpf
  5 siblings, 0 replies; 11+ messages in thread
From: Vlad Buslov @ 2023-06-12  7:57 UTC (permalink / raw)
  To: pabeni, davem, kuba, shuah, jhs, xiyou.wangcong, jiri
  Cc: netdev, linux-kselftest, marcelo.leitner, shaozhengchao, victor,
	Vlad Buslov

Some qdiscs and classifiers have recently been retired from kernel.
However, tc-testing config is still cluttered with them which causes noise
when using merge_config.sh script to update existing config for tc-testing
compatibility. Remove the config settings for affected qdiscs and
classifiers.

Fixes: fb38306ceb9e ("net/sched: Retire ATM qdisc")
Fixes: 051d44209842 ("net/sched: Retire CBQ qdisc")
Fixes: bbe77c14ee61 ("net/sched: Retire dsmark qdisc")
Fixes: 265b4da82dbf ("net/sched: Retire rsvp classifier")
Fixes: 8c710f75256b ("net/sched: Retire tcindex classifier")
Signed-off-by: Vlad Buslov <vladbu@nvidia.com>
---
 tools/testing/selftests/tc-testing/config | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/tools/testing/selftests/tc-testing/config b/tools/testing/selftests/tc-testing/config
index aec4de8bea78..6e73b09c20c8 100644
--- a/tools/testing/selftests/tc-testing/config
+++ b/tools/testing/selftests/tc-testing/config
@@ -13,14 +13,11 @@ CONFIG_NET_SCHED=y
 #
 # Queueing/Scheduling
 #
-CONFIG_NET_SCH_ATM=m
 CONFIG_NET_SCH_CAKE=m
-CONFIG_NET_SCH_CBQ=m
 CONFIG_NET_SCH_CBS=m
 CONFIG_NET_SCH_CHOKE=m
 CONFIG_NET_SCH_CODEL=m
 CONFIG_NET_SCH_DRR=m
-CONFIG_NET_SCH_DSMARK=m
 CONFIG_NET_SCH_ETF=m
 CONFIG_NET_SCH_FQ=m
 CONFIG_NET_SCH_FQ_CODEL=m
@@ -58,8 +55,6 @@ CONFIG_NET_CLS_FLOW=m
 CONFIG_NET_CLS_FLOWER=m
 CONFIG_NET_CLS_MATCHALL=m
 CONFIG_NET_CLS_ROUTE4=m
-CONFIG_NET_CLS_RSVP=m
-CONFIG_NET_CLS_TCINDEX=m
 CONFIG_NET_EMATCH=y
 CONFIG_NET_EMATCH_STACK=32
 CONFIG_NET_EMATCH_CMP=m
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: [PATCH net 1/4] selftests/tc-testing: Fix Error: Specified qdisc kind is unknown.
  2023-06-12  7:57 ` [PATCH net 1/4] selftests/tc-testing: Fix Error: Specified qdisc kind is unknown Vlad Buslov
@ 2023-06-12 10:35   ` shaozhengchao
  2023-06-12 10:37     ` Vlad Buslov
  2023-06-12 13:22   ` Victor Nogueira
  1 sibling, 1 reply; 11+ messages in thread
From: shaozhengchao @ 2023-06-12 10:35 UTC (permalink / raw)
  To: Vlad Buslov, pabeni, davem, kuba, shuah, jhs, xiyou.wangcong, jiri
  Cc: netdev, linux-kselftest, marcelo.leitner, victor



On 2023/6/12 15:57, Vlad Buslov wrote:
> All TEQL tests assume that sch_teql module is loaded. Load module in tdc.sh
> before running qdisc tests.
> 
> Fixes following example error when running tests via tdc.sh for all TEQL
> tests:
> 
>   # $ sudo ./tdc.py -d eth2 -e 84a0
>   #  -- ns/SubPlugin.__init__
>   # Test 84a0: Create TEQL with default setting
>   # exit: 2
>   # exit: 0
>   # Error: Specified qdisc kind is unknown.
>   #
>   # -----> teardown stage *** Could not execute: "$TC qdisc del dev $DUMMY handle 1: root"
>   #
>   # -----> teardown stage *** Error message: "Error: Invalid handle.
>   # "
>   # returncode 2; expected [0]
>   #
>   # -----> teardown stage *** Aborting test run.
>   #
>   # <_io.BufferedReader name=3> *** stdout ***
>   #
>   # <_io.BufferedReader name=5> *** stderr ***
>   # "-----> teardown stage" did not complete successfully
>   # Exception <class '__main__.PluginMgrTestFail'> ('teardown', 'Error: Specified qdisc kind is unknown.\n', '"-----> teardown stage" did not complete successfully') (caught in test_runner, running test 2 84a0 Create TEQL with default setting stage teardown)
>   # ---------------
>   # traceback
>   #   File "/images/src/linux/tools/testing/selftests/tc-testing/./tdc.py", line 495, in test_runner
>   #     res = run_one_test(pm, args, index, tidx)
>   #   File "/images/src/linux/tools/testing/selftests/tc-testing/./tdc.py", line 434, in run_one_test
>   #     prepare_env(args, pm, 'teardown', '-----> teardown stage', tidx['teardown'], procout)
>   #   File "/images/src/linux/tools/testing/selftests/tc-testing/./tdc.py", line 245, in prepare_env
>   #     raise PluginMgrTestFail(
>   # ---------------
>   # accumulated output for this test:
>   # Error: Specified qdisc kind is unknown.
>   #
>   # ---------------
>   #
>   # All test results:
>   #
>   # 1..1
>   # ok 1 84a0 - Create TEQL with default setting # skipped - "-----> teardown stage" did not complete successfully
> 
> Fixes: cc62fbe114c9 ("selftests/tc-testing: add selftests for teql qdisc")
> Signed-off-by: Vlad Buslov <vladbu@nvidia.com>
> ---
>   tools/testing/selftests/tc-testing/tdc.sh | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/tools/testing/selftests/tc-testing/tdc.sh b/tools/testing/selftests/tc-testing/tdc.sh
> index afb0cd86fa3d..eb357bd7923c 100755
> --- a/tools/testing/selftests/tc-testing/tdc.sh
> +++ b/tools/testing/selftests/tc-testing/tdc.sh
> @@ -2,5 +2,6 @@
>   # SPDX-License-Identifier: GPL-2.0
>   
>   modprobe netdevsim
> +modprobe sch_teql
I think not only the sch_teql module needs to be imported, but all test
modules need to be imported before testing. Modifying the config file
looks more appropriate.
>   ./tdc.py -c actions --nobuildebpf
>   ./tdc.py -c qdisc

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH net 1/4] selftests/tc-testing: Fix Error: Specified qdisc kind is unknown.
  2023-06-12 10:35   ` shaozhengchao
@ 2023-06-12 10:37     ` Vlad Buslov
  2023-06-12 10:51       ` shaozhengchao
  0 siblings, 1 reply; 11+ messages in thread
From: Vlad Buslov @ 2023-06-12 10:37 UTC (permalink / raw)
  To: shaozhengchao
  Cc: pabeni, davem, kuba, shuah, jhs, xiyou.wangcong, jiri, netdev,
	linux-kselftest, marcelo.leitner, victor

On Mon 12 Jun 2023 at 18:35, shaozhengchao <shaozhengchao@huawei.com> wrote:
> On 2023/6/12 15:57, Vlad Buslov wrote:
>> All TEQL tests assume that sch_teql module is loaded. Load module in tdc.sh
>> before running qdisc tests.
>> Fixes following example error when running tests via tdc.sh for all TEQL
>> tests:
>>   # $ sudo ./tdc.py -d eth2 -e 84a0
>>   #  -- ns/SubPlugin.__init__
>>   # Test 84a0: Create TEQL with default setting
>>   # exit: 2
>>   # exit: 0
>>   # Error: Specified qdisc kind is unknown.
>>   #
>>   # -----> teardown stage *** Could not execute: "$TC qdisc del dev $DUMMY handle 1: root"
>>   #
>>   # -----> teardown stage *** Error message: "Error: Invalid handle.
>>   # "
>>   # returncode 2; expected [0]
>>   #
>>   # -----> teardown stage *** Aborting test run.
>>   #
>>   # <_io.BufferedReader name=3> *** stdout ***
>>   #
>>   # <_io.BufferedReader name=5> *** stderr ***
>>   # "-----> teardown stage" did not complete successfully
>>   # Exception <class '__main__.PluginMgrTestFail'> ('teardown', 'Error: Specified qdisc kind is unknown.\n', '"-----> teardown stage" did not complete successfully') (caught in test_runner, running test 2 84a0 Create TEQL with default setting stage teardown)
>>   # ---------------
>>   # traceback
>>   #   File "/images/src/linux/tools/testing/selftests/tc-testing/./tdc.py", line 495, in test_runner
>>   #     res = run_one_test(pm, args, index, tidx)
>>   #   File "/images/src/linux/tools/testing/selftests/tc-testing/./tdc.py", line 434, in run_one_test
>>   #     prepare_env(args, pm, 'teardown', '-----> teardown stage', tidx['teardown'], procout)
>>   #   File "/images/src/linux/tools/testing/selftests/tc-testing/./tdc.py", line 245, in prepare_env
>>   #     raise PluginMgrTestFail(
>>   # ---------------
>>   # accumulated output for this test:
>>   # Error: Specified qdisc kind is unknown.
>>   #
>>   # ---------------
>>   #
>>   # All test results:
>>   #
>>   # 1..1
>>   # ok 1 84a0 - Create TEQL with default setting # skipped - "-----> teardown stage" did not complete successfully
>> Fixes: cc62fbe114c9 ("selftests/tc-testing: add selftests for teql qdisc")
>> Signed-off-by: Vlad Buslov <vladbu@nvidia.com>
>> ---
>>   tools/testing/selftests/tc-testing/tdc.sh | 1 +
>>   1 file changed, 1 insertion(+)
>> diff --git a/tools/testing/selftests/tc-testing/tdc.sh
>> b/tools/testing/selftests/tc-testing/tdc.sh
>> index afb0cd86fa3d..eb357bd7923c 100755
>> --- a/tools/testing/selftests/tc-testing/tdc.sh
>> +++ b/tools/testing/selftests/tc-testing/tdc.sh
>> @@ -2,5 +2,6 @@
>>   # SPDX-License-Identifier: GPL-2.0
>>     modprobe netdevsim
>> +modprobe sch_teql
> I think not only the sch_teql module needs to be imported, but all test
> modules need to be imported before testing. Modifying the config file
> looks more appropriate.

All other modules are automatically loaded when first
qdisc/action/classifier is instantiated via their respective APIs. The
problem with two modules that are manually inserted here is that
netdevsim-related tests expect /sys/bus/netdevsim/new_device to exist
(which only exists if netdevsim module has been manually loaded) and
specific command format "$TC qdisc add dev $DUMMY handle 1: root teql0"
failing since 'telq0', again, only exists when sch_telq is loaded.

Overall, I added modprobe here not for theoretical correctness sake but
because running tdc.sh on cold system causes error included in the
commit message for me. I don't get any other errors related to necessary
kernel modules not being loaded for any other kinds of tc tests.

>>   ./tdc.py -c actions --nobuildebpf
>>   ./tdc.py -c qdisc


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH net 1/4] selftests/tc-testing: Fix Error: Specified qdisc kind is unknown.
  2023-06-12 10:37     ` Vlad Buslov
@ 2023-06-12 10:51       ` shaozhengchao
  0 siblings, 0 replies; 11+ messages in thread
From: shaozhengchao @ 2023-06-12 10:51 UTC (permalink / raw)
  To: Vlad Buslov
  Cc: pabeni, davem, kuba, shuah, jhs, xiyou.wangcong, jiri, netdev,
	linux-kselftest, marcelo.leitner, victor



On 2023/6/12 18:37, Vlad Buslov wrote:
> On Mon 12 Jun 2023 at 18:35, shaozhengchao <shaozhengchao@huawei.com> wrote:
>> On 2023/6/12 15:57, Vlad Buslov wrote:
>>> All TEQL tests assume that sch_teql module is loaded. Load module in tdc.sh
>>> before running qdisc tests.
>>> Fixes following example error when running tests via tdc.sh for all TEQL
>>> tests:
>>>    # $ sudo ./tdc.py -d eth2 -e 84a0
>>>    #  -- ns/SubPlugin.__init__
>>>    # Test 84a0: Create TEQL with default setting
>>>    # exit: 2
>>>    # exit: 0
>>>    # Error: Specified qdisc kind is unknown.
>>>    #
>>>    # -----> teardown stage *** Could not execute: "$TC qdisc del dev $DUMMY handle 1: root"
>>>    #
>>>    # -----> teardown stage *** Error message: "Error: Invalid handle.
>>>    # "
>>>    # returncode 2; expected [0]
>>>    #
>>>    # -----> teardown stage *** Aborting test run.
>>>    #
>>>    # <_io.BufferedReader name=3> *** stdout ***
>>>    #
>>>    # <_io.BufferedReader name=5> *** stderr ***
>>>    # "-----> teardown stage" did not complete successfully
>>>    # Exception <class '__main__.PluginMgrTestFail'> ('teardown', 'Error: Specified qdisc kind is unknown.\n', '"-----> teardown stage" did not complete successfully') (caught in test_runner, running test 2 84a0 Create TEQL with default setting stage teardown)
>>>    # ---------------
>>>    # traceback
>>>    #   File "/images/src/linux/tools/testing/selftests/tc-testing/./tdc.py", line 495, in test_runner
>>>    #     res = run_one_test(pm, args, index, tidx)
>>>    #   File "/images/src/linux/tools/testing/selftests/tc-testing/./tdc.py", line 434, in run_one_test
>>>    #     prepare_env(args, pm, 'teardown', '-----> teardown stage', tidx['teardown'], procout)
>>>    #   File "/images/src/linux/tools/testing/selftests/tc-testing/./tdc.py", line 245, in prepare_env
>>>    #     raise PluginMgrTestFail(
>>>    # ---------------
>>>    # accumulated output for this test:
>>>    # Error: Specified qdisc kind is unknown.
>>>    #
>>>    # ---------------
>>>    #
>>>    # All test results:
>>>    #
>>>    # 1..1
>>>    # ok 1 84a0 - Create TEQL with default setting # skipped - "-----> teardown stage" did not complete successfully
>>> Fixes: cc62fbe114c9 ("selftests/tc-testing: add selftests for teql qdisc")
>>> Signed-off-by: Vlad Buslov <vladbu@nvidia.com>
>>> ---
>>>    tools/testing/selftests/tc-testing/tdc.sh | 1 +
>>>    1 file changed, 1 insertion(+)
>>> diff --git a/tools/testing/selftests/tc-testing/tdc.sh
>>> b/tools/testing/selftests/tc-testing/tdc.sh
>>> index afb0cd86fa3d..eb357bd7923c 100755
>>> --- a/tools/testing/selftests/tc-testing/tdc.sh
>>> +++ b/tools/testing/selftests/tc-testing/tdc.sh
>>> @@ -2,5 +2,6 @@
>>>    # SPDX-License-Identifier: GPL-2.0
>>>      modprobe netdevsim
>>> +modprobe sch_teql
>> I think not only the sch_teql module needs to be imported, but all test
>> modules need to be imported before testing. Modifying the config file
>> looks more appropriate.
> 
> All other modules are automatically loaded when first
> qdisc/action/classifier is instantiated via their respective APIs. The
> problem with two modules that are manually inserted here is that
> netdevsim-related tests expect /sys/bus/netdevsim/new_device to exist
> (which only exists if netdevsim module has been manually loaded) and
> specific command format "$TC qdisc add dev $DUMMY handle 1: root teql0"
> failing since 'telq0', again, only exists when sch_telq is loaded.
> 
> Overall, I added modprobe here not for theoretical correctness sake but
> because running tdc.sh on cold system causes error included in the
> commit message for me. I don't get any other errors related to necessary
> kernel modules not being loaded for any other kinds of tc tests.
> 
Fine, it looks good to me. Thank you.

Zhengchao Shao

>>>    ./tdc.py -c actions --nobuildebpf
>>>    ./tdc.py -c qdisc
> 

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH net 1/4] selftests/tc-testing: Fix Error: Specified qdisc kind is unknown.
  2023-06-12  7:57 ` [PATCH net 1/4] selftests/tc-testing: Fix Error: Specified qdisc kind is unknown Vlad Buslov
  2023-06-12 10:35   ` shaozhengchao
@ 2023-06-12 13:22   ` Victor Nogueira
  1 sibling, 0 replies; 11+ messages in thread
From: Victor Nogueira @ 2023-06-12 13:22 UTC (permalink / raw)
  To: Vlad Buslov
  Cc: pabeni, davem, kuba, shuah, jhs, xiyou.wangcong, jiri, netdev,
	linux-kselftest, marcelo.leitner, shaozhengchao

> On Jun 12, 2023, at 04:57, Vlad Buslov <vladbu@nvidia.com> wrote:
> 
> All TEQL tests assume that sch_teql module is loaded. Load module in tdc.sh
> before running qdisc tests.
> 
> Fixes following example error when running tests via tdc.sh for all TEQL
> tests:
> 
> # $ sudo ./tdc.py -d eth2 -e 84a0
> #  -- ns/SubPlugin.__init__
> # Test 84a0: Create TEQL with default setting
> # exit: 2
> # exit: 0
> # Error: Specified qdisc kind is unknown.
> #
> # -----> teardown stage *** Could not execute: "$TC qdisc del dev $DUMMY handle 1: root"
> #
> # -----> teardown stage *** Error message: "Error: Invalid handle.
> # "
> # returncode 2; expected [0]
> #
> # -----> teardown stage *** Aborting test run.
> #
> # <_io.BufferedReader name=3> *** stdout ***
> #
> # <_io.BufferedReader name=5> *** stderr ***
> # "-----> teardown stage" did not complete successfully
> # Exception <class '__main__.PluginMgrTestFail'> ('teardown', 'Error: Specified qdisc kind is unknown.\n', '"-----> teardown stage" did not complete successfully') (caught in test_runner, running test 2 84a0 Create TEQL with default setting stage teardown)
> # ---------------
> # traceback
> #   File "/images/src/linux/tools/testing/selftests/tc-testing/./tdc.py", line 495, in test_runner
> #     res = run_one_test(pm, args, index, tidx)
> #   File "/images/src/linux/tools/testing/selftests/tc-testing/./tdc.py", line 434, in run_one_test
> #     prepare_env(args, pm, 'teardown', '-----> teardown stage', tidx['teardown'], procout)
> #   File "/images/src/linux/tools/testing/selftests/tc-testing/./tdc.py", line 245, in prepare_env
> #     raise PluginMgrTestFail(
> # ---------------
> # accumulated output for this test:
> # Error: Specified qdisc kind is unknown.
> #
> # ---------------
> #
> # All test results:
> #
> # 1..1
> # ok 1 84a0 - Create TEQL with default setting # skipped - "-----> teardown stage" did not complete successfully
> 
> Fixes: cc62fbe114c9 ("selftests/tc-testing: add selftests for teql qdisc")
> Signed-off-by: Vlad Buslov <vladbu@nvidia.com>

Reviewed-by: Victor Nogueira <victor@mojatatu.com>

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH net 0/4] Fix small bugs and annoyances in tc-testing
  2023-06-12  7:57 [PATCH net 0/4] Fix small bugs and annoyances in tc-testing Vlad Buslov
                   ` (3 preceding siblings ...)
  2023-06-12  7:57 ` [PATCH net 4/4] selftests/tc-testing: Remove configs that no longer exist Vlad Buslov
@ 2023-06-12 14:06 ` Pedro Tammela
  2023-06-14  3:50 ` patchwork-bot+netdevbpf
  5 siblings, 0 replies; 11+ messages in thread
From: Pedro Tammela @ 2023-06-12 14:06 UTC (permalink / raw)
  To: Vlad Buslov, pabeni, davem, kuba, shuah, jhs, xiyou.wangcong, jiri
  Cc: netdev, linux-kselftest, marcelo.leitner, shaozhengchao, victor

On 12/06/2023 04:57, Vlad Buslov wrote:
> Vlad Buslov (4):
>    selftests/tc-testing: Fix Error: Specified qdisc kind is unknown.
>    selftests/tc-testing: Fix Error: failed to find target LOG
>    selftests/tc-testing: Fix SFB db test
>    selftests/tc-testing: Remove configs that no longer exist
> 
>   tools/testing/selftests/tc-testing/config                   | 6 +-----
>   tools/testing/selftests/tc-testing/tc-tests/qdiscs/sfb.json | 4 ++--
>   tools/testing/selftests/tc-testing/tdc.sh                   | 1 +
>   3 files changed, 4 insertions(+), 7 deletions(-)
> 

LGTM,

Reviewed-by: Pedro Tammela <pctammela@mojatatu.com>

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH net 0/4] Fix small bugs and annoyances in tc-testing
  2023-06-12  7:57 [PATCH net 0/4] Fix small bugs and annoyances in tc-testing Vlad Buslov
                   ` (4 preceding siblings ...)
  2023-06-12 14:06 ` [PATCH net 0/4] Fix small bugs and annoyances in tc-testing Pedro Tammela
@ 2023-06-14  3:50 ` patchwork-bot+netdevbpf
  5 siblings, 0 replies; 11+ messages in thread
From: patchwork-bot+netdevbpf @ 2023-06-14  3:50 UTC (permalink / raw)
  To: Vlad Buslov
  Cc: pabeni, davem, kuba, shuah, jhs, xiyou.wangcong, jiri, netdev,
	linux-kselftest, marcelo.leitner, shaozhengchao, victor

Hello:

This series was applied to netdev/net.git (main)
by Jakub Kicinski <kuba@kernel.org>:

On Mon, 12 Jun 2023 09:57:08 +0200 you wrote:
> Vlad Buslov (4):
>   selftests/tc-testing: Fix Error: Specified qdisc kind is unknown.
>   selftests/tc-testing: Fix Error: failed to find target LOG
>   selftests/tc-testing: Fix SFB db test
>   selftests/tc-testing: Remove configs that no longer exist
> 
>  tools/testing/selftests/tc-testing/config                   | 6 +-----
>  tools/testing/selftests/tc-testing/tc-tests/qdiscs/sfb.json | 4 ++--
>  tools/testing/selftests/tc-testing/tdc.sh                   | 1 +
>  3 files changed, 4 insertions(+), 7 deletions(-)

Here is the summary with links:
  - [net,1/4] selftests/tc-testing: Fix Error: Specified qdisc kind is unknown.
    https://git.kernel.org/netdev/net/c/aef6e908b542
  - [net,2/4] selftests/tc-testing: Fix Error: failed to find target LOG
    https://git.kernel.org/netdev/net/c/b849c566ee9c
  - [net,3/4] selftests/tc-testing: Fix SFB db test
    https://git.kernel.org/netdev/net/c/b39d8c41c7a8
  - [net,4/4] selftests/tc-testing: Remove configs that no longer exist
    https://git.kernel.org/netdev/net/c/11b8b2e70a9b

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2023-06-14  3:50 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-12  7:57 [PATCH net 0/4] Fix small bugs and annoyances in tc-testing Vlad Buslov
2023-06-12  7:57 ` [PATCH net 1/4] selftests/tc-testing: Fix Error: Specified qdisc kind is unknown Vlad Buslov
2023-06-12 10:35   ` shaozhengchao
2023-06-12 10:37     ` Vlad Buslov
2023-06-12 10:51       ` shaozhengchao
2023-06-12 13:22   ` Victor Nogueira
2023-06-12  7:57 ` [PATCH net 2/4] selftests/tc-testing: Fix Error: failed to find target LOG Vlad Buslov
2023-06-12  7:57 ` [PATCH net 3/4] selftests/tc-testing: Fix SFB db test Vlad Buslov
2023-06-12  7:57 ` [PATCH net 4/4] selftests/tc-testing: Remove configs that no longer exist Vlad Buslov
2023-06-12 14:06 ` [PATCH net 0/4] Fix small bugs and annoyances in tc-testing Pedro Tammela
2023-06-14  3:50 ` patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).