On Sat Sep 12, 2026 at 4:04 PM EDT, Jakub Kicinski wrote:
> dev-get must not report the ifindex outside of the main netns.
> The dev-get checks for an associated namespace are already there,
> add the "no main ifindex" assertion.
>
> Signed-off-by: Jakub Kicinski <[email protected]>
> ---
>  tools/testing/selftests/drivers/net/psp.py | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/tools/testing/selftests/drivers/net/psp.py 
> b/tools/testing/selftests/drivers/net/psp.py
> index 5e87fb50c348..43780efb84ed 100755
> --- a/tools/testing/selftests/drivers/net/psp.py
> +++ b/tools/testing/selftests/drivers/net/psp.py
> @@ -749,6 +749,10 @@ from lib.py import ip
>  
>          ksft_not_none(peer_dev, "No PSP device found with by-association 
> flag in guest netns")
>  
> +        # ifindex of the main netdevice means nothing in this namespace
> +        ksft_true('ifindex' not in peer_dev,
> +                  "ifindex reported to an associated namespace")
> +
>          # Verify assoc-list contains the nk_guest device
>          ksft_true('assoc-list' in peer_dev and len(peer_dev['assoc-list']) > 
> 0,
>                    "Guest device should have assoc-list with local devices")

Reviewed-by: Daniel Zahka <[email protected]>

Reply via email to