b11d6e058b
... during tests. qubes.ext.Extension class is a weird thing that tries to make each extension a singleton. But this unfortunately have a side effect that __init__() is called separately for each "instance" (created in Qubes()'s __init__()), even though this is really the same object. During normal execution this isn't an issue, because there is just one Qubes() object instance. But during tests, multiple objects are created. In this particular case, it caused PolicyCache() to be created twice and the second one overriden the first one - without properly cleaning it up. This leaks a file descriptor (inotify one). The fact that cleanup() was called twice too didn't helped, because it was really called on the same object, the one requiring cleanup was already gone. Workaround this by checking if policy_cache field is initialize and avoid re-initialize it. Also, on Qubes() object cleanup remove that field, so it can be properly initialized on the next test iteration. |
||
---|---|---|
.. | ||
api | ||
ext | ||
qmemman | ||
storage | ||
tests | ||
tools | ||
vm | ||
__init__.py | ||
app.py | ||
backup.py | ||
config.py | ||
devices.py | ||
dochelpers.py | ||
events.py | ||
exc.py | ||
features.py | ||
firewall.py | ||
log.py | ||
rngdoc.py | ||
tarwriter.py | ||
utils.py |