libct: move cmsg helpers to new internal/cmsg package

These helpers all make more sense as a self-contained package and moving
them has the added benefit of removing an unneeded libpathrs dependency
(from libcontainer/utils's import of pathrs-lite) from several test
binaries.

Signed-off-by: Aleksa Sarai <aleksa@amutable.com>
This commit is contained in:
Aleksa Sarai
2026-04-07 19:47:57 +10:00
parent 80fc1cd34e
commit ca509e76ff
10 changed files with 63 additions and 20 deletions
+4 -3
View File
@@ -11,12 +11,13 @@ import (
"testing"
"time"
"golang.org/x/sys/unix"
"github.com/containerd/console"
"github.com/opencontainers/runc/internal/cmsg"
"github.com/opencontainers/runc/libcontainer"
"github.com/opencontainers/runc/libcontainer/configs"
"github.com/opencontainers/runc/libcontainer/utils"
"golang.org/x/sys/unix"
)
func TestExecIn(t *testing.T) {
@@ -272,7 +273,7 @@ func TestExecInTTY(t *testing.T) {
done := make(chan (error))
go func() {
f, err := utils.RecvFile(parent)
f, err := cmsg.RecvFile(parent)
if err != nil {
done <- fmt.Errorf("RecvFile: %w", err)
return