From: Lennart Poettering Date: Wed, 8 Nov 2023 08:48:42 +0000 (+0100) Subject: test: add integration test for capsules X-Git-Tag: v256-rc1~402^2~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a037f2eb9b9a4aff33ff44217a68e77bb14fdec8;p=thirdparty%2Fsystemd.git test: add integration test for capsules --- diff --git a/test/units/testsuite-74.capsule.sh b/test/units/testsuite-74.capsule.sh new file mode 100755 index 00000000000..e7b5c877470 --- /dev/null +++ b/test/units/testsuite-74.capsule.sh @@ -0,0 +1,53 @@ +#!/usr/bin/env bash +# SPDX-License-Identifier: LGPL-2.1-or-later +# shellcheck disable=SC2235 +set -eux +set -o pipefail + +at_exit() { + set +e + systemctl --no-block stop capsule@foobar.service + rm -rf /run/capsules/foobar + rm -rf /var/lib/capsules/foobar + rm -f /run/systemd/system/capsule@.service.d/99-asan.conf +} + +trap at_exit EXIT + +# Appease ASan, since the capsule@.service uses DynamicUser=yes +systemctl edit --runtime --stdin capsule@.service --drop-in=99-asan.conf <