[glib: 3/6] tests: use g_chmod in fileutils tests




commit 59b226d27217ef997b6235fa3b426174a48338d4
Author: Marc-André Lureau <marcandre lureau redhat com>
Date:   Fri Jan 21 15:12:11 2022 +0400

    tests: use g_chmod in fileutils tests
    
    Signed-off-by: Marc-André Lureau <marcandre lureau redhat com>

 glib/tests/fileutils.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/glib/tests/fileutils.c b/glib/tests/fileutils.c
index fc248dc17..b61125a91 100644
--- a/glib/tests/fileutils.c
+++ b/glib/tests/fileutils.c
@@ -584,7 +584,7 @@ check_cap_dac_override (const char *tmpdir)
   inside = g_build_filename (dac_denies_write, "inside", NULL);
 
   g_assert_no_errno (mkdir (dac_denies_write, S_IRWXU));
-  g_assert_no_errno (chmod (dac_denies_write, 0));
+  g_assert_no_errno (g_chmod (dac_denies_write, 0));
 
   if (mkdir (inside, S_IRWXU) == 0)
     {
@@ -601,7 +601,7 @@ check_cap_dac_override (const char *tmpdir)
       have_cap = FALSE;
     }
 
-  g_assert_no_errno (chmod (dac_denies_write, S_IRWXU));
+  g_assert_no_errno (g_chmod (dac_denies_write, S_IRWXU));
   g_assert_no_errno (rmdir (dac_denies_write));
 
   if (safe_tmpdir != NULL)
@@ -1412,7 +1412,7 @@ test_set_contents_full_read_only_file (void)
   write (fd, "a", 1);
   g_assert_no_errno (g_fsync (fd));
   close (fd);
-  g_assert_no_errno (chmod (file_name, 0200));
+  g_assert_no_errno (g_chmod (file_name, 0200));
 
   if (g_test_undefined ())
     {
@@ -1485,7 +1485,7 @@ test_set_contents_full_read_only_directory (void)
       g_assert_no_errno (g_fsync (fd));
       close (fd);
 
-      g_assert_no_errno (chmod (dir_name, 0));
+      g_assert_no_errno (g_chmod (dir_name, 0));
 
       /* Set the file contents */
       ret = g_file_set_contents_full (file_name, "b", 1, flags, 0644, &error);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]