Commit 1148c409 authored by Jakub Kicinski's avatar Jakub Kicinski

Merge branch 'selftests-net-groundwork-for-ynl-based-tests'

Jakub Kicinski says:

====================
selftests: net: groundwork for YNL-based tests (YNL prep)

v1: https://lore.kernel.org/all/20240402010520.1209517-1-kuba@kernel.org/
====================

Merge the non-controversial YNL adjustment and spec additions.

Link: https://lore.kernel.org/r/20240403023426.1762996-1-kuba@kernel.orgSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parents 1dee310c b269d2b4
...@@ -16,6 +16,11 @@ definitions: ...@@ -16,6 +16,11 @@ definitions:
name: stringset name: stringset
type: enum type: enum
entries: [] entries: []
-
name: header-flags
enum-name:
type: flags
entries: [ compact-bitsets, omit-reply, stats ]
attribute-sets: attribute-sets:
- -
...@@ -30,6 +35,7 @@ attribute-sets: ...@@ -30,6 +35,7 @@ attribute-sets:
- -
name: flags name: flags
type: u32 type: u32
enum: header-flags
- -
name: bitset-bit name: bitset-bit
......
...@@ -100,9 +100,10 @@ class Netlink: ...@@ -100,9 +100,10 @@ class Netlink:
class NlError(Exception): class NlError(Exception):
def __init__(self, nl_msg): def __init__(self, nl_msg):
self.nl_msg = nl_msg self.nl_msg = nl_msg
self.error = -nl_msg.error
def __str__(self): def __str__(self):
return f"Netlink error: {os.strerror(-self.nl_msg.error)}\n{self.nl_msg}" return f"Netlink error: {os.strerror(self.error)}\n{self.nl_msg}"
class ConfigError(Exception): class ConfigError(Exception):
......
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