OpenVZ / Virtuozzo kernel development (devel@openvz.org)
 help / color / mirror / Atom feed
From: Konstantin Khorenko <khorenko@virtuozzo.com>
To: Eva Kurchatova <eva.kurchatova@virtuozzo.com>
Cc: devel@openvz.org
Subject: Re: [Devel] [PATCH vz10 2/4] selftests: net: py: add the missing ksft_is() and ksft_not_in() helpers
Date: Thu, 24 Sep 2026 15:27:52 +0200	[thread overview]
Message-ID: <a1834645-ab78-460e-9d56-73c2ef7d1dac@virtuozzo.com> (raw)
In-Reply-To: <20260831225137.1642608-2-eva.kurchatova@virtuozzo.com>

Committed to branch-rh10-6.12.0-211.52.1.22.x.vz10-ovz, will be released in rh10-6.12.0-211.52.1.22.3.vz10

5cf658d7912e



selftests: net: py: add the missing ksft_is() and ksft_not_in() helpers
rss_api.py and rss_flow_label.py call ksft_is() and ksft_not_in(), and
drivers/net/lib/py/__init__.py and drivers/net/hw/lib/py/__init__.py
import both by name from net.lib.py, but ksft.py never defined them, so
importing the library fails and every test of the group goes down with
it:
  ImportError: cannot import name 'ksft_is' from 'net.lib.py'
The tests and the imports came in with the RHEL10 import, commit
9f055df11343 ("rh10: import RHEL10 kernel-6.12.0-211.16.1.el10"), the
helpers did not. Take them from the commits that added them upstream,
commit 31eae6d99587 ("selftests: drv-net: test drivers sleeping in
ndo_get_stats64") for ksft_is() and commit 4fde8398462f ("selftests:
drv-net: improve the use of ksft helpers in XSK queue test") for
ksft_not_in(). The tests those commits add are left out.
https://virtuozzo.atlassian.net/browse/VSTOR-139651
Feature: fix selftests
Signed-off-by: Eva Kurchatova <eva.kurchatova@virtuozzo.com>
Link: http://lore.virtuozzo.com/20260831225137.1642608-2-eva.kurchatova@virtuozzo.com

--
Best regards,

Konstantin Khorenko,
Virtuozzo Linux Kernel Team

On 9/1/26 00:50, Eva Kurchatova wrote:
> rss_api.py and rss_flow_label.py call ksft_is() and ksft_not_in(), and
> net/lib/py/__init__.py exports both, but ksft.py never defined them, so
> importing the library fails and every test of the group goes down with
> it:
> 
>   ImportError: cannot import name 'ksft_is' from 'net.lib.py'
> 
> The tests and the export came in with the RHEL10 import, commit
> 9f055df11343 ("rh10: import RHEL10 kernel-6.12.0-211.16.1.el10"), the
> helpers did not. Take them from the commits that added them upstream,
> commit 31eae6d99587 ("selftests: drv-net: test drivers sleeping in
> ndo_get_stats64") for ksft_is() and commit 4fde8398462f ("selftests:
> drv-net: improve the use of ksft helpers in XSK queue test") for
> ksft_not_in(). The tests those commits add are left out.
> 
> https://virtuozzo.atlassian.net/browse/VSTOR-139651
> Feature: fix vz selftests
> Signed-off-by: Eva Kurchatova <eva.kurchatova@virtuozzo.com>
> ---
>  tools/testing/selftests/net/lib/py/ksft.py | 10 ++++++++++
>  1 file changed, 10 insertions(+)
> 
> diff --git a/tools/testing/selftests/net/lib/py/ksft.py b/tools/testing/selftests/net/lib/py/ksft.py
> index 7b50111340bb..61287c203b6e 100644
> --- a/tools/testing/selftests/net/lib/py/ksft.py
> +++ b/tools/testing/selftests/net/lib/py/ksft.py
> @@ -76,6 +76,16 @@ def ksft_in(a, b, comment=""):
>          _fail("Check failed", a, "not in", b, comment)
>  
>  
> +def ksft_not_in(a, b, comment=""):
> +    if a in b:
> +        _fail("Check failed", a, "in", b, comment)
> +
> +
> +def ksft_is(a, b, comment=""):
> +    if a is not b:
> +        _fail("Check failed", a, "is not", b, comment)
> +
> +
>  def ksft_ge(a, b, comment=""):
>      if a < b:
>          _fail("Check failed", a, "<", b, comment)

_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel

  reply	other threads:[~2026-09-24 13:29 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-31 22:50 [Devel] [PATCH vz10 1/4] ms/selftests: net: Add python context manager for netns entering Eva Kurchatova
2026-08-31 22:50 ` [Devel] [PATCH vz10 2/4] selftests: net: py: add the missing ksft_is() and ksft_not_in() helpers Eva Kurchatova
2026-09-24 13:27   ` Konstantin Khorenko [this message]
2026-08-31 22:50 ` [Devel] [PATCH vz10 3/4] selftests: net: py: report a refused environment as a skip Eva Kurchatova
2026-09-24 13:28   ` Konstantin Khorenko
2026-08-31 22:50 ` [Devel] [PATCH vz10 4/4] selftests: drv-net-hw: skip the tests that need a real interface Eva Kurchatova
2026-09-24 13:23   ` Konstantin Khorenko
2026-09-24 13:29   ` Konstantin Khorenko
2026-09-24 13:27 ` [Devel] [PATCH vz10 1/4] ms/selftests: net: Add python context manager for netns entering Konstantin Khorenko

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=a1834645-ab78-460e-9d56-73c2ef7d1dac@virtuozzo.com \
    --to=khorenko@virtuozzo.com \
    --cc=devel@openvz.org \
    --cc=eva.kurchatova@virtuozzo.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