mirror of
				https://github.com/k3s-io/kubernetes.git
				synced 2025-11-03 23:40:03 +00:00 
			
		
		
		
	test: adjust summary test for cgroup v2
on cgroup v2 the reported metric is recursive for the entire and it includes all the sub cgroups. Adjust the test accordingly. Closes: https://github.com/kubernetes/kubernetes/issues/99230 Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
This commit is contained in:
		@@ -115,6 +115,11 @@ var _ = SIGDescribe("Summary API [NodeConformance]", func() {
 | 
			
		||||
					"UserDefinedMetrics": gomega.BeEmpty(),
 | 
			
		||||
				})
 | 
			
		||||
			}
 | 
			
		||||
			expectedMajorPageFaultsUpperBound := 10
 | 
			
		||||
			if IsCgroup2UnifiedMode() {
 | 
			
		||||
				expectedMajorPageFaultsUpperBound = 1000
 | 
			
		||||
			}
 | 
			
		||||
 | 
			
		||||
			podsContExpectations := sysContExpectations().(*gstruct.FieldsMatcher)
 | 
			
		||||
			podsContExpectations.Fields["Memory"] = ptrMatchAllFields(gstruct.Fields{
 | 
			
		||||
				"Time": recent(maxStatsAge),
 | 
			
		||||
@@ -124,7 +129,7 @@ var _ = SIGDescribe("Summary API [NodeConformance]", func() {
 | 
			
		||||
				"WorkingSetBytes": bounded(10*e2evolume.Kb, memoryLimit),
 | 
			
		||||
				"RSSBytes":        bounded(1*e2evolume.Kb, memoryLimit),
 | 
			
		||||
				"PageFaults":      bounded(0, 1000000),
 | 
			
		||||
				"MajorPageFaults": bounded(0, 10),
 | 
			
		||||
				"MajorPageFaults": bounded(0, expectedMajorPageFaultsUpperBound),
 | 
			
		||||
			})
 | 
			
		||||
			runtimeContExpectations := sysContExpectations().(*gstruct.FieldsMatcher)
 | 
			
		||||
			if systemdutil.IsRunningSystemd() && framework.TestContext.ContainerRuntime == "docker" {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user