tests: Run each shutil test in a temporary directory

Otherwise it could potentially race with tests in other executables that
also want to create `./test`, or interfere with other test-cases in the
same executable that expect `./test` to be nonexistent or empty.

Signed-off-by: Simon McVittie <smcv@collabora.com>
This commit is contained in:
Simon McVittie
2024-12-05 11:48:18 +00:00
parent b345955140
commit f44d944233

View File

@@ -32,6 +32,7 @@
static void
test_mkdir_p_enoent (void)
{
_GLNX_TEST_SCOPED_TEMP_DIR;
_GLNX_TEST_DECLARE_ERROR(local_error, error);
glnx_autofd int dfd = -1;