From a2ac2b95db1a3ceb5bae4226aff12170c07ee287 Mon Sep 17 00:00:00 2001 From: Giuseppe Scrivano Date: Fri, 7 Apr 2023 16:05:26 +0200 Subject: [PATCH 1/2] tests: install irqbalance Signed-off-by: Giuseppe Scrivano --- tests/cri-o/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/cri-o/Dockerfile b/tests/cri-o/Dockerfile index eb5e65e045..cbe7f896a2 100644 --- a/tests/cri-o/Dockerfile +++ b/tests/cri-o/Dockerfile @@ -6,7 +6,7 @@ ENV PATH=/usr/bin:/usr/sbin:/root/go/bin:/usr/local/bin::/usr/local/sbin RUN yum install -y python git gcc automake autoconf libcap-devel \ systemd-devel yajl-devel libseccomp-devel go-md2man conntrack-tools which \ glibc-static python3-libmount libtool make podman xz nmap-ncat jq bats \ - libgcrypt-devel iproute openssl iputils socat criu-libs && \ + libgcrypt-devel iproute openssl iputils socat criu-libs irqbalance && \ dnf install -y 'dnf-command(builddep)' && dnf builddep -y podman && \ dnf remove -y golang && \ sudo dnf update -y && \ From 898ffb56f6f2fd08323737b2946fda8e5535110a Mon Sep 17 00:00:00 2001 From: Giuseppe Scrivano Date: Thu, 6 Apr 2023 22:03:29 +0200 Subject: [PATCH 2/2] tests: fix idmap mount test adapt the test to follow the new semantic where the mapping used is the same as the user namespace. Also drop the custom annotation tests, since now the feature is in the OCI specs. Signed-off-by: Giuseppe Scrivano --- tests/test_mounts.py | 22 ++++------------------ 1 file changed, 4 insertions(+), 18 deletions(-) diff --git a/tests/test_mounts.py b/tests/test_mounts.py index 1319e4e27a..5064eb17fc 100755 --- a/tests/test_mounts.py +++ b/tests/test_mounts.py @@ -384,27 +384,13 @@ def check(annotation, uidMappings, gidMappings, expected): return True return False - # first test with the custom crun annotation - if check("idmap", None, None, "0:0"): - return 1 - - if check("idmap=uids=0-1-10;gids=0-1-10", None, None, "0:0"): - return 1 - - if check("idmap=uids=0-2-10#10-100-10;gids=0-1-10", None, None, "1:0"): - return 1 - - os.chown(target, 1, 2) - if check("idmap=uids=@0-1-10;gids=+0-1-10", None, None, "2:2"): - return 1 - # and now test with uidMappings and gidMappings os.chown(target, 0, 0) mountMappings = [ { - "hostID": 0, - "containerID": 1, + "containerID": 0, + "hostID": 1, "size": 10 } ] @@ -413,8 +399,8 @@ def check(annotation, uidMappings, gidMappings, expected): mountMappings = [ { - "hostID": 0, - "containerID": 2, + "containerID": 0, + "hostID": 2, "size": 10 } ]