Skip to content

Commit 6ea8a1c

Browse files
Alez87kuba-moo
authored andcommitted
selftests: net/rds: add module not found
This fix solves this error, when calling kselftest with targets "net/rds": The error was found by running tests manually with the command: make kselftest TARGETS="net/rds" The patch also specifies to import ip() function from the utils module. Signed-off-by: Alessandro Zanni <[email protected]> Reviewed-by: Allison Henderson <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 1d7b2ce commit 6ea8a1c

File tree

1 file changed

+4
-1
lines changed
  • tools/testing/selftests/net/rds

1 file changed

+4
-1
lines changed

tools/testing/selftests/net/rds/test.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,11 @@
1414
import atexit
1515
from pwd import getpwuid
1616
from os import stat
17-
from lib.py import ip
1817

18+
# Allow utils module to be imported from different directory
19+
this_dir = os.path.dirname(os.path.realpath(__file__))
20+
sys.path.append(os.path.join(this_dir, "../"))
21+
from lib.py.utils import ip
1922

2023
libc = ctypes.cdll.LoadLibrary('libc.so.6')
2124
setns = libc.setns

0 commit comments

Comments
 (0)