diff options
-rw-r--r-- | recipes-containers/cri-o/README.md | 452 | ||||
-rw-r--r-- | recipes-containers/cri-o/cri-o_git.bb | 33 | ||||
-rw-r--r-- | recipes-containers/cri-o/files/0001-Add-trimpath-to-build-nri.test.patch | 31 | ||||
-rw-r--r-- | recipes-containers/cri-o/files/run-ptest | 11 |
4 files changed, 525 insertions, 2 deletions
diff --git a/recipes-containers/cri-o/README.md b/recipes-containers/cri-o/README.md new file mode 100644 index 00000000..e3dac040 --- /dev/null +++ b/recipes-containers/cri-o/README.md | |||
@@ -0,0 +1,452 @@ | |||
1 | # CRI-O Ptest Guide | ||
2 | |||
3 | The CRI-O ptest suite is a comprehensive and complex testing framework. This document provides key information and tips for its usage. | ||
4 | |||
5 | |||
6 | ## 1. Vendor Directory | ||
7 | |||
8 | By default, the `vendor` directory is not installed for ptest. However, the `ctr_seccomp.bats` test relies on a JSON file located at: | ||
9 | `vendor/github.com/containers/common/pkg/seccomp/seccomp.json`. | ||
10 | As a result, the ctr_seccomp.bats test will fail unless this file is manually added. | ||
11 | |||
12 | ### Steps to add seccomp.json: | ||
13 | - Manually create/copy the required JSON file. | ||
14 | - Set the `CONTAINER_SECCOMP_PROFILE` environment variable to point to the file's location. | ||
15 | |||
16 | ## 2. Runtime Dependencies (RDEPENDS) | ||
17 | |||
18 | The ptest suite requires several dependencies. As of the initial implementation, the runtime dependencies are defined as follows: | ||
19 | |||
20 | ```bash | ||
21 | RDEPENDS:${PN}-ptest += " \ | ||
22 | bash \ | ||
23 | bats \ | ||
24 | cni \ | ||
25 | crictl \ | ||
26 | coreutils \ | ||
27 | dbus-daemon-proxy \ | ||
28 | iproute2 \ | ||
29 | util-linux-unshare \ | ||
30 | jq \ | ||
31 | slirp4netns \ | ||
32 | parallel \ | ||
33 | podman \ | ||
34 | " | ||
35 | ``` | ||
36 | ### Explanation of Dependencies: | ||
37 | - **bash / bats**: The ptest suite is written using BATS and requires support from Bash. | ||
38 | - **cni / crictl / podman**: Tools for testing container creation, runtime, and networking, directly invoked by the tests. | ||
39 | - **jq**: Used in test scripts to create or manipulate JSON files. | ||
40 | - **iproute2 / slirp4netns**: Networking utilities required for validating network-related functionalities. | ||
41 | - **coreutils / dbus-daemon-proxy / util-linux-unshare**: Additional utilities supporting various test cases. | ||
42 | - **paralle**: bats using "parallel" to execute test in serial. | ||
43 | |||
44 | ## 3. Testing Log (Baseline Reference) | ||
45 | |||
46 | A summary of the test results is provided below for baseline reference: | ||
47 | |||
48 | - **PASS**: 317 tests | ||
49 | - **FAIL**: 33 tests | ||
50 | - **SKIP**: 32 tests | ||
51 | |||
52 | #### Full Log Example: | ||
53 | Below is an excerpt from a typical ptest log: | ||
54 | ```bash | ||
55 | root@intel-x86-64:~# ptest-runner cri-o -t 1000 | ||
56 | START: ptest-runner | ||
57 | 2024-11-23T14:50 | ||
58 | BEGIN: /usr/lib64/cri-o/ptest | ||
59 | SKIP: 1 apparmor tests (in sequence) # skip apparmor not enabled | ||
60 | PASS: 2 no CDI errors, create ctr without CDI devices | ||
61 | PASS: 3 no CDI errors, create ctr with CDI devices | ||
62 | PASS: 4 no CDI errors, create ctr with annotated CDI devices | ||
63 | PASS: 5 no CDI errors, create ctr with duplicate annotated CDI devices | ||
64 | PASS: 6 no CDI errors, fail to create ctr with unresolvable CDI devices | ||
65 | PASS: 7 no CDI errors, fail to create ctr with unresolvable annotated CDI devices | ||
66 | PASS: 8 CDI registry refresh | ||
67 | PASS: 9 CDI registry refresh, annotated CDI devices | ||
68 | PASS: 10 reload CRI-O CDI parameters | ||
69 | PASS: 11 reload CRI-O CDI parameters, with annotated CDI devices | ||
70 | PASS: 12 CDI with errors, create ctr without CDI devices | ||
71 | PASS: 13 CDI with errors, create ctr with (unaffected) CDI devices | ||
72 | PASS: 14 CDI with errors, create ctr with (unaffected) annotated CDI devices | ||
73 | PASS: 15 pids limit | ||
74 | PASS: 16 conmon pod cgroup | ||
75 | PASS: 17 conmon custom cgroup | ||
76 | PASS: 18 conmon custom cgroup with no infra container | ||
77 | SKIP: 19 conmonrs custom cgroup with no infra container # skip not supported for conmon | ||
78 | SKIP: 20 ctr with swap should be configured # skip swap not enabled | ||
79 | SKIP: 21 ctr with swap should fail when swap is lower # skip swap not enabled | ||
80 | PASS: 22 ctr swap only configured if enabled | ||
81 | SKIP: 23 ctr with swap should succeed when swap is unlimited # skip swap not enabled | ||
82 | PASS: 24 cgroupv2 unified support | ||
83 | SKIP: 25 cpu-quota.crio.io can disable quota # skip node must be configured with cgroupv1 for this test | ||
84 | SKIP: 26 checkpoint and restore one container into a new pod (drop infra:true) # skip CRIU check failed | ||
85 | SKIP: 27 checkpoint and restore one container into a new pod (drop infra:false) # skip CRIU check failed | ||
86 | SKIP: 28 checkpoint and restore one container into a new pod using --export to OCI image # skip CRIU check failed | ||
87 | SKIP: 29 checkpoint and restore one container into a new pod using --export to OCI image using repoDigest # skip CRIU check failed | ||
88 | SKIP: 30 checkpoint and restore one container into a new pod with a new name # skip CRIU check failed | ||
89 | PASS: 31 crio commands | ||
90 | PASS: 32 invalid ulimits | ||
91 | PASS: 33 invalid devices | ||
92 | PASS: 34 invalid metrics port | ||
93 | PASS: 35 invalid log max | ||
94 | PASS: 36 log max boundary testing | ||
95 | PASS: 37 default config should be empty | ||
96 | PASS: 38 config dir should succeed | ||
97 | PASS: 39 config dir should fail with invalid option | ||
98 | PASS: 40 config dir should fail with invalid evented_pleg option | ||
99 | PASS: 41 choose different default runtime should succeed | ||
100 | PASS: 42 runc not existing when default_runtime changed should succeed | ||
101 | PASS: 43 retain default runtime should succeed | ||
102 | PASS: 44 monitor fields should be translated | ||
103 | PASS: 45 handle nil workloads | ||
104 | PASS: 46 config dir should fail with invalid disable_hostport_mapping option | ||
105 | SKIP: 47 conmonrs is used # skip not using conmonrs | ||
106 | SKIP: 48 test cpu load balancing # skip not yet supported on cgroup2 | ||
107 | SKIP: 49 test cpu load balance disabled on manual stop # skip not yet supported on cgroup2 | ||
108 | SKIP: 50 test cpu load balance disabled on container exit # skip not yet supported on cgroup2 | ||
109 | PASS: 51 container memory metrics | ||
110 | SKIP: 52 container memory cgroupv1-specific metrics # skip | ||
111 | PASS: 53 storage directory check should find no issues | ||
112 | PASS: 54 storage directory check should find errors | ||
113 | PASS: 55 storage directory check should repair errors | ||
114 | PASS: 56 storage directory check should wipe everything on repair errors | ||
115 | PASS: 57 remove containers and images when remove both | ||
116 | PASS: 58 remove containers when remove temporary | ||
117 | PASS: 59 clear neither when remove persist | ||
118 | PASS: 60 don't clear podman containers | ||
119 | PASS: 61 clear everything when shutdown file not found | ||
120 | PASS: 62 clear podman containers when shutdown file not found | ||
121 | PASS: 63 fail to clear podman containers when shutdown file not found but container still running | ||
122 | PASS: 64 don't clear containers on a forced restart of crio | ||
123 | PASS: 65 don't clear containers if clean shutdown supported file not present | ||
124 | PASS: 66 internal_wipe remove containers and images when remove both | ||
125 | PASS: 67 internal_wipe remove containers when remove temporary and node reboots | ||
126 | PASS: 68 internal_wipe remove containers when remove temporary | ||
127 | PASS: 69 internal_wipe clear both when remove persist | ||
128 | PASS: 70 internal_wipe don't clear podman containers | ||
129 | PASS: 71 internal_wipe don't clear containers on a forced restart of crio | ||
130 | PASS: 72 internal_wipe eventually cleans network on forced restart of crio if network is slow to come up | ||
131 | PASS: 73 clean up image if corrupted on server restore | ||
132 | PASS: 74 recover from badly corrupted storage directory | ||
133 | SKIP: 75 run the critest suite # skip critest because RUN_CRITEST is not set | ||
134 | PASS: 76 ctr not found correct error message | ||
135 | PASS: 77 ctr termination reason Completed | ||
136 | PASS: 78 ctr termination reason Error | ||
137 | PASS: 79 ulimits | ||
138 | PASS: 80 ctr remove | ||
139 | PASS: 81 ctr lifecycle | ||
140 | PASS: 82 ctr pod lifecycle with evented pleg enabled | ||
141 | FAIL: 83 ctr logging | ||
142 | PASS: 84 ctr log cleaned up if container create failed | ||
143 | PASS: 85 ctr journald logging | ||
144 | PASS: 86 ctr logging [tty=true] | ||
145 | FAIL: 87 ctr log max | ||
146 | FAIL: 88 ctr log max with default value | ||
147 | FAIL: 89 ctr log max with minimum value | ||
148 | FAIL: 90 ctr partial line logging | ||
149 | PASS: 91 ctrs status for a pod | ||
150 | PASS: 92 ctr list filtering | ||
151 | PASS: 93 ctr list label filtering | ||
152 | PASS: 94 ctr metadata in list & status | ||
153 | PASS: 95 ctr execsync conflicting with conmon flags parsing | ||
154 | PASS: 96 ctr execsync | ||
155 | PASS: 97 ctr execsync should not overwrite initial spec args | ||
156 | PASS: 98 ctr execsync should succeed if container has a terminal | ||
157 | PASS: 99 ctr execsync should cap output | ||
158 | PASS: 100 ctr exec{,sync} should be cancelled when container is stopped | ||
159 | PASS: 101 ctr device add | ||
160 | PASS: 102 privileged ctr device add | ||
161 | PASS: 103 privileged ctr add duplicate device as host | ||
162 | PASS: 104 ctr hostname env | ||
163 | PASS: 105 ctr execsync failure | ||
164 | PASS: 106 ctr execsync exit code | ||
165 | PASS: 107 ctr execsync std{out,err} | ||
166 | PASS: 108 ctr stop idempotent | ||
167 | PASS: 109 ctr caps drop | ||
168 | PASS: 110 ctr with default list of capabilities from crio.conf | ||
169 | PASS: 111 ctr with list of capabilities given by user in crio.conf | ||
170 | PASS: 112 ctr with add_inheritable_capabilities has inheritable capabilities | ||
171 | PASS: 113 ctr /etc/resolv.conf rw/ro mode | ||
172 | PASS: 114 ctr create with non-existent command | ||
173 | PASS: 115 ctr create with non-existent command [tty] | ||
174 | PASS: 116 ctr update resources | ||
175 | PASS: 117 ctr correctly setup working directory | ||
176 | PASS: 118 ctr execsync conflicting with conmon env | ||
177 | PASS: 119 ctr resources | ||
178 | PASS: 120 ctr with non-root user has no effective capabilities | ||
179 | PASS: 121 ctr has gid in supplemental groups | ||
180 | PASS: 122 ctr has gid in supplemental groups with Merge policy | ||
181 | PASS: 123 ctr has only specified gid in supplemental groups with Strict policy | ||
182 | PASS: 124 ctr with low memory configured should not be created | ||
183 | PASS: 125 privileged ctr -- check for rw mounts | ||
184 | PASS: 126 annotations passed through | ||
185 | PASS: 127 ctr with default_env set in configuration | ||
186 | PASS: 128 ctr with absent mount that should be rejected | ||
187 | PASS: 129 ctr that mounts container storage as shared should keep shared | ||
188 | PASS: 130 ctr that mounts container storage as private should not be private | ||
189 | PASS: 131 ctr that mounts container storage as read-only option but not recursively | ||
190 | SKIP: 132 ctr that mounts container storage as recursively read-only # skip requires crictl version "1.30" or newer | ||
191 | SKIP: 133 ctr that fails to mount container storage as recursively read-only without readonly option # skip requires crictl version "1.30" or newer | ||
192 | SKIP: 134 ctr that fails to mount container storage as recursively read-only without private propagation # skip requires crictl version "1.30" or newer | ||
193 | PASS: 135 ctr has containerenv | ||
194 | PASS: 136 ctr stop timeouts should decrease | ||
195 | PASS: 137 ctr with node level pid namespace should not leak children | ||
196 | PASS: 138 ctr HOME env newline invalid | ||
197 | PASS: 139 ctr log linking | ||
198 | PASS: 140 ctr stop loop kill retry attempts | ||
199 | PASS: 141 ctr multiple stop calls | ||
200 | PASS: 142 pause/unpause ctr with right ctr id | ||
201 | PASS: 143 pause ctr with invalid ctr id | ||
202 | PASS: 144 pause ctr with already paused ctr | ||
203 | PASS: 145 unpause ctr with right ctr id with running ctr | ||
204 | PASS: 146 unpause ctr with invalid ctr id | ||
205 | PASS: 147 remove paused ctr | ||
206 | FAIL: 148 ctr seccomp profiles unconfined | ||
207 | FAIL: 149 ctr seccomp profiles runtime/default | ||
208 | FAIL: 150 ctr seccomp profiles wrong profile name | ||
209 | FAIL: 151 ctr seccomp profiles localhost profile name | ||
210 | FAIL: 152 ctr seccomp overrides unconfined profile with runtime/default when overridden | ||
211 | FAIL: 153 ctr seccomp profiles runtime/default block unshare | ||
212 | SKIP: 154 ctr_userns run container # skip userns testing not enabled | ||
213 | PASS: 155 bind secrets mounts to container | ||
214 | PASS: 156 default mounts correctly sorted with other mounts | ||
215 | PASS: 157 additional devices support | ||
216 | PASS: 158 additional devices permissions | ||
217 | PASS: 159 annotation devices support | ||
218 | PASS: 160 annotation should not be processed if not allowed | ||
219 | PASS: 161 annotation should override configured additional_devices | ||
220 | PASS: 162 annotation should not be processed if not allowed in allowed_devices | ||
221 | PASS: 163 annotation should configure multiple devices | ||
222 | PASS: 164 annotation should fail if one device is invalid | ||
223 | PASS: 165 test infra ctr dropped | ||
224 | PASS: 166 test infra ctr not dropped | ||
225 | PASS: 167 test infra ctr dropped status | ||
226 | PASS: 168 pod test hooks | ||
227 | PASS: 169 run container in pod with image ID | ||
228 | PASS: 170 container status when created by image ID | ||
229 | PASS: 171 container status when created by image tagged reference | ||
230 | PASS: 172 container status when created by image canonical reference | ||
231 | PASS: 173 container status when created by image list canonical reference | ||
232 | PASS: 174 image pull and list | ||
233 | PASS: 175 image pull and list using imagestore | ||
234 | SKIP: 176 image pull with signature # skip registry has some issues | ||
235 | PASS: 177 image pull and list by tag and ID | ||
236 | PASS: 178 image pull and list by digest and ID | ||
237 | PASS: 179 image pull and list by manifest list digest | ||
238 | PASS: 180 image pull and list by manifest list tag | ||
239 | PASS: 181 image pull and list by manifest list and individual digest | ||
240 | PASS: 182 image pull and list by individual and manifest list digest | ||
241 | PASS: 183 image list with filter | ||
242 | PASS: 184 image list/remove | ||
243 | PASS: 185 image status/remove | ||
244 | SKIP: 186 run container in pod with crun-wasm enabled # skip crun-wasm not installed or runtime type is VM | ||
245 | PASS: 187 check if image is pinned appropriately | ||
246 | PASS: 188 run container in pod with timezone configured | ||
247 | PASS: 189 run container in pod with local timezone | ||
248 | PASS: 190 run container with memory_limit_in_bytes -1 | ||
249 | PASS: 191 run container with memory_limit_in_bytes 12.5MiB | ||
250 | PASS: 192 run container with container_min_memory 17.5MiB | ||
251 | PASS: 193 run container with container_min_memory 5.5MiB | ||
252 | PASS: 194 run container with empty container_min_memory | ||
253 | PASS: 195 image remove with multiple names, by name | ||
254 | PASS: 196 image remove with multiple names, by ID | ||
255 | PASS: 197 image volume ignore | ||
256 | PASS: 198 image volume bind | ||
257 | PASS: 199 image volume user mkdir | ||
258 | PASS: 200 image fs info with default settings should return matching container_filesystem and image_filesystem | ||
259 | PASS: 201 image fs info with imagestore set should return different filesystems | ||
260 | PASS: 202 test infra ctr cpuset | ||
261 | PASS: 203 info inspect | ||
262 | PASS: 204 ctr inspect | ||
263 | PASS: 205 pod inspect when dropping infra | ||
264 | PASS: 206 ctr inspect not found | ||
265 | PASS: 207 inspect image should succeed contain all necessary information | ||
266 | SKIP: 208 irqbalance tests (in sequence) # skip irqbalance not found. | ||
267 | SKIP: 209 container run with kata should have containerd-shim-kata-v2 process running # skip Not | ||
268 | PASS: 210 metrics with default host and port | ||
269 | FAIL: 211 metrics with custom host using localhost and random port | ||
270 | FAIL: 212 secure metrics with random port | ||
271 | FAIL: 213 secure metrics with random port and missing cert/key | ||
272 | PASS: 214 pid namespace mode pod test | ||
273 | PASS: 215 pid namespace mode target test | ||
274 | PASS: 216 KUBENSMNT mount namespace | ||
275 | PASS: 217 ensure correct hostname | ||
276 | PASS: 218 ensure correct hostname for hostnetwork:true | ||
277 | PASS: 219 Check for valid pod netns CIDR | ||
278 | PASS: 220 Ensure correct CNI plugin namespace/name/container-id arguments | ||
279 | SKIP: 221 Connect to pod hostport from the host # skip node configured with cgroupv2 flakes this test sometimes | ||
280 | PASS: 222 Clean up network if pod sandbox fails | ||
281 | PASS: 223 Clean up network if pod sandbox fails after plugin success | ||
282 | PASS: 224 Clean up network if pod sandbox gets killed | ||
283 | PASS: 225 Ping pod from the host / another pod | ||
284 | PASS: 226 run NRI PluginRegistration test | ||
285 | PASS: 227 run NRI PluginSynchronization test | ||
286 | PASS: 228 run NRI PodEvents test | ||
287 | PASS: 229 run NRI ContainerEvents test | ||
288 | PASS: 230 run NRI MountInjection test | ||
289 | PASS: 231 run NRI EnvironmentInjection test | ||
290 | PASS: 232 run NRI AnnotationInjection test | ||
291 | PASS: 233 run NRI DeviceInjection test | ||
292 | PASS: 234 run NRI CpusetAdjustment test | ||
293 | PASS: 235 run NRI MemsetAdjustment test | ||
294 | PASS: 236 run NRI CpusetAdjustmentUpdate test | ||
295 | PASS: 237 run NRI MemsetAdjustmentUpdate test | ||
296 | SKIP: 238 OCI image volume mount lifecycle # skip requires crictl version "1.31" or newer | ||
297 | PASS: 239 pod release name on remove | ||
298 | PASS: 240 pod remove | ||
299 | PASS: 241 pod stop ignores not found sandboxes | ||
300 | PASS: 242 pod list filtering | ||
301 | PASS: 243 pod metadata in list & status | ||
302 | PASS: 244 pass pod sysctls to runtime | ||
303 | PASS: 245 pass pod sysctls to runtime when in userns | ||
304 | SKIP: 246 disable crypto.fips_enabled when FIPS_DISABLE is set # skip The directory /proc/sys/crypto does not exist on this host. | ||
305 | PASS: 247 fail to pass pod sysctls to runtime if invalid spaces | ||
306 | PASS: 248 fail to pass pod sysctl to runtime if invalid value | ||
307 | PASS: 249 skip pod sysctls to runtime if host | ||
308 | PASS: 250 pod stop idempotent | ||
309 | PASS: 251 pod remove idempotent | ||
310 | PASS: 252 pod stop idempotent with ctrs already stopped | ||
311 | PASS: 253 restart crio and still get pod status | ||
312 | PASS: 254 invalid systemd cgroup_parent fail | ||
313 | PASS: 255 systemd cgroup_parent correctly set | ||
314 | PASS: 256 kubernetes pod terminationGracePeriod passthru | ||
315 | PASS: 257 pod pause image matches configured image in crio.conf | ||
316 | PASS: 258 pod stop cleans up all namespaces | ||
317 | PASS: 259 pod with the correct etc folder ownership | ||
318 | PASS: 260 verify RunAsGroup in container | ||
319 | PASS: 261 single cni plugin with pod annotations capability enabled | ||
320 | PASS: 262 single cni plugin with pod annotations capability disabled | ||
321 | PASS: 263 pod annotations capability for chained cni plugins | ||
322 | PASS: 264 accept unsigned image with default policy | ||
323 | PASS: 265 deny unsigned image with restrictive policy | ||
324 | PASS: 266 accept signed image with default policy | ||
325 | FAIL: 267 accept signed image with restrictive policy | ||
326 | PASS: 268 accept unsigned image with not existing namespace policy | ||
327 | PASS: 269 accept unsigned image with higher priority namespace policy | ||
328 | PASS: 270 deny unsigned image with higher priority namespace policy | ||
329 | FAIL: 271 accept signed image with higher priority namespace policy | ||
330 | PASS: 272 pprof | ||
331 | PASS: 273 pprof over unix socket | ||
332 | PASS: 274 reload config should succeed | ||
333 | PASS: 275 reload config should succeed with 'log_level' | ||
334 | PASS: 276 reload config should fail with 'log_level' if invalid | ||
335 | PASS: 277 reload config should fail with if config is malformed | ||
336 | PASS: 278 reload config should succeed with 'pause_image' | ||
337 | PASS: 279 reload config should succeed with 'pause_command' | ||
338 | PASS: 280 reload config should succeed with 'pause_image_auth_file' | ||
339 | PASS: 281 reload config should fail with non existing 'pause_image_auth_file' | ||
340 | PASS: 282 reload config should succeed with 'log_filter' | ||
341 | PASS: 283 reload config should fail with invalid 'log_filter' | ||
342 | PASS: 284 reload config should succeed with 'decryption_keys_path' | ||
343 | PASS: 285 reload config should succeed with 'seccomp_profile' | ||
344 | FAIL: 286 reload config should not fail with invalid 'seccomp_profile' | ||
345 | SKIP: 287 reload config should succeed with 'apparmor_profile' # skip apparmor not enabled | ||
346 | SKIP: 288 reload config should fail with invalid 'apparmor_profile' # skip apparmor not enabled | ||
347 | PASS: 289 reload config should add new runtime | ||
348 | PASS: 290 reload config should update 'pinned_images' | ||
349 | PASS: 291 reload config should update 'pinned_images' and only 'pause_image' is pinned | ||
350 | PASS: 292 reload config should update 'pause_image' and it becomes 'pinned_images' | ||
351 | PASS: 293 reload config should remove pinned images when an empty list is provided | ||
352 | PASS: 294 reload system registries should succeed | ||
353 | PASS: 295 reload system registries should succeed with new registry | ||
354 | PASS: 296 reload system registries should fail on invalid syntax in file | ||
355 | PASS: 297 system registries should succeed with new registry without reload | ||
356 | PASS: 298 system registries should fail on invalid syntax in file without reload | ||
357 | PASS: 299 system handles burst of configuration changes without excessive reloads | ||
358 | PASS: 300 system handles duplicate events for the same file | ||
359 | PASS: 301 crio restore | ||
360 | PASS: 302 crio restore with pod stopped | ||
361 | PASS: 303 crio restore with bad state and pod stopped | ||
362 | PASS: 304 crio restore with bad state and ctr stopped | ||
363 | PASS: 305 crio restore with bad state and ctr removed | ||
364 | PASS: 306 crio restore with bad state and pod removed | ||
365 | PASS: 307 crio restore with bad state | ||
366 | PASS: 308 crio restore with missing config.json | ||
367 | PASS: 309 crio restore first not managing then managing | ||
368 | PASS: 310 crio restore first managing then not managing | ||
369 | PASS: 311 crio restore changing managing dir | ||
370 | PASS: 312 crio restore upon entering KUBENSMNT | ||
371 | PASS: 313 crio restore upon exiting KUBENSMNT | ||
372 | PASS: 314 crio restore volumes for containers | ||
373 | PASS: 315 crictl runtimeversion | ||
374 | PASS: 316 if fs.may_detach_mounts is set | ||
375 | FAIL: 317 seccomp notifier with runtime/default | ||
376 | FAIL: 318 seccomp notifier with runtime/default but not stop | ||
377 | FAIL: 319 seccomp notifier with custom profile | ||
378 | FAIL: 320 seccomp notifier should not work if annotation is not allowed | ||
379 | FAIL: 321 seccomp OCI artifact with image annotation without suffix | ||
380 | FAIL: 322 seccomp OCI artifact with image annotation for pod | ||
381 | FAIL: 323 seccomp OCI artifact with image annotation for container | ||
382 | PASS: 324 seccomp OCI artifact with image annotation but not allowed annotation on runtime config | ||
383 | FAIL: 325 seccomp OCI artifact with image annotation and profile set to unconfined | ||
384 | PASS: 326 seccomp OCI artifact with image annotation but set runtime default profile with higher priority | ||
385 | FAIL: 327 seccomp OCI artifact with image annotation but set localhost profile with higher priority | ||
386 | FAIL: 328 seccomp OCI artifact with pod annotation | ||
387 | FAIL: 329 seccomp OCI artifact with container annotation | ||
388 | PASS: 330 seccomp OCI artifact with bogus annotation | ||
389 | PASS: 331 seccomp OCI artifact with missing artifact | ||
390 | PASS: 332 selinux label level=s0 is sufficient | ||
391 | SKIP: 333 selinux skips relabeling if TrySkipVolumeSELinuxLabel annotation is present # skip not enforcing | ||
392 | SKIP: 334 selinux skips relabeling for super privileged container # skip not enforcing | ||
393 | PASS: 335 ctr check shared /dev/shm | ||
394 | PASS: 336 check /dev/shm is changed | ||
395 | PASS: 337 check /dev/shm fails with incorrect values | ||
396 | PASS: 338 stats | ||
397 | PASS: 339 container stats | ||
398 | PASS: 340 pod stats | ||
399 | PASS: 341 status not should fail if no subcommand is provided | ||
400 | PASS: 342 status should succeed to retrieve the config | ||
401 | PASS: 343 status should fail to retrieve the config with invalid socket | ||
402 | PASS: 344 status should succeed to retrieve the info | ||
403 | PASS: 345 status should fail to retrieve the info with invalid socket | ||
404 | PASS: 346 succeed to retrieve the container info | ||
405 | PASS: 347 should fail to retrieve the container info without ID | ||
406 | PASS: 348 should fail to retrieve the container with invalid socket | ||
407 | PASS: 349 should not clean up pod after timeout | ||
408 | FAIL: 350 emit metric when sandbox is re-requested | ||
409 | PASS: 351 should not clean up container after timeout | ||
410 | PASS: 352 should clean up pod after timeout if request changes | ||
411 | PASS: 353 should clean up container after timeout if request changes | ||
412 | PASS: 354 should clean up pod after timeout if not re-requested | ||
413 | PASS: 355 should not wait for actual duplicate pod request | ||
414 | PASS: 356 should clean up container after timeout if not re-requested | ||
415 | FAIL: 357 emit metric when container is re-requested | ||
416 | PASS: 358 should not be able to operate on a timed out pod | ||
417 | PASS: 359 should not be able to operate on a timed out container | ||
418 | PASS: 360 should not wait for actual duplicate container request | ||
419 | PASS: 361 check umask is changed | ||
420 | FAIL: 362 userns annotation auto should succeed | ||
421 | PASS: 363 userns annotation auto with keep-id and map-to-root should fail | ||
422 | FAIL: 364 userns annotation auto should map host run_as_user | ||
423 | FAIL: 365 version | ||
424 | PASS: 366 version -j | ||
425 | PASS: 367 test workload gets configured to defaults | ||
426 | PASS: 368 test workload can override defaults | ||
427 | PASS: 369 test workload should not be set if not defaulted or specified | ||
428 | PASS: 370 test workload should not be set if annotation not specified | ||
429 | PASS: 371 test workload pod gets configured to defaults | ||
430 | PASS: 372 test workload can override pod defaults | ||
431 | PASS: 373 test workload pod should not be set if not defaulted or specified | ||
432 | PASS: 374 test workload pod should not be set if annotation not specified | ||
433 | PASS: 375 test workload pod should override infra_ctr_cpuset option | ||
434 | PASS: 376 test workload allowed annotation should not work if not configured | ||
435 | PASS: 377 test workload allowed annotation appended with runtime | ||
436 | PASS: 378 test workload allowed annotation works for pod | ||
437 | PASS: 379 test resource cleanup on bad annotation contents | ||
438 | PASS: 380 test workload pod should not be set if annotation not specified even if prefix | ||
439 | PASS: 381 test special runtime annotations not allowed | ||
440 | PASS: 382 test special runtime annotations allowed | ||
441 | |||
442 | real 9m12.847s | ||
443 | user 42m18.946s | ||
444 | sys 8m15.064s | ||
445 | DURATION: 553 | ||
446 | END: /usr/lib64/cri-o/ptest | ||
447 | 2024-11-23T14:59 | ||
448 | STOP: ptest-runner | ||
449 | TOTAL: 1 FAIL: 0 | ||
450 | root@intel-x86-64:~# | ||
451 | ``` | ||
452 | |||
diff --git a/recipes-containers/cri-o/cri-o_git.bb b/recipes-containers/cri-o/cri-o_git.bb index efc86fbe..f04c4feb 100644 --- a/recipes-containers/cri-o/cri-o_git.bb +++ b/recipes-containers/cri-o/cri-o_git.bb | |||
@@ -17,7 +17,9 @@ At a high level, we expect the scope of cri-o to be restricted to the following | |||
17 | SRCREV_cri-o = "20c06a19cb395445620c31730c0f1a0a1922eaae" | 17 | SRCREV_cri-o = "20c06a19cb395445620c31730c0f1a0a1922eaae" |
18 | SRC_URI = "\ | 18 | SRC_URI = "\ |
19 | git://github.com/kubernetes-sigs/cri-o.git;branch=release-1.31;name=cri-o;protocol=https;destsuffix=${GO_SRCURI_DESTSUFFIX} \ | 19 | git://github.com/kubernetes-sigs/cri-o.git;branch=release-1.31;name=cri-o;protocol=https;destsuffix=${GO_SRCURI_DESTSUFFIX} \ |
20 | file://0001-Add-trimpath-to-build-nri.test.patch \ | ||
20 | file://crio.conf \ | 21 | file://crio.conf \ |
22 | file://run-ptest \ | ||
21 | " | 23 | " |
22 | 24 | ||
23 | # Apache-2.0 for docker | 25 | # Apache-2.0 for docker |
@@ -28,7 +30,7 @@ GO_IMPORT = "import" | |||
28 | 30 | ||
29 | PV = "1.31.0+git${SRCREV_cri-o}" | 31 | PV = "1.31.0+git${SRCREV_cri-o}" |
30 | 32 | ||
31 | inherit features_check | 33 | inherit features_check ptest |
32 | REQUIRED_DISTRO_FEATURES ?= "seccomp" | 34 | REQUIRED_DISTRO_FEATURES ?= "seccomp" |
33 | 35 | ||
34 | DEPENDS = " \ | 36 | DEPENDS = " \ |
@@ -69,6 +71,13 @@ do_compile() { | |||
69 | oe_runmake binaries | 71 | oe_runmake binaries |
70 | } | 72 | } |
71 | 73 | ||
74 | do_compile_ptest() { | ||
75 | set +e | ||
76 | |||
77 | cd ${S}/src/import | ||
78 | |||
79 | oe_runmake test-binaries | ||
80 | } | ||
72 | SYSTEMD_PACKAGES = "${@bb.utils.contains('DISTRO_FEATURES','systemd','${PN}','',d)}" | 81 | SYSTEMD_PACKAGES = "${@bb.utils.contains('DISTRO_FEATURES','systemd','${PN}','',d)}" |
73 | SYSTEMD_SERVICE:${PN} = "${@bb.utils.contains('DISTRO_FEATURES','systemd','crio.service','',d)}" | 82 | SYSTEMD_SERVICE:${PN} = "${@bb.utils.contains('DISTRO_FEATURES','systemd','crio.service','',d)}" |
74 | SYSTEMD_AUTO_ENABLE:${PN} = "enable" | 83 | SYSTEMD_AUTO_ENABLE:${PN} = "enable" |
@@ -100,6 +109,12 @@ do_install() { | |||
100 | install -d ${D}${localstatedir}/lib/crio | 109 | install -d ${D}${localstatedir}/lib/crio |
101 | } | 110 | } |
102 | 111 | ||
112 | do_install_ptest() { | ||
113 | install -d ${D}${PTEST_PATH}/test | ||
114 | install -d ${D}${PTEST_PATH}/bin | ||
115 | cp -rf ${S}/src/import/test ${D}${PTEST_PATH} | ||
116 | cp -rf ${S}/src/import/bin ${D}${PTEST_PATH} | ||
117 | } | ||
103 | FILES:${PN}-config = "${sysconfdir}/crio/config/*" | 118 | FILES:${PN}-config = "${sysconfdir}/crio/config/*" |
104 | FILES:${PN} += "${systemd_unitdir}/system/*" | 119 | FILES:${PN} += "${systemd_unitdir}/system/*" |
105 | FILES:${PN} += "/usr/local/bin/*" | 120 | FILES:${PN} += "/usr/local/bin/*" |
@@ -109,7 +124,21 @@ FILES:${PN} += "/usr/share/containers/oci/hooks.d" | |||
109 | ALLOW_EMPTY:${PN} = "1" | 124 | ALLOW_EMPTY:${PN} = "1" |
110 | 125 | ||
111 | INSANE_SKIP:${PN} += "ldflags already-stripped textrel" | 126 | INSANE_SKIP:${PN} += "ldflags already-stripped textrel" |
127 | INSANE_SKIP:${PN}-ptest += "textrel" | ||
112 | 128 | ||
113 | deltask compile_ptest_base | 129 | RDEPENDS:${PN}-ptest += " \ |
130 | bash \ | ||
131 | bats \ | ||
132 | cni \ | ||
133 | crictl \ | ||
134 | coreutils \ | ||
135 | dbus-daemon-proxy \ | ||
136 | iproute2 \ | ||
137 | util-linux-unshare \ | ||
138 | jq \ | ||
139 | slirp4netns \ | ||
140 | parallel \ | ||
141 | podman \ | ||
142 | " | ||
114 | 143 | ||
115 | COMPATIBLE_HOST = "^(?!(qemu)?mips).*" | 144 | COMPATIBLE_HOST = "^(?!(qemu)?mips).*" |
diff --git a/recipes-containers/cri-o/files/0001-Add-trimpath-to-build-nri.test.patch b/recipes-containers/cri-o/files/0001-Add-trimpath-to-build-nri.test.patch new file mode 100644 index 00000000..c6be41f0 --- /dev/null +++ b/recipes-containers/cri-o/files/0001-Add-trimpath-to-build-nri.test.patch | |||
@@ -0,0 +1,31 @@ | |||
1 | From 0bf230f59d211044e7993543e010b0d7f9dcead3 Mon Sep 17 00:00:00 2001 | ||
2 | From: Peng Zhang <peng.zhang1.cn@windriver.com> | ||
3 | Date: Fri, 25 Oct 2024 10:42:02 +0800 | ||
4 | Subject: [PATCH] Add --trimpath to build nri.test | ||
5 | |||
6 | when build test-binary, TMPDIR[buildpaths] error found in nri.test | ||
7 | to fix this error, add "--trimpath" option to build nri.test. | ||
8 | |||
9 | Upstream-Status: Inappropriate [oe specific] | ||
10 | |||
11 | Signed-off-by: Peng Zhang <peng.zhang1.cn@windriver.com> | ||
12 | --- | ||
13 | Makefile | 2 +- | ||
14 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
15 | |||
16 | Index: cri-o-1.31.0+git20c06a19cb395445620c31730c0f1a0a1922eaae/src/import/Makefile | ||
17 | =================================================================== | ||
18 | --- cri-o-1.31.0+git20c06a19cb395445620c31730c0f1a0a1922eaae.orig/src/import/Makefile | ||
19 | +++ cri-o-1.31.0+git20c06a19cb395445620c31730c0f1a0a1922eaae/src/import/Makefile | ||
20 | @@ -169,7 +169,7 @@ test/checkcriu/checkcriu: $(GO_FILES) | ||
21 | $(GO_BUILD) $(GCFLAGS) $(GO_LDFLAGS) -tags "$(BUILDTAGS)" -o $@ ./test/checkcriu | ||
22 | |||
23 | test/nri/nri.test: $(wildcard test/nri/*.go) | ||
24 | - $(GO) test --tags "test $(BUILDTAGS)" -c ./test/nri -o $@ | ||
25 | + $(GO) test --tags "test $(BUILDTAGS)" -c ./test/nri -o $@ ${TRIMPATH} | ||
26 | |||
27 | bin/crio: $(GO_FILES) | ||
28 | $(GO_BUILD) $(GCFLAGS) $(GO_LDFLAGS) -tags "$(BUILDTAGS)" -o $@ ./cmd/crio | ||
29 | -- | ||
30 | 2.34.1 | ||
31 | |||
diff --git a/recipes-containers/cri-o/files/run-ptest b/recipes-containers/cri-o/files/run-ptest new file mode 100644 index 00000000..62abe959 --- /dev/null +++ b/recipes-containers/cri-o/files/run-ptest | |||
@@ -0,0 +1,11 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | ./test/test_runner.sh | while IFS= read -r line; do | ||
4 | if [[ $line =~ ^not\ ok ]]; then | ||
5 | echo "FAIL: ${line#not ok }" | ||
6 | elif [[ $line =~ ^ok && ! $line =~ \#\ skip ]]; then | ||
7 | echo "PASS: ${line#ok }" | ||
8 | elif [[ $line =~ ^ok.*#\ skip ]]; then | ||
9 | echo "SKIP: ${line#ok }" | ||
10 | fi | ||
11 | done | ||