* [PATCH net-next] tools: ynl: don't append doc of missing type directly to the type
@ 2024-04-26 0:31 Jakub Kicinski
2024-04-26 15:25 ` Donald Hunter
2024-04-27 0:40 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 3+ messages in thread
From: Jakub Kicinski @ 2024-04-26 0:31 UTC (permalink / raw)
To: davem; +Cc: netdev, edumazet, pabeni, donald.hunter, Jakub Kicinski
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>
---
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 = {}
--
2.44.0
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH net-next] tools: ynl: don't append doc of missing type directly to the type
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
2024-04-27 0:40 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: Donald Hunter @ 2024-04-26 15:25 UTC (permalink / raw)
To: Jakub Kicinski; +Cc: davem, netdev, edumazet, pabeni
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 = {}
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH net-next] tools: ynl: don't append doc of missing type directly to the type
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
@ 2024-04-27 0:40 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2024-04-27 0:40 UTC (permalink / raw)
To: Jakub Kicinski; +Cc: davem, netdev, edumazet, pabeni, donald.hunter
Hello:
This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Thu, 25 Apr 2024 17:31:11 -0700 you wrote:
> 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>
> ---
> tools/net/ynl/lib/ynl.py | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
Here is the summary with links:
- [net-next] tools: ynl: don't append doc of missing type directly to the type
https://git.kernel.org/netdev/net-next/c/5c4c0edca68a
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-04-27 0:40 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2024-04-27 0:40 ` patchwork-bot+netdevbpf
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).