In Refkit we wrote some oe-selftest tests which use oeqa.utils.commands.runqemu() to run qemu with different DEPLOY_DIR_IMAGE values (the real one in some cases, a manually constructed one in another). The artificial directory leaked from one test to another. I'm pretty sure now the root cause is that QemuRunner modifies the process state permanently by setting os.environ["DEPLOY_DIR_IMAGE"] and other env variables. It really shouldn't be doing that.
Patch sent: "[PATCH] QemuRunner: avoid tainting os.environ"