Commit 5c4c0edc authored by Jakub Kicinski's avatar Jakub Kicinski

tools: ynl: don't append doc of missing type directly to the type

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.
Reviewed-by: default avatarDonald Hunter <donald.hunter@gmail.com>
Link: https://lore.kernel.org/r/20240426003111.359285-1-kuba@kernel.orgSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent ff9ddaa4
...@@ -233,10 +233,9 @@ class NlMsg: ...@@ -233,10 +233,9 @@ class NlMsg:
miss_type = self.extack['miss-type'] miss_type = self.extack['miss-type']
if miss_type in attr_space.attrs_by_val: if miss_type in attr_space.attrs_by_val:
spec = attr_space.attrs_by_val[miss_type] spec = attr_space.attrs_by_val[miss_type]
desc = spec['name'] self.extack['miss-type'] = spec['name']
if 'doc' in spec: if 'doc' in spec:
desc += f" ({spec['doc']})" self.extack['miss-type-doc'] = spec['doc']
self.extack['miss-type'] = desc
def _decode_policy(self, raw): def _decode_policy(self, raw):
policy = {} policy = {}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment