From: Frantisek Sumsal Date: Fri, 2 Jun 2023 08:07:57 +0000 (+0200) Subject: test: clean up our mess after the pstore test X-Git-Tag: v254-rc1~297^2~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e8ee168344f7f6b08504e086ef1b3a2cee044f88;p=thirdparty%2Fsystemd.git test: clean up our mess after the pstore test --- diff --git a/test/units/testsuite-74.pstore.sh b/test/units/testsuite-74.pstore.sh index 1b475a3f2a3..9be8066e8e2 100755 --- a/test/units/testsuite-74.pstore.sh +++ b/test/units/testsuite-74.pstore.sh @@ -125,6 +125,17 @@ start_pstore() { journalctl --sync } +at_exit() { + set +e + + mountpoint -q /sys/fs/pstore && umount /sys/fs/pstore + rm -fr /var/lib/systemd/pstore/* + rm -f /run/systemd/system/systemd-pstore.service.d/99-StartLimitInterval.conf + rm -f /run/systemd/pstore.conf.d/99-test.conf +} + +trap at_exit EXIT + # To avoid having to depend on the VM providing the pstore, let's simulate # it using a simple bind mount PSTORE_DIR="$(mktemp -d)"