kubernetes/test/e2e_node/swap_test.go

const cgroupBasePath

const cgroupV2SwapLimitFile

const cgroupV2swapCurrentUsageFile

const cgroupV2MemoryCurrentUsageFile

var noLimits

var _

// Note that memoryRequestEqualLimit is effective only when qosClass is not PodQOSBestEffort.
func getSwapTestPod(f *framework.Framework, qosClass v1.PodQOSClass, memoryRequestEqualLimit bool) *v1.Pod {}

func getSleepingPod(namespace string) *v1.Pod {}

func getStressPod(f *framework.Framework, stressSize, memAllocSize *resource.Quantity) *v1.Pod {}

func getUpdatedPod(f *framework.Framework, pod *v1.Pod) *v1.Pod {}

func runPodAndWaitUntilScheduled(f *framework.Framework, pod *v1.Pod) *v1.Pod {}

func isSwapFeatureGateEnabled() bool {}

func isPodCgroupV2(f *framework.Framework, pod *v1.Pod) bool {}

func expectNoSwap(f *framework.Framework, pod *v1.Pod) {}

// supports v2 only as v1 shouldn't support LimitedSwap
func expectLimitedSwap(f *framework.Framework, pod *v1.Pod, expectedSwapLimit int64) {}

func getSwapCapacity(f *framework.Framework, pod *v1.Pod) *resource.Quantity {}

func getMemoryCapacity(f *framework.Framework, nodeName string) (memCapacity, usedMemory *resource.Quantity) {}

func calcSwapForBurstablePod(f *framework.Framework, pod *v1.Pod) int64 {}

func getSwapBehavior() string {}

func cloneQuantity(resource *resource.Quantity) *resource.Quantity {}

func divideQuantity(quantity *resource.Quantity, divideBy int64) *resource.Quantity {}

func multiplyQuantity(quantity *resource.Quantity, multiplier int64) *resource.Quantity {}

func readCgroupFile(f *framework.Framework, pod *v1.Pod, cgroupFile string) (string, error) {}

func parseBytesStrToQuantity(bytesStr string) (*resource.Quantity, error) {}

func getSwapUsage(f *framework.Framework, pod *v1.Pod) (*resource.Quantity, error) {}

func getMemoryUsage(f *framework.Framework, pod *v1.Pod) (*resource.Quantity, error) {}

// Sets memory request or limit can be null, then it's dismissed.
// Sets the same value for all containers.
func setPodMemoryResources(pod *v1.Pod, memoryRequest, memoryLimit *resource.Quantity) {}