From 037b4c0e8e2d5a11914385627546e167a13bf82a Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Thu, 20 Jan 2022 11:11:22 +0100 Subject: [PATCH] docker-py: skip CreateContainerTest::test_create_with_device_cgroup_rules This test is verifying that the container has the right options set (through `docker inspect`), but also checks if the cgroup-rules are set within the container by reading `/sys/fs/cgroup/devices/devices` Unlike cgroups v1, on cgroups v2, there is no file interface, and rules are handled through ebpf, which means that the test will fail because this file is not present. From the Linux documentation for cgroups v2: https://github.com/torvalds/linux/blob/v5.16/Documentation/admin-guide/cgroup-v2.rst#device-controller > (...) > Device controller manages access to device files. It includes both creation of > new device files (using mknod), and access to the existing device files. > > Cgroup v2 device controller has no interface files and is implemented on top of > cgroup BPF. To control access to device files, a user may create bpf programs > of type BPF_PROG_TYPE_CGROUP_DEVICE and att> Signed-off-by: Sebastiaan van Stijn --- hack/make/test-docker-py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/hack/make/test-docker-py b/hack/make/test-docker-py index 436262037c..3043a072d1 100644 --- a/hack/make/test-docker-py +++ b/hack/make/test-docker-py @@ -14,8 +14,9 @@ source hack/make/.integration-test-helpers # This option can be used to temporarily skip flaky tests (using the `--deselect` # flag) until they are fixed upstream. For example: # --deselect=tests/integration/api_container_test.py::AttachContainerTest::test_attach_no_stream -# TODO re-enable test after https://github.com/docker/docker-py/issues/2513 has been resolved -: "${PY_TEST_OPTIONS:=--junitxml=${DEST}/junit-report.xml --deselect=tests/integration/api_container_test.py::AttachContainerTest::test_attach_no_stream}" +# TODO re-enable test_attach_no_stream after https://github.com/docker/docker-py/issues/2513 is resolved +# TODO re-enable test_create_with_device_cgroup_rules after https://github.com/docker/docker-py/issues/2939 is resolved +: "${PY_TEST_OPTIONS:=--junitxml=${DEST}/junit-report.xml --deselect=tests/integration/api_container_test.py::AttachContainerTest::test_attach_no_stream --deselect=tests/integration/api_container_test.py::CreateContainerTest::test_create_with_device_cgroup_rules}" ( bundle .integration-daemon-start