hs-test: run containers wit --cap-add=SYS_PTRACE 02/43502/2
authorMatus Fabian <[email protected]>
Wed, 30 Jul 2025 16:22:41 +0000 (12:22 -0400)
committerDave Wallace <[email protected]>
Wed, 30 Jul 2025 20:03:33 +0000 (20:03 +0000)
otherwise you might not be able attach gdb to vpp running in container

Type: test

Change-Id: I4507971123ee67939b3a843916a6d523a2a09801
Signed-off-by: Matus Fabian <[email protected]>
extras/hs-test/infra/container.go

index 5a3f9f3..8ea694d 100644 (file)
@@ -130,7 +130,7 @@ func (c *Container) GetContainerWorkDir() (res string) {
 
 func (c *Container) getContainerArguments() string {
        args := "--ulimit nofile=90000:90000 --cap-add=NET_ADMIN --cap-add=SYS_RESOURCE " +
-               "--cap-add=IPC_LOCK --device /dev/net/tun:/dev/net/tun --device /dev/vhost-net:/dev/vhost-net"
+               "--cap-add=IPC_LOCK --cap-add=SYS_PTRACE --device /dev/net/tun:/dev/net/tun --device /dev/vhost-net:/dev/vhost-net"
        args += c.getVolumesAsCliOption()
        args += c.getEnvVarsAsCliOption()
        if *VppSourceFileDir != "" {
@@ -198,7 +198,7 @@ func (c *Container) Create() error {
                                        },
                                },
                        },
-                       CapAdd:      []string{"NET_ADMIN", "SYS_RESOURCE", "IPC_LOCK"},
+                       CapAdd:      []string{"NET_ADMIN", "SYS_RESOURCE", "IPC_LOCK", "SYS_PTRACE"},
                        NetworkMode: "container:ginkgo",
                        Binds:       c.getVolumesAsSlice(),
                },