It's feasible to track down any current tests that coincidentally call dump_recon_cache and make sure the test properly configures recon_cache_path to a tempdir...
But for ongoing maintenance we might try to go as far as adding a guard in dump_recon_cache that can detect if the runtime is tests and disallow the default path of /var/cache/swift
maybe have something in test/__init__.py that sets a global flag in swift.common.utils
It's feasible to track down any current tests that coincidentally call dump_recon_cache and make sure the test properly configures recon_cache_path to a tempdir...
But for ongoing maintenance we might try to go as far as adding a guard in dump_recon_cache that can detect if the runtime is tests and disallow the default path of /var/cache/swift
maybe have something in test/__init__.py that sets a global flag in swift.common.utils