From 9a9ab086e26a29aaead8749eb443cca479a26077 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Sat, 1 Aug 2020 08:56:28 +0200 Subject: [PATCH] test: Kill podman pause process between tests Working with user podman API leaves behind a `podman pause` process which is not attached to/stopped by podman.service. Avoid that leaking into the next test while the data directories get restored. See https://github.com/containers/podman/issues/7180 --- test/check-application | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/check-application b/test/check-application index 12dbca9d..76226d29 100755 --- a/test/check-application +++ b/test/check-application @@ -63,6 +63,9 @@ class TestApplication(testlib.MachineCase): # Enable user service as well self.restore_dir("/home/admin/.local/share/containers") self.admin_s.execute("systemctl --now --user enable podman.socket") + # HACK: user podman.service leaks a "podman pause" outside of the unit: https://github.com/containers/podman/issues/7180 + self.addCleanup(self.admin_s.execute, "pkill -u $USER -e podman; while pgrep -u $USER -a podman; do sleep 1; done") + self.addCleanup(self.admin_s.execute, "podman rm --force --all; systemctl --user stop podman.service podman.socket") self.allow_journal_messages("/run.*/podman/podman: couldn't connect.*")