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.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
Jakub Kicinski 2024-04-04 10:33:56 -07:00
commit 1148c4098e
2 changed files with 8 additions and 1 deletions

View File

@ -16,6 +16,11 @@ definitions:
name: stringset
type: enum
entries: []
-
name: header-flags
enum-name:
type: flags
entries: [ compact-bitsets, omit-reply, stats ]
attribute-sets:
-
@ -30,6 +35,7 @@ attribute-sets:
-
name: flags
type: u32
enum: header-flags
-
name: bitset-bit

View File

@ -100,9 +100,10 @@ class Netlink:
class NlError(Exception):
def __init__(self, nl_msg):
self.nl_msg = nl_msg
self.error = -nl_msg.error
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):