Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <alessandro.zanni87@gmail.com>
Reviewed-by: Allison Henderson <allison.henderson@oracle.com>
Link: https://patch.msgid.link/20241010194421.48198-1-alessandro.zanni87@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Alessandro Zanni and committed by
Jakub Kicinski
6ea8a1c2 1d7b2ce4

+4 -1
+4 -1
tools/testing/selftests/net/rds/test.py
··· 14 14 import atexit 15 15 from pwd import getpwuid 16 16 from os import stat 17 - from lib.py import ip 18 17 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 19 22 20 23 libc = ctypes.cdll.LoadLibrary('libc.so.6') 21 24 setns = libc.setns