Netdev List
 help / color / mirror / Atom feed
From: netdev-bot+sashiko@kernel.org
To: anilkaushikwireless@gmail.com
Cc: pablo@netfilter.org, laforge@gnumonks.org,
	donald.hunter@gmail.com, kuba@kernel.org, davem@davemloft.net,
	edumazet@google.com, pabeni@redhat.com, horms@kernel.org,
	andrew+netdev@lunn.ch, shuah@kernel.org,
	osmocom-net-gprs@lists.osmocom.org, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org
Subject: Re: [PATCH net-next v5 3/3] selftests: net: add a test for the gtp netlink family
Date: Tue, 13 Oct 2026 02:48:57 +0000	[thread overview]
Message-ID: <179185973768.434549.10719134041790779224@kernel.org> (raw)
In-Reply-To: <20261012024800.400616-4-anilkaushikwireless@gmail.com>

Thank you for your contribution! Sashiko AI review found 1 potential
issue(s) to consider.

Critical: 0 · High: 0 · Medium: 1 · Low: 0

If you believe none of the issues are legitimate, please reply to each
issue of Medium severity or higher and explain why the AI is wrong.
If any of them are legitimate and you plan to respin, please let patchwork
know by including "pw-bot: cr" as a separate line at the end of your reply
(one such reply per series is enough).

- [Medium] The test does not skip when the kernel lacks GTP support,
  although the commit message says it will.

--

selftests: net: add a test for the gtp netlink family

This adds a Python selftest that uses the gtp ynl spec to exercise the gtp
generic netlink family. It creates a gtp device, then adds, dumps and
deletes PDP contexts by TEI and by MS address. It also adds a GtpFamily
ynl wrapper and registers the test.

> diff --git a/tools/testing/selftests/net/gtp.py b/tools/testing/selftests/net/gtp.py
> new file mode 100755
> index 0000000000000..199bc44091909
> --- /dev/null
> +++ b/tools/testing/selftests/net/gtp.py

[ ... ]

> +_NO_GTP_ERRORS = ("Operation not supported", "Garbage instead of arguments")
> +
> +
> +def _setup(ns):

[ ... ]

> +    try:
> +        ip("link add gtp0 type gtp role ggsn", ns=str(ns))
> +    except CmdExitFailure as e:
> +        # gtp.ko not available, or iproute2 without gtp support: any other
> +        # failure to create the device is a real error.
> +        if not any(msg in e.cmd.stderr for msg in _NO_GTP_ERRORS):
> +            raise
> +        raise KsftSkipEx("no gtp support (CONFIG_GTP, iproute2)") from e

[Severity: Medium]
Will this skip when the kernel has no GTP support? The commit message says
"The test is skipped when the kernel or iproute2 lack GTP support".

With CONFIG_GTP=n, or with gtp.ko not installed, request_module() for
rtnl-link-gtp finds nothing and ops stays NULL. The request then reaches
this branch in __rtnl_newlink() in net/core/rtnetlink.c:

	if (!ops) {
		NL_SET_ERR_MSG(extack, "Unknown device type");
		return -EOPNOTSUPP;
	}

iproute2 requests extended ACKs. When an extack message is present it
prints only "Error: Unknown device type." and returns early, so it never
prints the "RTNETLINK answers: Operation not supported" line.

Neither string in _NO_GTP_ERRORS matches that output. _setup() then
re-raises CmdExitFailure, and add_del_pdp, add_two_pdp and del_unknown_pdp
each report a failure instead of a skip.

The iproute2-without-gtp case ("Garbage instead of arguments") looks like
it is handled correctly. The "Operation not supported" string seems to
match only iproute2 builds without extack support.

Could "Unknown device type" be added to _NO_GTP_ERRORS? Another option is
to check whether the gtp link kind is available before creating the
device.

> +    defer(ip, "link del gtp0", ns=str(ns))
> +    ip("link set gtp0 up", ns=str(ns))

[ ... ]

-- 
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261012024800.400616-1-anilkaushikwireless%40gmail.com

      reply	other threads:[~2026-10-13  2:48 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-12  2:47 [PATCH net-next v5 0/3] gtp: ynl spec for the GTP netlink family, a reply-command fix, and a selftest Anil Kaushik
2026-10-12  2:47 ` [PATCH net-next v5 1/3] gtp: set a valid genl command in PDP context get and dump replies Anil Kaushik
2026-10-12  2:47 ` [PATCH net-next v5 2/3] netlink: specs: add genetlink-legacy spec for GTP Anil Kaushik
2026-10-13  2:48   ` netdev-bot+sashiko
2026-10-12  2:48 ` [PATCH net-next v5 3/3] selftests: net: add a test for the gtp netlink family Anil Kaushik
2026-10-13  2:48   ` netdev-bot+sashiko [this message]

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=179185973768.434549.10719134041790779224@kernel.org \
    --to=netdev-bot+sashiko@kernel.org \
    --cc=andrew+netdev@lunn.ch \
    --cc=anilkaushikwireless@gmail.com \
    --cc=davem@davemloft.net \
    --cc=donald.hunter@gmail.com \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=kuba@kernel.org \
    --cc=laforge@gnumonks.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=osmocom-net-gprs@lists.osmocom.org \
    --cc=pabeni@redhat.com \
    --cc=pablo@netfilter.org \
    --cc=shuah@kernel.org \
    /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