tests: Fix fileutils test on macOS

It can return EROFS instead of EPERM too.
This commit is contained in:
Nirbheek Chauhan 2022-10-26 15:26:19 +05:30
parent d941558ee9
commit 9fa3915236

View File

@ -751,8 +751,8 @@ test_mkdir_with_parents (void)
#ifndef G_OS_WIN32 #ifndef G_OS_WIN32
g_assert_cmpint (g_mkdir_with_parents ("/usr/b/c", 0), ==, -1); g_assert_cmpint (g_mkdir_with_parents ("/usr/b/c", 0), ==, -1);
/* EPERM may be returned if the filesystem as a whole is read-only */ /* EPERM or EROFS may be returned if the filesystem as a whole is read-only */
if (errno != EPERM) if (errno != EPERM && errno != EROFS)
g_assert_cmpint (errno, ==, EACCES); g_assert_cmpint (errno, ==, EACCES);
#endif #endif