Test suite with pytest writes to /tmp directory, which may cause issue about writing privilege.
The tests in pytest will create files (executables/boot images, text files) in /tmp folder. This causes an issue when two users run the tests on a same machine: the first user creates executables in /tmp directory, and the second user does not have privilege to overwrite the file, which causes the test fail.
A test should either create its own temp directory (and name it as code emitting directory for Zebu by using --aot-emit-dir=<dir>
), or use the default emit directory under current directory and put all generated files there. Thus once the test is done, we can simply delete the specified folder, and next test run will be a fresh one. A test should not generate files in anywhere other than the specified directory, as this not only causes issue about writing privilege between users, but also gives a high possibility that we may accidentally run executables from previous test runs.