moby--moby/pkg
Sebastiaan van Stijn 1e1156cf67
Skip kernel-memory tests on RHEL/CentOS daemons
RHEL/CentOS 3.10 kernels report that kernel-memory accounting is supported,
but it actually does not work.

Runc (when compiled for those kernels) will be compiled without kernel-memory
support, so even though the daemon may be reporting that it's supported,
it actually is not.

This cause tests to fail when testing against a daemon that's using a runc
version without kmem support.

For now, skip these tests based on the kernel version reported by the daemon.

This should fix failures such as:

```
FAIL: /go/src/github.com/docker/docker/integration-cli/docker_cli_run_unix_test.go:499: DockerSuite.TestRunWithKernelMemory

assertion failed:
Command:  /usr/bin/docker run --kernel-memory 50M --name test1 busybox cat /sys/fs/cgroup/memory/memory.kmem.limit_in_bytes
ExitCode: 0
Error:    <nil>
Stdout:   9223372036854771712

Stderr:   WARNING: You specified a kernel memory limit on a kernel older than 4.0. Kernel memory limits are experimental on older kernels, it won't work as expected and can cause your system to be unstable.

Failures:
Expected stdout to contain "52428800"

FAIL: /go/src/github.com/docker/docker/integration-cli/docker_cli_update_unix_test.go:125: DockerSuite.TestUpdateKernelMemory

/go/src/github.com/docker/docker/integration-cli/docker_cli_update_unix_test.go:136:
    ...open /go/src/github.com/docker/docker/integration-cli/docker_cli_update_unix_test.go: no such file or directory
... obtained string = "9223372036854771712"
... expected string = "104857600"

----------------------------------------------------------------------
FAIL: /go/src/github.com/docker/docker/integration-cli/docker_cli_update_unix_test.go:139: DockerSuite.TestUpdateKernelMemoryUninitialized

/go/src/github.com/docker/docker/integration-cli/docker_cli_update_unix_test.go:149:
    ...open /go/src/github.com/docker/docker/integration-cli/docker_cli_update_unix_test.go: no such file or directory
... value = nil
```

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-01-04 13:27:46 +01:00
..
aaparser
archive pkg/archive: add TestReexecUserNSOverlayWhiteoutConverter 2018-12-11 07:18:37 +09:00
authorization Format code with gofmt -s from go-1.11beta1 2018-09-06 15:24:16 -07:00
broadcaster
chrootarchive Add ADD/COPY --chown flag support to Windows 2018-08-13 21:59:11 -07:00
containerfs Add ADD/COPY --chown flag support to Windows 2018-08-13 21:59:11 -07:00
devicemapper
directory
discovery
dmesg
filenotify pkg/filenotify/poller: fix Close() 2018-08-29 22:16:04 -07:00
fileutils Remove duplicated words in pkg files 2018-10-05 22:32:14 +08:00
fsutils
homedir
idtools Add ADD/COPY --chown flag support to Windows 2018-08-13 21:59:11 -07:00
ioutils
jsonmessage
locker
longpath
loopback
mount Fix some go_vet issues 2018-12-19 23:57:06 +01:00
namesgenerator added an adjective to kick off another build! 2018-09-30 21:00:09 +01:00
parsers Skip kernel-memory tests on RHEL/CentOS daemons 2019-01-04 13:27:46 +01:00
pidfile
platform
plugingetter
plugins Remove duplicated words in pkg files 2018-10-05 22:32:14 +08:00
pools
progress pkg/progress: work around closing closed channel panic 2018-09-06 20:20:12 +00:00
pubsub
reexec
signal SIGSKTFLT does not exist on MIPS, instead SIGEMT does. SIGRTMAX is also 127 on MIPS. 2018-07-19 12:26:52 +02:00
stdcopy
streamformatter Remove duplicated words in pkg files 2018-10-05 22:32:14 +08:00
stringid
symlink Update LICENSE 2018-09-12 14:27:53 +01:00
sysinfo use empty string as cgroup path to grab first find 2018-12-07 18:44:00 +01:00
system Fix some go_vet issues 2018-12-19 23:57:06 +01:00
tailfile Add func to get an io.Reader for tail operations 2018-08-10 21:01:15 -07:00
tarsum pkg/tarsum: fix unit test for Go 1.11+ 2018-07-19 10:38:45 +03:00
term Fix #28814 2018-08-07 10:20:13 +02:00
truncindex fixes display text in Multiple IDs found with provided prefix 2018-09-24 12:17:31 +08:00
urlutil
useragent
README.md

README.md

pkg/ is a collection of utility packages used by the Moby project without being specific to its internals.

Utility packages are kept separate from the moby core codebase to keep it as small and concise as possible. If some utilities grow larger and their APIs stabilize, they may be moved to their own repository under the Moby organization, to facilitate re-use by other projects. However that is not the priority.

The directory pkg is named after the same directory in the camlistore project. Since Brad is a core Go maintainer, we thought it made sense to copy his methods for organizing Go code :) Thanks Brad!

Because utility packages are small and neatly separated from the rest of the codebase, they are a good place to start for aspiring maintainers and contributors. Get in touch if you want to help maintain them!