mirror of
https://gitlab.com/apparmor/apparmor
synced 2025-08-30 13:58:22 +00:00
utils: use realpath of tmpdir in test-aa-easyprof.py
The relative directory tests in test-aa-easyprof.py were failing when TMPDIR pointed to a directory that was a symlink, because the generated tmpdir path was not the same as the realpath that easyprof resolved to. This patch sets the tmpdir to the realpath of the result of the tempfile.mkdtemp() to avoid the issue. Signed-off-by: Steve Beattie <steve@nxnw.org> Acked-by: Christian Boltz <apparmor@cboltz.de>
This commit is contained in:
parent
6ceb2030f9
commit
07bcb79b1d
@ -108,7 +108,7 @@ class T(unittest.TestCase):
|
||||
'''Setup for tests'''
|
||||
global topdir
|
||||
|
||||
self.tmpdir = tempfile.mkdtemp(prefix='test-aa-easyprof')
|
||||
self.tmpdir = os.path.realpath(tempfile.mkdtemp(prefix='test-aa-easyprof'))
|
||||
|
||||
# Copy everything into place
|
||||
for d in ['easyprof/policygroups', 'easyprof/templates']:
|
||||
|
Loading…
x
Reference in New Issue
Block a user