Skip to content

Commit ae73f60

Browse files
author
Kazuyoshi Kato
committed
fix
1 parent 0563969 commit ae73f60

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

runtime/service_integ_test.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -579,13 +579,14 @@ func TestLongUnixSocketPath_Isolated(t *testing.T) {
579579
// Verify that if the absolute path of the Firecracker unix sockets are longer
580580
// than the max length enforced by the kernel (UNIX_PATH_MAX, usually 108), we
581581
// don't fail (due to the internal implementation using relative paths).
582-
// We do this by using the max VMID len (76 chars), which in combination with the
582+
// We do this by using the max VMID len (64 chars), which in combination with the
583583
// default location we store state results in a path like
584-
// "/run/firecracker-containerd/default/<vmID>" (with len 112).
584+
// "/run/firecracker-containerd/<namespace>/<vmID>" (with len 112).
585585
const maxUnixSockLen = 108
586-
vmID := strings.Repeat("x", 76)
586+
namespace := strings.Repeat("n", 20)
587+
vmID := strings.Repeat("v", 64)
587588

588-
ctx := namespaces.WithNamespace(context.Background(), "default")
589+
ctx := namespaces.WithNamespace(context.Background(), namespace)
589590

590591
pluginClient, err := ttrpcutil.NewClient(containerdSockPath + ".ttrpc")
591592
require.NoError(t, err, "failed to create ttrpc client")

0 commit comments

Comments
 (0)