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