fix duplicate words (dupwords)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
6c10086976
commit
4adc40ac40
33 changed files with 52 additions and 41 deletions
|
@ -238,13 +238,13 @@ type TopologyRequirement struct {
|
|||
// If requisite is specified, all topologies in preferred list MUST
|
||||
// also be present in the list of requisite topologies.
|
||||
//
|
||||
// If the SP is unable to to make the provisioned volume available
|
||||
// If the SP is unable to make the provisioned volume available
|
||||
// from any of the preferred topologies, the SP MAY choose a topology
|
||||
// from the list of requisite topologies.
|
||||
// If the list of requisite topologies is not specified, then the SP
|
||||
// MAY choose from the list of all possible topologies.
|
||||
// If the list of requisite topologies is specified and the SP is
|
||||
// unable to to make the provisioned volume available from any of the
|
||||
// unable to make the provisioned volume available from any of the
|
||||
// requisite topologies it MUST fail the CreateVolume call.
|
||||
//
|
||||
// Example 1:
|
||||
|
|
|
@ -15,7 +15,7 @@ import (
|
|||
)
|
||||
|
||||
var (
|
||||
testBuf = []byte("Buffalo buffalo Buffalo buffalo buffalo buffalo Buffalo buffalo")
|
||||
testBuf = []byte("Buffalo1 buffalo2 Buffalo3 buffalo4 buffalo5 buffalo6 Buffalo7 buffalo8")
|
||||
testBufSize = len(testBuf)
|
||||
)
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ import (
|
|||
"sync"
|
||||
)
|
||||
|
||||
// attachContext is the context used for for attach calls.
|
||||
// attachContext is the context used for attach calls.
|
||||
type attachContext struct {
|
||||
mu sync.Mutex
|
||||
ctx context.Context
|
||||
|
|
|
@ -20,6 +20,7 @@ import (
|
|||
is "gotest.tools/v3/assert/cmp"
|
||||
)
|
||||
|
||||
//nolint:dupword
|
||||
const mountsFixture = `142 78 0:38 / / rw,relatime - aufs none rw,si=573b861da0b3a05b,dio
|
||||
143 142 0:60 / /proc rw,nosuid,nodev,noexec,relatime - proc proc rw
|
||||
144 142 0:67 / /dev rw,nosuid - tmpfs tmpfs rw,mode=755
|
||||
|
@ -58,6 +59,7 @@ const mountsFixture = `142 78 0:38 / / rw,relatime - aufs none rw,si=573b861da0b
|
|||
310 142 0:60 / /run/docker/netns/71a18572176b rw,nosuid,nodev,noexec,relatime - proc proc rw
|
||||
`
|
||||
|
||||
//nolint:dupword
|
||||
const mountsFixtureOverlay2 = `23 28 0:22 / /sys rw,nosuid,nodev,noexec,relatime shared:7 - sysfs sysfs rw
|
||||
24 28 0:4 / /proc rw,nosuid,nodev,noexec,relatime shared:13 - proc proc rw
|
||||
25 28 0:6 / /dev rw,nosuid,relatime shared:2 - devtmpfs udev rw,size=491380k,nr_inodes=122845,mode=755
|
||||
|
|
|
@ -111,7 +111,7 @@ func (daemon *Daemon) killWithSignal(container *containerpkg.Container, stopSign
|
|||
// We need to clean up this container but it is possible there is a case where we hit here before the exit event is processed
|
||||
// but after it was fired off.
|
||||
// So let's wait the container's stop timeout amount of time to see if the event is eventually processed.
|
||||
// Doing this has the side effect that if no event was ever going to come we are waiting a a longer period of time uneccessarily.
|
||||
// Doing this has the side effect that if no event was ever going to come we are waiting a longer period of time unnecessarily.
|
||||
// But this prevents race conditions in processing the container.
|
||||
ctx, cancel := context.WithTimeout(context.TODO(), time.Duration(container.StopTimeout())*time.Second)
|
||||
defer cancel()
|
||||
|
|
|
@ -108,7 +108,7 @@ func (fl *follow) nextPos(current logPos) (next logPos, ok bool) {
|
|||
case st = <-fl.LogFile.read:
|
||||
}
|
||||
|
||||
// Have any any logs been written since we last checked?
|
||||
// Have any logs been written since we last checked?
|
||||
if st.pos == current { // Nope.
|
||||
// Add ourself to the notify list.
|
||||
st.wait = append(st.wait, fl.c)
|
||||
|
|
|
@ -59,7 +59,7 @@ type LogFile struct {
|
|||
// passing along ownership is expressed with function argument types.
|
||||
// Methods which take a pointer *logReadState argument borrow the state,
|
||||
// analogous to functions which require a lock to be held when calling.
|
||||
// The caller retains ownership. Calling a method which which takes a
|
||||
// The caller retains ownership. Calling a method which takes a
|
||||
// value logFileState argument gives ownership to the callee.
|
||||
read chan logReadState
|
||||
|
||||
|
|
|
@ -138,7 +138,7 @@ type messageRing struct {
|
|||
wait *sync.Cond
|
||||
|
||||
sizeBytes int64 // current buffer size
|
||||
maxBytes int64 // max buffer size size
|
||||
maxBytes int64 // max buffer size
|
||||
queue []*Message
|
||||
closed bool
|
||||
}
|
||||
|
|
|
@ -304,6 +304,7 @@ func (s *DockerCLIBuildSuite) TestBuildOnBuildLowercase(c *testing.T) {
|
|||
c.Fatalf("Did not receive the expected echo text, got %s", result.Combined())
|
||||
}
|
||||
|
||||
//nolint:dupword
|
||||
if strings.Contains(result.Combined(), "ONBUILD ONBUILD") {
|
||||
c.Fatalf("Got an ONBUILD ONBUILD error with no error: got %s", result.Combined())
|
||||
}
|
||||
|
@ -2136,14 +2137,14 @@ func (s *DockerCLIBuildSuite) TestBuildWithVolumeOwnership(c *testing.T) {
|
|||
const name = "testbuildimg"
|
||||
|
||||
buildImageSuccessfully(c, name, build.WithDockerfile(`FROM busybox:latest
|
||||
RUN mkdir /test && chown daemon:daemon /test && chmod 0600 /test
|
||||
RUN mkdir /test && chown daemon:wheel /test && chmod 0600 /test
|
||||
VOLUME /test`))
|
||||
|
||||
out := cli.DockerCmd(c, "run", "--rm", "testbuildimg", "ls", "-la", "/test").Combined()
|
||||
if expected := "drw-------"; !strings.Contains(out, expected) {
|
||||
c.Fatalf("expected %s received %s", expected, out)
|
||||
}
|
||||
if expected := "daemon daemon"; !strings.Contains(out, expected) {
|
||||
if expected := "daemon wheel"; !strings.Contains(out, expected) {
|
||||
c.Fatalf("expected %s received %s", expected, out)
|
||||
}
|
||||
}
|
||||
|
@ -5613,7 +5614,8 @@ func (s *DockerCLIBuildSuite) TestBuildWithExtraHostInvalidFormat(c *testing.T)
|
|||
}
|
||||
|
||||
func (s *DockerCLIBuildSuite) TestBuildMultiStageCopyFromSyntax(c *testing.T) {
|
||||
dockerfile := `
|
||||
//nolint:dupword
|
||||
const dockerfile = `
|
||||
FROM busybox AS first
|
||||
COPY foo bar
|
||||
|
||||
|
@ -5992,6 +5994,7 @@ func (s *DockerCLIBuildSuite) TestBuildOpaqueDirectory(c *testing.T) {
|
|||
func (s *DockerCLIBuildSuite) TestBuildWindowsUser(c *testing.T) {
|
||||
testRequires(c, DaemonIsWindows)
|
||||
const name = "testbuildwindowsuser"
|
||||
//nolint:dupword
|
||||
buildImage(name, build.WithDockerfile(`FROM `+testEnv.PlatformDefaults.BaseImage+`
|
||||
RUN net user user /add
|
||||
USER user
|
||||
|
@ -6155,7 +6158,7 @@ func (s *DockerCLIBuildSuite) TestBuildIidFile(c *testing.T) {
|
|||
// Use a Dockerfile with multiple stages to ensure we get the last one
|
||||
cli.BuildCmd(c, name,
|
||||
build.WithDockerfile(`FROM `+minimalBaseImage()+` AS stage1
|
||||
ENV FOO FOO
|
||||
ENV FOO FOO1
|
||||
FROM `+minimalBaseImage()+`
|
||||
ENV BAR BAZ`),
|
||||
cli.WithFlags("--iidfile", tmpIidFile))
|
||||
|
|
|
@ -807,6 +807,8 @@ func (s *DockerDaemonSuite) TestDaemonICCPing(c *testing.T) {
|
|||
//
|
||||
// pkts bytes target prot opt in out source destination
|
||||
// 0 0 DROP all -- ext-bridge5 ext-bridge5 anywhere anywhere
|
||||
//
|
||||
//nolint:dupword
|
||||
cols := strings.Fields(out)
|
||||
|
||||
expected := []string{"0", "0", "DROP", "all", "--", bridgeName, bridgeName, "anywhere", "anywhere"}
|
||||
|
@ -856,6 +858,8 @@ func (s *DockerDaemonSuite) TestDaemonICCLinkExpose(c *testing.T) {
|
|||
//
|
||||
// pkts bytes target prot opt in out source destination
|
||||
// 0 0 DROP all -- ext-bridge6 ext-bridge6 anywhere anywhere
|
||||
//
|
||||
//nolint:dupword
|
||||
cols := strings.Fields(out)
|
||||
|
||||
expected := []string{"0", "0", "DROP", "all", "--", bridgeName, bridgeName, "anywhere", "anywhere"}
|
||||
|
@ -2544,7 +2548,7 @@ func (s *DockerDaemonSuite) TestExecWithUserAfterLiveRestore(c *testing.T) {
|
|||
testRequires(c, DaemonIsLinux)
|
||||
s.d.StartWithBusybox(testutil.GetContext(c), c, "--live-restore")
|
||||
|
||||
out, err := s.d.Cmd("run", "--init", "-d", "--name=top", "busybox", "sh", "-c", "addgroup -S test && adduser -S -G test test -D -s /bin/sh && touch /adduser_end && exec top")
|
||||
out, err := s.d.Cmd("run", "--init", "-d", "--name=top", "busybox", "sh", "-c", "addgroup -S testgroup && adduser -S -G testgroup test -D -s /bin/sh && touch /adduser_end && exec top")
|
||||
assert.NilError(c, err, "Output: %s", out)
|
||||
|
||||
s.d.WaitRun("top")
|
||||
|
@ -2554,7 +2558,7 @@ func (s *DockerDaemonSuite) TestExecWithUserAfterLiveRestore(c *testing.T) {
|
|||
assert.Assert(c, err == nil, "Timeout waiting for shell command to be completed")
|
||||
|
||||
out1, err := s.d.Cmd("exec", "-u", "test", "top", "id")
|
||||
// uid=100(test) gid=101(test) groups=101(test)
|
||||
// uid=100(test) gid=101(testgroup) groups=101(testgroup)
|
||||
assert.Assert(c, err == nil, "Output: %s", out1)
|
||||
|
||||
// restart daemon.
|
||||
|
|
|
@ -35,7 +35,7 @@ func (s *DockerCLIPluginLogDriverSuite) TestPluginLogDriver(c *testing.T) {
|
|||
|
||||
cli.DockerCmd(c, "start", "-a", "test")
|
||||
out = cli.DockerCmd(c, "logs", "test").Combined()
|
||||
assert.Equal(c, strings.TrimSpace(out), "hello\nhello")
|
||||
assert.Equal(c, strings.TrimSpace(out), "hello\nhello") //nolint:dupword
|
||||
|
||||
cli.DockerCmd(c, "rm", "test")
|
||||
cli.DockerCmd(c, "plugin", "disable", pluginName)
|
||||
|
|
|
@ -503,7 +503,7 @@ func (s *DockerCLIRunSuite) TestVolumesFromGetsProperMode(c *testing.T) {
|
|||
|
||||
cli.DockerCmd(c, "run", "--name", "parent", "-v", hostpath+":"+prefix+slash+"test:ro", "busybox", "true")
|
||||
|
||||
// Expect this "rw" mode to be be ignored since the inherited volume is "ro"
|
||||
// Expect this "rw" mode to be ignored since the inherited volume is "ro"
|
||||
if _, _, err := dockerCmdWithError("run", "--volumes-from", "parent:rw", "busybox", "touch", prefix+slash+"test"+slash+"file"); err == nil {
|
||||
c.Fatal("Expected volumes-from to inherit read-only volume even when passing in `rw`")
|
||||
}
|
||||
|
@ -4412,7 +4412,7 @@ func (s *DockerCLIRunSuite) TestRunMount(c *testing.T) {
|
|||
func (s *DockerCLIRunSuite) TestRunHostnameFQDN(c *testing.T) {
|
||||
testRequires(c, DaemonIsLinux)
|
||||
|
||||
expectedOutput := "foobar.example.com\nfoobar.example.com\nfoobar\nexample.com\nfoobar.example.com"
|
||||
expectedOutput := "foobar.example.com\nfoobar.example.com\nfoobar\nexample.com\nfoobar.example.com" //nolint:dupword
|
||||
out := cli.DockerCmd(c, "run", "--hostname=foobar.example.com", "busybox", "sh", "-c", `cat /etc/hostname && hostname && hostname -s && hostname -d && hostname -f`).Combined()
|
||||
assert.Equal(c, strings.TrimSpace(out), expectedOutput)
|
||||
|
||||
|
@ -4425,7 +4425,7 @@ func (s *DockerCLIRunSuite) TestRunHostnameFQDN(c *testing.T) {
|
|||
func (s *DockerCLIRunSuite) TestRunHostnameInHostMode(c *testing.T) {
|
||||
testRequires(c, DaemonIsLinux, NotUserNamespace)
|
||||
|
||||
const expectedOutput = "foobar\nfoobar"
|
||||
const expectedOutput = "foobar\nfoobar" //nolint:dupword
|
||||
out := cli.DockerCmd(c, "run", "--net=host", "--hostname=foobar", "busybox", "sh", "-c", `echo $HOSTNAME && hostname`).Combined()
|
||||
assert.Equal(c, strings.TrimSpace(out), expectedOutput)
|
||||
}
|
||||
|
|
|
@ -91,7 +91,7 @@ func (s *DockerSwarmSuite) TestServiceLogsCompleteness(c *testing.T) {
|
|||
lines := strings.Split(strings.TrimSpace(out), "\n")
|
||||
|
||||
// i have heard anecdotal reports that logs may come back from the engine
|
||||
// mis-ordered. if this tests fails, consider the possibility that that
|
||||
// mis-ordered. if this tests fails, consider the possibility that
|
||||
// might be occurring
|
||||
for i, line := range lines {
|
||||
assert.Assert(c, strings.Contains(line, fmt.Sprintf("log test %v", i)))
|
||||
|
|
|
@ -99,13 +99,13 @@ func TestHealthCheckProcessKilled(t *testing.T) {
|
|||
|
||||
cID := container.Run(ctx, t, apiClient, func(c *container.TestContainerConfig) {
|
||||
c.Config.Healthcheck = &containertypes.HealthConfig{
|
||||
Test: []string{"CMD", "sh", "-c", `echo "logs logs logs"; sleep 60`},
|
||||
Test: []string{"CMD", "sh", "-c", `echo "logs1 logs2 logs3"; sleep 60`},
|
||||
Interval: 100 * time.Millisecond,
|
||||
Timeout: 50 * time.Millisecond,
|
||||
Retries: 1,
|
||||
}
|
||||
})
|
||||
poll.WaitOn(t, pollForHealthCheckLog(ctx, apiClient, cID, "Health check exceeded timeout (50ms): logs logs logs\n"))
|
||||
poll.WaitOn(t, pollForHealthCheckLog(ctx, apiClient, cID, "Health check exceeded timeout (50ms): logs1 logs2 logs3\n"))
|
||||
}
|
||||
|
||||
func TestHealthStartInterval(t *testing.T) {
|
||||
|
|
|
@ -28,6 +28,8 @@ import (
|
|||
// 29 23 0:24 / /dev/shm rw,nosuid,nodev shared:4 - tmpfs tmpfs rw
|
||||
// ^^^^\
|
||||
// - this is the minor:major we look for
|
||||
//
|
||||
//nolint:dupword
|
||||
func testIpcCheckDevExists(mm string) (bool, error) {
|
||||
f, err := os.Open("/proc/self/mountinfo")
|
||||
if err != nil {
|
||||
|
|
|
@ -65,7 +65,7 @@ func TestImagesFilterUntil(t *testing.T) {
|
|||
imgs := make([]string, 5)
|
||||
for i := range imgs {
|
||||
if i > 0 {
|
||||
// Make really really sure each image has a distinct timestamp.
|
||||
// Make sure each image has a distinct timestamp.
|
||||
time.Sleep(time.Millisecond)
|
||||
}
|
||||
id, err := client.ContainerCommit(ctx, ctr, containertypes.CommitOptions{Reference: fmt.Sprintf("%s:v%d", name, i)})
|
||||
|
@ -109,7 +109,7 @@ func TestImagesFilterBeforeSince(t *testing.T) {
|
|||
imgs := make([]string, 5)
|
||||
for i := range imgs {
|
||||
if i > 0 {
|
||||
// Make really really sure each image has a distinct timestamp.
|
||||
// Make sure each image has a distinct timestamp.
|
||||
time.Sleep(time.Millisecond)
|
||||
}
|
||||
id, err := client.ContainerCommit(ctx, ctr, containertypes.CommitOptions{Reference: fmt.Sprintf("%s:v%d", name, i)})
|
||||
|
|
|
@ -63,7 +63,7 @@ func TestRemoveImageGarbageCollector(t *testing.T) {
|
|||
|
||||
// Build a image with multiple layers
|
||||
dockerfile := `FROM busybox
|
||||
RUN echo echo Running... > /run.sh`
|
||||
RUN echo 'echo Running...'' > /run.sh`
|
||||
source := fakecontext.New(t, "", fakecontext.WithDockerfile(dockerfile))
|
||||
defer source.Close()
|
||||
resp, err := client.ImageBuild(ctx,
|
||||
|
|
|
@ -118,7 +118,7 @@ func TestCreateServiceMultipleTimes(t *testing.T) {
|
|||
assert.NilError(t, err)
|
||||
|
||||
// we can't just wait on no tasks for the service, counter-intuitively.
|
||||
// Tasks may briefly exist but not show up, if they are are in the process
|
||||
// Tasks may briefly exist but not show up, if they are in the process
|
||||
// of being deallocated. To avoid this case, we should retry network remove
|
||||
// a few times, to give tasks time to be deallcoated
|
||||
poll.WaitOn(t, swarm.NoTasksForService(ctx, client, serviceID2), swarm.ServicePoll)
|
||||
|
|
|
@ -45,7 +45,7 @@ func TestRunMountVolumeSubdir(t *testing.T) {
|
|||
{name: "not existing", opts: mount.VolumeOptions{Subpath: "not-existing-path"}, cmd: []string{"cat", "/volume"}, startErr: (&safepath.ErrNotAccessible{}).Error()},
|
||||
|
||||
{name: "mount link", opts: mount.VolumeOptions{Subpath: filepath.Join("hack", "root")}, cmd: []string{"ls", "/volume"}, startErr: (&safepath.ErrEscapesBase{}).Error()},
|
||||
{name: "mount link link", opts: mount.VolumeOptions{Subpath: filepath.Join("hack", "bad")}, cmd: []string{"ls", "/volume"}, startErr: (&safepath.ErrEscapesBase{}).Error()},
|
||||
{name: "mount link link", opts: mount.VolumeOptions{Subpath: filepath.Join("hack", "bad")}, cmd: []string{"ls", "/volume"}, startErr: (&safepath.ErrEscapesBase{}).Error()}, //nolint:dupword
|
||||
} {
|
||||
t.Run(tc.name, func(t *testing.T) {
|
||||
if tc.skipPlatform != "" {
|
||||
|
|
|
@ -29,7 +29,7 @@ import (
|
|||
|
||||
// kubernetesSafeOpen open path formed by concatenation of the base directory
|
||||
// and its subpath and return its fd.
|
||||
// Symlinks are disallowed (pathname must already resolve symlinks) and the path
|
||||
// Symlinks are disallowed (pathname must already resolve symlinks) and the
|
||||
// path must be within the base directory.
|
||||
// This is minimally modified code from https://github.com/kubernetes/kubernetes/blob/55fb1805a1217b91b36fa8fe8f2bf3a28af2454d/pkg/volume/util/subpath/subpath_linux.go#L530
|
||||
func kubernetesSafeOpen(base, subpath string) (int, error) {
|
||||
|
|
|
@ -786,7 +786,7 @@ func Client(args []string) {
|
|||
time.Sleep(1 * time.Hour)
|
||||
os.Exit(0)
|
||||
case "fail":
|
||||
log.G(context.TODO()).Fatalf("Test error condition with message: error error error")
|
||||
log.G(context.TODO()).Fatalf("Test error condition with message: error error error") //nolint:dupword
|
||||
}
|
||||
|
||||
serviceName := args[1]
|
||||
|
|
|
@ -74,7 +74,7 @@ func (enip *ErrNoIPAddr) Error() string {
|
|||
// InternalError denotes the type of this error
|
||||
func (enip *ErrNoIPAddr) InternalError() {}
|
||||
|
||||
// ErrInvalidGateway is returned when the user provided default gateway (v4/v6) is not not valid.
|
||||
// ErrInvalidGateway is returned when the user provided default gateway (v4/v6) is not valid.
|
||||
type ErrInvalidGateway struct{}
|
||||
|
||||
func (eig *ErrInvalidGateway) Error() string {
|
||||
|
|
|
@ -157,7 +157,7 @@ func (d *driver) DeleteNetwork(nid string) error {
|
|||
// delete the network record from persistent cache
|
||||
err := d.storeDelete(n.config)
|
||||
if err != nil {
|
||||
return fmt.Errorf("error deleting deleting id %s from datastore: %v", nid, err)
|
||||
return fmt.Errorf("error deleting id %s from datastore: %v", nid, err)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
|
|
@ -147,7 +147,7 @@ func (d *driver) DeleteNetwork(nid string) error {
|
|||
// delete the network record from persistent cache
|
||||
err := d.storeDelete(n.config)
|
||||
if err != nil {
|
||||
return fmt.Errorf("error deleting deleting id %s from datastore: %v", nid, err)
|
||||
return fmt.Errorf("error deleting id %s from datastore: %v", nid, err)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
|
|
@ -64,7 +64,7 @@ func init() {
|
|||
// Lock main() to the initial thread to exclude the goroutines executing
|
||||
// func setDefaultVLAN() from being scheduled onto that thread. Changes to
|
||||
// the network namespace of the initial thread alter /proc/self/ns/net,
|
||||
// which would break any code which (incorrectly) assumes that that file is
|
||||
// which would break any code which (incorrectly) assumes that the file is
|
||||
// a handle to the network namespace for the thread it is currently
|
||||
// executing on.
|
||||
runtime.LockOSThread()
|
||||
|
|
|
@ -22,8 +22,8 @@ func callerInfo(i int) string {
|
|||
return fName
|
||||
}
|
||||
|
||||
// Name returns the name of the function at the specified level
|
||||
// level == 0 means current method name
|
||||
// Name returns the name of the function at the specified level.
|
||||
// (level == 0 means current method name).
|
||||
func Name(level int) string {
|
||||
return callerInfo(2 + level)
|
||||
}
|
||||
|
|
|
@ -34,7 +34,7 @@ func (a *allocator) RequestPool(addressSpace, requestedPool, requestedSubPool st
|
|||
return "", nil, nil, types.InvalidParameterErrorf("null ipam driver does not handle specific address subpool requests")
|
||||
}
|
||||
if v6 {
|
||||
return "", nil, nil, types.InvalidParameterErrorf("null ipam driver does not handle IPv6 address pool pool requests")
|
||||
return "", nil, nil, types.InvalidParameterErrorf("null ipam driver does not handle IPv6 address pool requests")
|
||||
}
|
||||
return defaultPoolID, defaultPool, nil, nil
|
||||
}
|
||||
|
|
|
@ -32,7 +32,7 @@ func init() {
|
|||
// by func (*Namespace) InvokeFunc() or func setIPv6() below from
|
||||
// being scheduled onto that thread. Changes to the network namespace of
|
||||
// the initial thread alter /proc/self/ns/net, which would break any
|
||||
// code which (incorrectly) assumes that that file is the network
|
||||
// code which (incorrectly) assumes that the file is the network
|
||||
// namespace for the thread it is currently executing on.
|
||||
runtime.LockOSThread()
|
||||
}
|
||||
|
|
|
@ -36,7 +36,7 @@ func TestUntarWithMaliciousSymlinks(t *testing.T) {
|
|||
err = os.WriteFile(filepath.Join(dir, "host-file"), []byte("I am a host file"), 0o644)
|
||||
assert.NilError(t, err)
|
||||
|
||||
// Create some data which which will be copied into the "container" root into
|
||||
// Create some data to copy into the "container" root into
|
||||
// the symlinked path.
|
||||
// Before this change, the copy would overwrite the "host" content.
|
||||
// With this change it should not.
|
||||
|
|
|
@ -400,7 +400,7 @@ var (
|
|||
// Jane Goodall - British primatologist, ethologist, and anthropologist who is considered to be the world's foremost expert on chimpanzees - https://en.wikipedia.org/wiki/Jane_Goodall
|
||||
"goodall",
|
||||
|
||||
// Stephen Jay Gould was was an American paleontologist, evolutionary biologist, and historian of science. He is most famous for the theory of punctuated equilibrium - https://en.wikipedia.org/wiki/Stephen_Jay_Gould
|
||||
// Stephen Jay Gould was an American paleontologist, evolutionary biologist, and historian of science. He is most famous for the theory of punctuated equilibrium - https://en.wikipedia.org/wiki/Stephen_Jay_Gould
|
||||
"gould",
|
||||
|
||||
// Carolyn Widney Greider - American molecular biologist and joint winner of the 2009 Nobel Prize for Physiology or Medicine for the discovery of telomerase. https://en.wikipedia.org/wiki/Carol_W._Greider
|
||||
|
|
|
@ -24,7 +24,7 @@ type Seccomp struct {
|
|||
|
||||
// Syscalls contains lists of syscall rules. Rules can define conditions
|
||||
// for them to be included or excluded in the resulting profile (based on
|
||||
// on kernel version, architecture, capabilities, etc.). These lists are
|
||||
// kernel version, architecture, capabilities, etc.). These lists are
|
||||
// expanded to an specs.Syscall When generating the profile, these lists
|
||||
// are expanded to a []specs.LinuxSyscall.
|
||||
Syscalls []*Syscall `json:"syscalls"`
|
||||
|
|
|
@ -24,7 +24,7 @@ func CanTestQuota() (string, bool) {
|
|||
}
|
||||
|
||||
// PrepareQuotaTestImage - prepares an xfs prjquota test image
|
||||
// returns the path the the image on success
|
||||
// returns the path of the image on success
|
||||
func PrepareQuotaTestImage(t *testing.T) (string, error) {
|
||||
// imageSize is the size of the test-image. The minimum size allowed
|
||||
// is 300MB.
|
||||
|
|
|
@ -63,7 +63,7 @@ func (rm *RestartManager) ShouldRestart(exitCode uint32, hasBeenManuallyStopped
|
|||
if rm.active {
|
||||
return false, nil, fmt.Errorf("invalid call on an active restart manager")
|
||||
}
|
||||
// if the container ran for more than 10s, regardless of status and policy reset the
|
||||
// if the container ran for more than 10s, regardless of status and policy reset
|
||||
// the timeout back to the default.
|
||||
if executionDuration.Seconds() >= 10 {
|
||||
rm.timeout = 0
|
||||
|
|
Loading…
Reference in a new issue