From 676efd89d5ff4eb8f473fbd994809cc263cf504a Mon Sep 17 00:00:00 2001 From: Valentin Rothberg Date: Fri, 8 May 2020 10:30:57 +0200 Subject: set --conmon-pidfile The --conmon-pidfile was not set in the spec leading to failing systemd units. Also add a system test to prevent future regressions. Signed-off-by: Valentin Rothberg --- test/system/030-run.bats | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'test') diff --git a/test/system/030-run.bats b/test/system/030-run.bats index 56e9fed3b..d5d5121f8 100644 --- a/test/system/030-run.bats +++ b/test/system/030-run.bats @@ -158,4 +158,20 @@ echo $rand | 0 | $rand run_podman 1 image exists $NONLOCAL_IMAGE } +# 'run --conmon-pidfile --cid-file' makes sure we don't regress on these flags. +# Both are critical for systemd units. +@test "podman run --conmon-pidfile --cidfile" { + pid=$(mktemp) + cid=$(mktemp) + + # CID file exists -> expected to fail. + run_podman 125 run --rm --conmon-pidfile=$pid --cidfile=$cid $IMAGE ls + + rm $pid $cid + run_podman run --name keepme --conmon-pidfile=$pid --cidfile=$cid --detach $IMAGE sleep infinity + stat $pid $cid + run_podman rm -f keepme + rm $pid $cid +} + # vim: filetype=sh -- cgit v1.2.3-54-g00ecf