netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] selftests: net/rds: add module not found
@ 2024-10-10 19:44 Alessandro Zanni
  2024-10-11  5:58 ` Allison Henderson
  2024-10-11 23:10 ` patchwork-bot+netdevbpf
  0 siblings, 2 replies; 3+ messages in thread
From: Alessandro Zanni @ 2024-10-10 19:44 UTC (permalink / raw)
  To: allison.henderson, davem, edumazet, kuba, pabeni, shuah
  Cc: Alessandro Zanni, netdev, linux-rdma, linux-kselftest,
	linux-kernel, skhan, anupnewsmail

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>
---

Notes:
    v2:
      modified the way the parent path is added
      added test to reproduce the error

 tools/testing/selftests/net/rds/test.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/tools/testing/selftests/net/rds/test.py b/tools/testing/selftests/net/rds/test.py
index e6bb109bcead..4a7178d11193 100755
--- a/tools/testing/selftests/net/rds/test.py
+++ b/tools/testing/selftests/net/rds/test.py
@@ -14,8 +14,11 @@ import sys
 import atexit
 from pwd import getpwuid
 from os import stat
-from lib.py import ip
 
+# Allow utils module to be imported from different directory
+this_dir = os.path.dirname(os.path.realpath(__file__))
+sys.path.append(os.path.join(this_dir, "../"))
+from lib.py.utils import ip
 
 libc = ctypes.cdll.LoadLibrary('libc.so.6')
 setns = libc.setns
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH v2] selftests: net/rds: add module not found
  2024-10-10 19:44 [PATCH v2] selftests: net/rds: add module not found Alessandro Zanni
@ 2024-10-11  5:58 ` Allison Henderson
  2024-10-11 23:10 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: Allison Henderson @ 2024-10-11  5:58 UTC (permalink / raw)
  To: shuah@kernel.org, edumazet@google.com, davem@davemloft.net,
	kuba@kernel.org, alessandro.zanni87@gmail.com, pabeni@redhat.com
  Cc: linux-kernel@vger.kernel.org, anupnewsmail@gmail.com,
	netdev@vger.kernel.org, linux-rdma@vger.kernel.org,
	skhan@linuxfoundation.org, linux-kselftest@vger.kernel.org

On Thu, 2024-10-10 at 21:44 +0200, Alessandro Zanni wrote:
> 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>
I think this one looks ok.  Thanks Alessandro!

Reviewed-by: Allison Henderson <allison.henderson@oracle.com>
> ---
> 
> Notes:
>     v2:
>       modified the way the parent path is added
>       added test to reproduce the error
> 
>  tools/testing/selftests/net/rds/test.py | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/tools/testing/selftests/net/rds/test.py
> b/tools/testing/selftests/net/rds/test.py
> index e6bb109bcead..4a7178d11193 100755
> --- a/tools/testing/selftests/net/rds/test.py
> +++ b/tools/testing/selftests/net/rds/test.py
> @@ -14,8 +14,11 @@ import sys
>  import atexit
>  from pwd import getpwuid
>  from os import stat
> -from lib.py import ip
>  
> +# Allow utils module to be imported from different directory
> +this_dir = os.path.dirname(os.path.realpath(__file__))
> +sys.path.append(os.path.join(this_dir, "../"))
> +from lib.py.utils import ip
>  
>  libc = ctypes.cdll.LoadLibrary('libc.so.6')
>  setns = libc.setns


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v2] selftests: net/rds: add module not found
  2024-10-10 19:44 [PATCH v2] selftests: net/rds: add module not found Alessandro Zanni
  2024-10-11  5:58 ` Allison Henderson
@ 2024-10-11 23:10 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2024-10-11 23:10 UTC (permalink / raw)
  To: Alessandro Zanni
  Cc: allison.henderson, davem, edumazet, kuba, pabeni, shuah, netdev,
	linux-rdma, linux-kselftest, linux-kernel, skhan, anupnewsmail

Hello:

This patch was applied to netdev/net.git (main)
by Jakub Kicinski <kuba@kernel.org>:

On Thu, 10 Oct 2024 21:44:17 +0200 you wrote:
> 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.
> 
> [...]

Here is the summary with links:
  - [v2] selftests: net/rds: add module not found
    https://git.kernel.org/netdev/net/c/6ea8a1c28fd3

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-10-11 23:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-10 19:44 [PATCH v2] selftests: net/rds: add module not found Alessandro Zanni
2024-10-11  5:58 ` Allison Henderson
2024-10-11 23:10 ` patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).