From Fedora Project Wiki
Description
This test verifies that conmon-v3 monitors a detached container and reports its exit status.
How to test
- Start a container that exits with code 42:
podman run -d --name conmon-exit registry.fedoraproject.org/fedora:latest sh -c 'sleep 20; exit 42'
- Wait for the container to exit (this will hang for 20 seconds - matching the previous sleep):
podman wait conmon-exit
- Check its state and exit code:
podman inspect --format '{{.State.Status}} {{.State.ExitCode}}' conmon-exit - Clean up:
podman rm conmon-exit
Expected Results
- The container starts in the background.
podman waitprints42.- Inspect prints
exited 42. - All commands except the podman wait finish without hanging.
Optional
Repeat the test using exit 0. The reported exit code should be 0.
