"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "integration-cli/requirements_unix_test.go" between
moby-20.10.6.tar.gz and moby-20.10.7.tar.gz

About: Moby is a framework to assemble specialized container systems (formerly project name Docker; see here to clarify the relationship between the projects).

requirements_unix_test.go  (moby-20.10.6):requirements_unix_test.go  (moby-20.10.7)
// +build !windows // +build !windows
package main package main
import ( import (
"bytes" "bytes"
"io/ioutil" "io/ioutil"
"os/exec" "os/exec"
"strings" "strings"
"github.com/docker/docker/pkg/parsers/kernel"
"github.com/docker/docker/pkg/sysinfo" "github.com/docker/docker/pkg/sysinfo"
) )
var ( var (
// SysInfo stores information about which features a kernel supports. // SysInfo stores information about which features a kernel supports.
SysInfo *sysinfo.SysInfo SysInfo *sysinfo.SysInfo
) )
func cpuCfsPeriod() bool { func cpuCfsPeriod() bool {
return testEnv.DaemonInfo.CPUCfsPeriod return testEnv.DaemonInfo.CPUCfsPeriod
skipping to change at line 40 skipping to change at line 39
} }
func oomControl() bool { func oomControl() bool {
return testEnv.DaemonInfo.OomKillDisable return testEnv.DaemonInfo.OomKillDisable
} }
func pidsLimit() bool { func pidsLimit() bool {
return SysInfo.PidsLimit return SysInfo.PidsLimit
} }
func kernelMemorySupport() bool {
// TODO remove this once kmem support in RHEL kernels is fixed. See https
://github.com/opencontainers/runc/pull/1921
daemonV, err := kernel.ParseRelease(testEnv.DaemonInfo.KernelVersion)
if err != nil {
return false
}
requiredV := kernel.VersionInfo{Kernel: 3, Major: 10}
if kernel.CompareKernelVersion(*daemonV, requiredV) < 1 {
// On Kernel 3.10 and under, don't consider kernel memory to be s
upported,
// even if the kernel (and thus the daemon) reports it as being s
upported
return false
}
return testEnv.DaemonInfo.KernelMemory
}
func memoryLimitSupport() bool { func memoryLimitSupport() bool {
return testEnv.DaemonInfo.MemoryLimit return testEnv.DaemonInfo.MemoryLimit
} }
func memoryReservationSupport() bool { func memoryReservationSupport() bool {
return SysInfo.MemoryReservation return SysInfo.MemoryReservation
} }
func swapMemorySupport() bool { func swapMemorySupport() bool {
return testEnv.DaemonInfo.SwapLimit return testEnv.DaemonInfo.SwapLimit
 End of changes. 2 change blocks. 
19 lines changed or deleted 0 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)