I hit a case where I wasn't able to run tests, getting segfaults for all of them, because I was trying to run them as a normal user on a system that is also used as a CI/CD build agent. The build agent had already done a few builds, initializing /tmp/VMPC2000XL-test under its agent user name. Then when I tried to run the tests manually as a non-agent user, mpc::Mpc::init() was never invoked because TestMpc::initialize... couldn't actually perform fs::remove_all(testDocPath);.
One way forward would be to have CI/CD jobs clean up the dir in /tmp. Another would be for each test to create a different dir in temp (based on a UUID for example), but this would easily pollute the filesystem way too much.
I hit a case where I wasn't able to run tests, getting segfaults for all of them, because I was trying to run them as a normal user on a system that is also used as a CI/CD build agent. The build agent had already done a few builds, initializing
/tmp/VMPC2000XL-testunder its agent user name. Then when I tried to run the tests manually as a non-agent user,mpc::Mpc::init()was never invoked becauseTestMpc::initialize...couldn't actually performfs::remove_all(testDocPath);.One way forward would be to have CI/CD jobs clean up the dir in
/tmp. Another would be for each test to create a different dir in temp (based on a UUID for example), but this would easily pollute the filesystem way too much.