From a037f2eb9b9a4aff33ff44217a68e77bb14fdec8 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Wed, 8 Nov 2023 09:48:42 +0100 Subject: [PATCH] test: add integration test for capsules --- test/units/testsuite-74.capsule.sh | 53 ++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100755 test/units/testsuite-74.capsule.sh 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 <