Akihiro Suda
5a00d28a6f
Fix TestUpdateContainerResources_Memory* on cgroup v2 hosts
Fix issue 7890
Tested on Ubuntu 22.10, with swapon and swapoff:
```
$ GITHUB_WORKSPACE="" ENABLE_CRI_SANDBOXES="" CONTAINERD_RUNTIME=io.containerd.runc.v2 FOCUS=TestUpdateContainerResources_Memory make cri-integration
...
=== RUN TestUpdateContainerResources_MemorySwap
container_update_resources_test.go:161: Create a sandbox
INFO[0000] Using the following image list: {Alpine:docker.io/library/alpine:latest BusyBox:docker.io/library/busybox:latest Pause:registry.k8s.io/pause:3.8 ResourceConsumer:registry.k8s.io/e2e-test-images/resource-consumer:1.10 VolumeCopyUp:ghcr.io/containerd/volume-copy-up:2.1 VolumeOwnership:ghcr.io/containerd/volume-ownership:2.1}
main_test.go:663: Image "registry.k8s.io/pause:3.8" already exists, not pulling.
container_update_resources_test.go:174: Create a container with memory limit but no swap
container_update_resources_test.go:186: Check memory limit in container OCI spec
container_update_resources_test.go:194: Check memory limit in container OCI spec
container_update_resources_test.go:200: Start the container
container_update_resources_test.go:205: Check memory limit in cgroup
container_update_resources_test.go:211: Update container memory limit after started
container_update_resources_test.go:217: Check memory limit in container OCI spec
container_update_resources_test.go:222: Check memory limit in cgroup
--- PASS: TestUpdateContainerResources_MemorySwap (0.88s)
=== RUN TestUpdateContainerResources_MemoryLimit
container_update_resources_test.go:228: Create a sandbox
main_test.go:663: Image "registry.k8s.io/pause:3.8" already exists, not pulling.
container_update_resources_test.go:238: Create a container with memory limit
container_update_resources_test.go:249: Check memory limit in container OCI spec
container_update_resources_test.go:257: Update container memory limit after created
container_update_resources_test.go:263: Check memory limit in container OCI spec
container_update_resources_test.go:269: Start the container
container_update_resources_test.go:274: Check memory limit in cgroup
container_update_resources_test.go:280: Update container memory limit after started
container_update_resources_test.go:286: Check memory limit in container OCI spec
container_update_resources_test.go:292: Check memory limit in cgroup
--- PASS: TestUpdateContainerResources_MemoryLimit (0.91s)
PASS
```
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2023-01-02 13:15:38 +09:00
..
2022-12-29 14:25:14 +08:00
2022-12-08 19:30:39 +00:00
2022-08-04 18:18:33 -07:00
2022-09-06 15:59:20 +08:00
2022-12-29 14:25:14 +08:00
2022-12-08 09:36:20 -08:00
2022-07-29 16:08:07 -07:00
2022-10-17 16:27:23 +00:00
2022-12-09 15:26:49 +08:00
2022-11-07 10:02:25 +01:00
2022-07-25 14:19:40 -07:00
2022-07-25 14:19:40 -07:00
2022-07-25 10:47:00 -07:00
2023-01-02 13:15:38 +09:00
2022-07-25 10:47:00 -07:00
2022-07-25 10:47:00 -07:00
2022-08-24 19:08:06 +00:00
2022-07-25 14:19:40 -07:00
2022-07-25 10:47:00 -07:00
2022-11-28 21:51:25 +02:00
2022-07-25 10:47:00 -07:00
2022-12-27 22:01:12 -03:00
2021-07-09 14:07:24 -04:00
2022-11-28 21:51:25 +02:00
2022-07-25 10:47:00 -07:00
2022-07-25 10:47:00 -07:00
2022-12-27 22:01:12 -03:00
2022-12-20 13:20:27 -08:00
2021-10-07 18:20:59 -07:00
2022-12-08 09:36:20 -08:00
2022-12-08 09:36:20 -08:00
2022-12-08 09:36:20 -08:00
2022-12-08 09:36:20 -08:00
2022-07-25 10:47:00 -07:00
2022-07-25 10:47:00 -07:00
2022-12-08 09:36:20 -08:00
2022-12-08 09:36:20 -08:00
2022-12-29 14:25:14 +08:00
2022-12-08 09:36:20 -08:00
2022-12-08 09:36:20 -08:00