Skip to contentSkip to conversation

selftests: drivers: net: fix name not defined

PATCH Applied Alessandro Zanni 2 participants 2 messages Oct 10, 2024 – Oct 11, 2024

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 selftests: drivers: net: fix name not defined

This fix solves this error, when calling kselftest with targets "drivers/net":

File "tools/testing/selftests/net/lib/py/nsim.py", line 64, in __init__
if e.errno == errno.ENOSPC:
NameError: name 'errno' is not defined

The error was found by running tests manually with the command:
make kselftest TARGETS="drivers/net"

The module errno makes available standard error system symbols.

---

Notes:
v2: added how to run the test

 tools/testing/selftests/net/lib/py/nsim.py | 1 +
 1 file changed, 1 insertion(+)
tools/testing/selftests/net/lib/py/nsim.py +1 -0
index f571a8b3139b..1a8cbe9acc48 100644
@@ -1,5 +1,6 @@
 # SPDX-License-Identifier: GPL-2.0
 
+import errno
 import json
 import os
 import random
Signature · 1 line
2.43.0
#1 lore raw
This patch was applied to netdev/net.git (main) by Jakub Kicinski <[email protected]>:

Hello:

This patch was applied to netdev/net.git (main)
by Jakub Kicinski <[email protected]>:

Quoted 8 lines · On Thu, 10 Oct 2024 20:30:30 +0200 you wrote:

This fix solves this error, when calling kselftest with targets "drivers/net":

File "tools/testing/selftests/net/lib/py/nsim.py", line 64, in __init__
if e.errno == errno.ENOSPC:
NameError: name 'errno' is not defined

[...]

Here is the summary with links:
- [v2] selftests: drivers: net: fix name not defined

    https://git.kernel.org/netdev/net/c/174714f0e505

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html