From: Donald Hunter <donald.hunter@gmail.com>
To: Jakub Kicinski <kuba@kernel.org>
Cc: davem@davemloft.net, netdev@vger.kernel.org,
edumazet@google.com, pabeni@redhat.com
Subject: Re: [PATCH net-next] tools: ynl: don't append doc of missing type directly to the type
Date: Fri, 26 Apr 2024 16:25:03 +0100 [thread overview]
Message-ID: <m2sez8f8og.fsf@gmail.com> (raw)
In-Reply-To: <20240426003111.359285-1-kuba@kernel.org> (Jakub Kicinski's message of "Thu, 25 Apr 2024 17:31:11 -0700")
Jakub Kicinski <kuba@kernel.org> writes:
> When using YNL in tests appending the doc string to the type
> name makes it harder to check that we got the correct error.
> Put the doc under a separate key.
>
> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Reviewed-by: Donald Hunter <donald.hunter@gmail.com>
> ---
> tools/net/ynl/lib/ynl.py | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/tools/net/ynl/lib/ynl.py b/tools/net/ynl/lib/ynl.py
> index 35f82a2c2247..35e666928119 100644
> --- a/tools/net/ynl/lib/ynl.py
> +++ b/tools/net/ynl/lib/ynl.py
> @@ -233,10 +233,9 @@ from .nlspec import SpecFamily
> miss_type = self.extack['miss-type']
> if miss_type in attr_space.attrs_by_val:
> spec = attr_space.attrs_by_val[miss_type]
> - desc = spec['name']
> + self.extack['miss-type'] = spec['name']
> if 'doc' in spec:
> - desc += f" ({spec['doc']})"
> - self.extack['miss-type'] = desc
> + self.extack['miss-type-doc'] = spec['doc']
>
> def _decode_policy(self, raw):
> policy = {}
next prev parent reply other threads:[~2024-04-26 15:25 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-26 0:31 [PATCH net-next] tools: ynl: don't append doc of missing type directly to the type Jakub Kicinski
2024-04-26 15:25 ` Donald Hunter [this message]
2024-04-27 0:40 ` 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=m2sez8f8og.fsf@gmail.com \
--to=donald.hunter@gmail.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.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).