From 9fa391523651945d6e26d16a7b85a837de8c0cfb Mon Sep 17 00:00:00 2001 From: Nirbheek Chauhan Date: Wed, 26 Oct 2022 15:26:19 +0530 Subject: [PATCH] tests: Fix fileutils test on macOS It can return EROFS instead of EPERM too. --- glib/tests/fileutils.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/glib/tests/fileutils.c b/glib/tests/fileutils.c index 5218aedec..ea0ab8346 100644 --- a/glib/tests/fileutils.c +++ b/glib/tests/fileutils.c @@ -751,8 +751,8 @@ test_mkdir_with_parents (void) #ifndef G_OS_WIN32 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 */ - if (errno != EPERM) + /* EPERM or EROFS may be returned if the filesystem as a whole is read-only */ + if (errno != EPERM && errno != EROFS) g_assert_cmpint (errno, ==, EACCES); #endif