-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Closed
Labels
Description
Description
The TestUpdateOCILinuxResource tests are failing in pkg/cri/server and pkg/cri/sbserver. All tests fail due to the expected swap value not matching the received swap value.
These test cases were recently changed in pull request #7783, which disables swap by setting the value of the swap resource equal to the memory limit. Instead of the swap value being updated to match the expected value (the memory limit), in this case the swap value is left unchanged causing the test cases to fail (see test output below).
Steps to reproduce the issue
- Clone the containerd repository
- Navigate to the
pkg/cri/serverorpkg/cri/sbserverdirectories go test -run TestUpdateOCILinuxResource
Describe the results you received and expected
Expected: All tests to pass
Received:
--- FAIL: TestUpdateOCILinuxResource (0.00s)
--- FAIL: TestUpdateOCILinuxResource/should_skip_empty_fields (0.00s)
container_update_resources_linux_test.go:239:
Error Trace: /home/containerd_test/containerd/pkg/cri/server/container_update_resources_linux_test.go:239
Error: Not equal:
expected: &specs.Spec{Version:"", Process:(*specs.Process)(0xc00029c5a0), Root:(*specs.Root)(nil), Hostname:"", Domainname:"", Mounts:[]specs.Mount(nil), Hooks:(*specs.Hooks)(nil), Annotations:map[string]string(nil), Linux:(*specs.Linux)(0xc00029c690), Solaris:(*specs.Solaris)(nil), Windows:(*specs.Windows)(nil), VM:(*specs.VM)(nil), ZOS:(*specs.ZOS)(nil)}
actual : &specs.Spec{Version:"", Process:(*specs.Process)(0xc00029cf00), Root:(*specs.Root)(nil), Hostname:"", Domainname:"", Mounts:[]specs.Mount(nil), Hooks:(*specs.Hooks)(nil), Annotations:map[string]string(nil), Linux:(*specs.Linux)(0xc00029cff0), Solaris:(*specs.Solaris)(nil), Windows:(*specs.Windows)(nil), VM:(*specs.VM)(nil), ZOS:(*specs.ZOS)(nil)}
Diff:
--- Expected
+++ Actual
@@ -38,3 +38,3 @@
Reservation: (*int64)(<nil>),
- Swap: (*int64)(54321),
+ Swap: (*int64)(<nil>),
Kernel: (*int64)(<nil>),
Test: TestUpdateOCILinuxResource/should_skip_empty_fields
--- FAIL: TestUpdateOCILinuxResource/should_be_able_to_fill_empty_fields (0.00s)
container_update_resources_linux_test.go:239:
Error Trace: /home/containerd_test/containerd/pkg/cri/server/container_update_resources_linux_test.go:239
Error: Not equal:
expected: &specs.Spec{Version:"", Process:(*specs.Process)(0xc00029c960), Root:(*specs.Root)(nil), Hostname:"", Domainname:"", Mounts:[]specs.Mount(nil), Hooks:(*specs.Hooks)(nil), Annotations:map[string]string(nil), Linux:(*specs.Linux)(0xc00029ca50), Solaris:(*specs.Solaris)(nil), Windows:(*specs.Windows)(nil), VM:(*specs.VM)(nil), ZOS:(*specs.ZOS)(nil)}
actual : &specs.Spec{Version:"", Process:(*specs.Process)(0xc00029d0e0), Root:(*specs.Root)(nil), Hostname:"", Domainname:"", Mounts:[]specs.Mount(nil), Hooks:(*specs.Hooks)(nil), Annotations:map[string]string(nil), Linux:(*specs.Linux)(0xc00029d1d0), Solaris:(*specs.Solaris)(nil), Windows:(*specs.Windows)(nil), VM:(*specs.VM)(nil), ZOS:(*specs.ZOS)(nil)}
Diff:
--- Expected
+++ Actual
@@ -38,3 +38,3 @@
Reservation: (*int64)(<nil>),
- Swap: (*int64)(54321),
+ Swap: (*int64)(<nil>),
Kernel: (*int64)(<nil>),
Test: TestUpdateOCILinuxResource/should_be_able_to_fill_empty_fields
--- FAIL: TestUpdateOCILinuxResource/should_be_able_to_patch_the_unified_map (0.00s)
container_update_resources_linux_test.go:239:
Error Trace: /home/containerd_test/containerd/pkg/cri/server/container_update_resources_linux_test.go:239
Error: Not equal:
expected: &specs.Spec{Version:"", Process:(*specs.Process)(0xc00029cd20), Root:(*specs.Root)(nil), Hostname:"", Domainname:"", Mounts:[]specs.Mount(nil), Hooks:(*specs.Hooks)(nil), Annotations:map[string]string(nil), Linux:(*specs.Linux)(0xc00029ce10), Solaris:(*specs.Solaris)(nil), Windows:(*specs.Windows)(nil), VM:(*specs.VM)(nil), ZOS:(*specs.ZOS)(nil)}
actual : &specs.Spec{Version:"", Process:(*specs.Process)(0xc00029d2c0), Root:(*specs.Root)(nil), Hostname:"", Domainname:"", Mounts:[]specs.Mount(nil), Hooks:(*specs.Hooks)(nil), Annotations:map[string]string(nil), Linux:(*specs.Linux)(0xc00029d3b0), Solaris:(*specs.Solaris)(nil), Windows:(*specs.Windows)(nil), VM:(*specs.VM)(nil), ZOS:(*specs.ZOS)(nil)}
Diff:
--- Expected
+++ Actual
@@ -38,3 +38,3 @@
Reservation: (*int64)(<nil>),
- Swap: (*int64)(54321),
+ Swap: (*int64)(<nil>),
Kernel: (*int64)(<nil>),
Test: TestUpdateOCILinuxResource/should_be_able_to_patch_the_unified_map
--- FAIL: TestUpdateOCILinuxResource/should_be_able_to_update_each_resource (0.00s)
container_update_resources_linux_test.go:239:
Error Trace: /home/containerd_test/containerd/pkg/cri/server/container_update_resources_linux_test.go:239
Error: Not equal:
expected: &specs.Spec{Version:"", Process:(*specs.Process)(0xc00029c1e0), Root:(*specs.Root)(nil), Hostname:"", Domainname:"", Mounts:[]specs.Mount(nil), Hooks:(*specs.Hooks)(nil), Annotations:map[string]string(nil), Linux:(*specs.Linux)(0xc00029c2d0), Solaris:(*specs.Solaris)(nil), Windows:(*specs.Windows)(nil), VM:(*specs.VM)(nil), ZOS:(*specs.ZOS)(nil)}
actual : &specs.Spec{Version:"", Process:(*specs.Process)(0xc0001ca3c0), Root:(*specs.Root)(nil), Hostname:"", Domainname:"", Mounts:[]specs.Mount(nil), Hooks:(*specs.Hooks)(nil), Annotations:map[string]string(nil), Linux:(*specs.Linux)(0xc0001ca4b0), Solaris:(*specs.Solaris)(nil), Windows:(*specs.Windows)(nil), VM:(*specs.VM)(nil), ZOS:(*specs.ZOS)(nil)}
Diff:
--- Expected
+++ Actual
@@ -38,3 +38,3 @@
Reservation: (*int64)(<nil>),
- Swap: (*int64)(54321),
+ Swap: (*int64)(<nil>),
Kernel: (*int64)(<nil>),
Test: TestUpdateOCILinuxResource/should_be_able_to_update_each_resource
FAIL
exit status 1
FAIL github.com/containerd/containerd/pkg/cri/server 0.020s
What version of containerd are you using?
containerd github.com/containerd/containerd v1.7.0-beta.1-121-g28e8e247b.m 28e8e24.m
Any other relevant information
No response
Show configuration if it is related to CRI plugin.
No response