From f44d9442330c5ff35fc02c1097d2c0eb3af7d3c8 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Thu, 5 Dec 2024 11:48:18 +0000 Subject: [PATCH] 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 --- tests/test-libglnx-shutil.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/test-libglnx-shutil.c b/tests/test-libglnx-shutil.c index 28b34abe..42c3f109 100644 --- a/tests/test-libglnx-shutil.c +++ b/tests/test-libglnx-shutil.c @@ -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;