From 16f20abdffa6041382660f1374f25eb9fdfd2fc7 Mon Sep 17 00:00:00 2001 From: Jin Dong Date: Tue, 18 Mar 2025 01:16:07 +0000 Subject: [PATCH] Fix CI lint error Signed-off-by: Jin Dong (cherry picked from commit c8effff1a823bed757194584a80a043c3a69da1a) --- pkg/oci/spec_opts.go | 14 +++++++------- pkg/oci/spec_opts_linux_test.go | 1 - 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/pkg/oci/spec_opts.go b/pkg/oci/spec_opts.go index f7b298122..7e0388882 100644 --- a/pkg/oci/spec_opts.go +++ b/pkg/oci/spec_opts.go @@ -595,13 +595,13 @@ func WithUser(userstr string) SpecOpts { setProcess(s) s.Process.User.AdditionalGids = nil // While the Linux kernel allows the max UID to be MaxUint32 - 2, - // and the OCI Runtime Spec has no definition about the max UID, - // the runc implementation is known to require the UID to be <= MaxInt32. - // - // containerd follows runc's limitation here. - // - // In future we may relax this limitation to allow MaxUint32 - 2, - // or, amend the OCI Runtime Spec to codify the implementation limitation. + // and the OCI Runtime Spec has no definition about the max UID, + // the runc implementation is known to require the UID to be <= MaxInt32. + // + // containerd follows runc's limitation here. + // + // In future we may relax this limitation to allow MaxUint32 - 2, + // or, amend the OCI Runtime Spec to codify the implementation limitation. const ( minUserID = 0 maxUserID = math.MaxInt32 diff --git a/pkg/oci/spec_opts_linux_test.go b/pkg/oci/spec_opts_linux_test.go index d34af356b..a860120e1 100644 --- a/pkg/oci/spec_opts_linux_test.go +++ b/pkg/oci/spec_opts_linux_test.go @@ -105,7 +105,6 @@ guest:x:100:guest }, } for _, testCase := range testCases { - testCase := testCase t.Run(testCase.user, func(t *testing.T) { t.Parallel() s := Spec{