Thread (27 messages) 27 messages, 4 authors, 2026-01-14

Re: [PATCH net-next v14 05/12] selftests/vsock: add namespace helpers to vmtest.sh

From: Stefano Garzarella <sgarzare@redhat.com>
Date: 2026-01-13 15:53:33
Also in: kvm, linux-hyperv, linux-kselftest, lkml, virtualization

On Mon, Jan 12, 2026 at 07:11:14PM -0800, Bobby Eshleman wrote:
From: Bobby Eshleman <redacted>

Add functions for initializing namespaces with the different vsock NS
modes. Callers can use add_namespaces() and del_namespaces() to create
namespaces global0, global1, local0, and local1.

The add_namespaces() function initializes global0, local0, etc... with
their respective vsock NS mode by toggling child_ns_mode before creating
the namespace.

Remove namespaces upon exiting the program in cleanup(). This is
unlikely to be needed for a healthy run, but it is useful for tests that
are manually killed mid-test.

This patch is in preparation for later namespace tests.

Signed-off-by: Bobby Eshleman <redacted>
---
Changes in v13:
- intialize namespaces to use the child_ns_mode mechanism
- remove setting modes from init_namespaces() function (this function
 only sets up the lo device now)
- remove ns_set_mode(ns) because ns_mode is no longer mutable
---
tools/testing/selftests/vsock/vmtest.sh | 32 ++++++++++++++++++++++++++++++++
1 file changed, 32 insertions(+)
Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help