Commit b7ffc07d authored by Philip Withnall's avatar Philip Withnall

tests: Improve error handling for fileutils test

The test_stdio_wrappers() test will spuriously fail if the mkdir-test
directory already exists and is non-empty, which can happen if a
previous test run has failed and left a coredump file in the directory.
Tighten up the error checking around the pre-test rmdir() call to catch
this failure.
Signed-off-by: Philip Withnall's avatarPhilip Withnall <>
parent 5c1e8566
......@@ -848,7 +848,8 @@ test_stdio_wrappers (void)
GError *error = NULL;
g_remove ("mkdir-test/test-create");
g_rmdir ("mkdir-test");
ret = g_rmdir ("mkdir-test");
g_assert (ret == 0 || errno == ENOENT);
ret = g_stat ("mkdir-test", &buf);
g_assert_cmpint (ret, ==, -1);
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment