From: Vlad Buslov <vladbu@nvidia.com>
To: shaozhengchao <shaozhengchao@huawei.com>
Cc: <pabeni@redhat.com>, <davem@davemloft.net>, <kuba@kernel.org>,
<shuah@kernel.org>, <jhs@mojatatu.com>,
<xiyou.wangcong@gmail.com>, <jiri@resnulli.us>,
<netdev@vger.kernel.org>, <linux-kselftest@vger.kernel.org>,
<marcelo.leitner@gmail.com>, <victor@mojatatu.com>
Subject: Re: [PATCH net 1/4] selftests/tc-testing: Fix Error: Specified qdisc kind is unknown.
Date: Mon, 12 Jun 2023 13:37:59 +0300 [thread overview]
Message-ID: <87h6rdvtxw.fsf@nvidia.com> (raw)
In-Reply-To: <6bcd42ad-4818-dff1-96a7-36b117610e85@huawei.com>
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
next prev parent reply other threads:[~2023-06-12 10:47 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
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
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=87h6rdvtxw.fsf@nvidia.com \
--to=vladbu@nvidia.com \
--cc=davem@davemloft.net \
--cc=jhs@mojatatu.com \
--cc=jiri@resnulli.us \
--cc=kuba@kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=marcelo.leitner@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=shaozhengchao@huawei.com \
--cc=shuah@kernel.org \
--cc=victor@mojatatu.com \
--cc=xiyou.wangcong@gmail.com \
/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;
as well as URLs for NNTP newsgroup(s).