MPTCP Linux Development
 help / color / mirror / Atom feed
From: Matthieu Baerts <matttbe@kernel.org>
To: Geliang Tang <geliang@kernel.org>, mptcp@lists.linux.dev
Cc: Geliang Tang <tanggeliang@kylinos.cn>
Subject: Re: [PATCH mptcp-net] selftests: mptcp: don't exit when a symbol not found
Date: Thu, 22 Feb 2024 09:58:39 +0100	[thread overview]
Message-ID: <338c256c-1492-4ea8-8d3d-eca7e075b0ef@kernel.org> (raw)
In-Reply-To: <37d9862958848f8f3737eafd1b1ea0bdb63acd91.1708588566.git.tanggeliang@kylinos.cn>

Hi Geliang,

On 22/02/2024 8:56 am, Geliang Tang wrote:
> From: Geliang Tang <tanggeliang@kylinos.cn>
> 
> mptcp_lib_kallsyms_has() will always exit when a symbol has not found, it
> breaks the test itself. Unexpected errors occur:
> 
>  007 userspace pm add & remove address
>        syn                                 [ OK ]
>        synack                              [ OK ]
>        ack                                 [ OK ]
>        add                                 [ OK ]
>        echo                                [ OK ]
>        mptcp_info subflows=2:2             [ OK ]
>        mptcp_info subflows_total=3:3       [ OK ]
>        mptcp_info add_addr_signal=2:2      [ OK ]
>        mptcp_info last_data_sent=191:18    [ OK ]
>        mptcp_info last_data_recv=40:68     [ OK ]
>        mptcp_info last_ack_recv=93:74      [ OK ]
>        dump addrs signal                   ERROR: missing feature: \
> 			mptcp_userspace_pm_dump_addr$ symbol not found
>  Cannot open network namespace "ns1-65d6fb5a-5FviVK": \
> 			No such file or directory
>  Cannot open network namespace "ns2-65d6fb5a-5FviVK": \
> 			No such file or directory
>  cmp: /tmp/tmp.a7osJs7Nj0: No such file or directory
>  cmp: /tmp/tmp.f02z6brCQu: No such file or directory
>  cat: /tmp/tmp.27TzxD2efV: No such file or directory
> not ok 1 test: selftest_mptcp_join # FAIL
> 
> To fix this, this patch adds a new argument 'continue' for the helper
> mptcp_lib_fail_if_expected_feature() to control whether exit or not.
> 
> Always set this argument to 1 in mptcp_lib_kallsyms_has().
> 
> Fixes: 83013bdf90a ("selftests: mptcp: connect: skip if MPTCP is not supported")

I'm not sure to understand why you sent this :)

The fixes commit ('d' is missing at the beginning) here mentions:

> Note that this check can also
> mark the test as failed if 'SELFTESTS_MPTCP_LIB_EXPECT_ALL_FEATURES' env
> var is set to 1: by doing that, we can make sure a test is not being
> skipped by mistake.

So the goal is to fail when the env var is set. Otherwise, we would miss
tests that are skipped by accident.

If you use 'mptcp-upstream-virtme-docker' and you want to run recent
selftests on an older kernel, you can add this to the docker command not
to exit if a feature is missing:

  -e INPUT_SELFTESTS_MPTCP_LIB_EXPECT_ALL_FEATURES=0

But clearly here, we don't want to continue if we expect all features to
work!

Cheers,
Matt
-- 
Sponsored by the NGI0 Core fund.

  parent reply	other threads:[~2024-02-22  8:58 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-22  7:56 [PATCH mptcp-net] selftests: mptcp: don't exit when a symbol not found Geliang Tang
2024-02-22  8:51 ` selftests: mptcp: don't exit when a symbol not found: Tests Results MPTCP CI
2024-02-22  8:58 ` Matthieu Baerts [this message]
2024-02-22 10:31   ` [PATCH mptcp-net] selftests: mptcp: don't exit when a symbol not found Geliang Tang
2024-02-22 10:49     ` Matthieu Baerts
2024-02-26  1:55       ` Geliang Tang

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=338c256c-1492-4ea8-8d3d-eca7e075b0ef@kernel.org \
    --to=matttbe@kernel.org \
    --cc=geliang@kernel.org \
    --cc=mptcp@lists.linux.dev \
    --cc=tanggeliang@kylinos.cn \
    /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