@@ -579,13 +579,14 @@ func TestLongUnixSocketPath_Isolated(t *testing.T) {
579
579
// Verify that if the absolute path of the Firecracker unix sockets are longer
580
580
// than the max length enforced by the kernel (UNIX_PATH_MAX, usually 108), we
581
581
// 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
583
583
// 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).
585
585
const maxUnixSockLen = 108
586
- vmID := strings .Repeat ("x" , 76 )
586
+ namespace := strings .Repeat ("n" , 20 )
587
+ vmID := strings .Repeat ("v" , 64 )
587
588
588
- ctx := namespaces .WithNamespace (context .Background (), "default" )
589
+ ctx := namespaces .WithNamespace (context .Background (), namespace )
589
590
590
591
pluginClient , err := ttrpcutil .NewClient (containerdSockPath + ".ttrpc" )
591
592
require .NoError (t , err , "failed to create ttrpc client" )
@@ -624,7 +625,7 @@ func TestLongUnixSocketPath_Isolated(t *testing.T) {
624
625
625
626
// double-check that the sockets are at the expected path and that their absolute
626
627
// length exceeds 108 bytes
627
- shimDir , err := vm .ShimDir (cfg .ShimBaseDir , "default" , vmID )
628
+ shimDir , err := vm .ShimDir (cfg .ShimBaseDir , namespace , vmID )
628
629
require .NoError (t , err , "failed to get shim dir" )
629
630
630
631
if request .JailerConfig == nil {
0 commit comments