tests: Adjust path for swtpm state to use path under /var/tmp/
authorStefan Berger <stefanb@linux.ibm.com>
Wed, 6 Nov 2024 18:07:51 +0000 (13:07 -0500)
committerStefan Berger <stefanb@linux.ibm.com>
Thu, 7 Nov 2024 14:57:20 +0000 (09:57 -0500)
commite3edada526f3ac28f71dc8ae7a0acbc76f8e2050
tree8693ef8dd1fbf47ef385d73bb8d9936608d34465
parent63dc36944383f70f1c7a20f6104966d8560300fa
tests: Adjust path for swtpm state to use path under /var/tmp/

To avoid AppArmor-related test failures when functional test are run from
somewhere under /mnt, adjust the path to swtpm's state to use an AppArmor-
supported path, such as /var/tmp, which is provided by the python function
tempfile.TemporaryDirectory().

An update to swtpm's AppArmor profile is also being done to support /var/tmp.

Link: https://lore.kernel.org/qemu-devel/CAFEAcA8A=kWLtTZ+nua-MpzqkaEjW5srOYZruZnE2tB6vmoMig@mail.gmail.com/
Link: https://github.com/stefanberger/swtpm/pull/944
Tested-by: Peter Maydell <peter.maydell@linaro.org>
Fixes: f04cb2d00d5c ("tests/functional: Convert most Aspeed machine tests")
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
tests/functional/test_arm_aspeed.py