[glib/wip/smcv/assert-no-errno: 4/5] gio/tests/gsettings: Assert that g_chmod succeeds




commit 782c1b424e50e7712fa5cddd5889f31ca4b6e87d
Author: Simon McVittie <smcv collabora com>
Date:   Sat Oct 31 12:24:59 2020 +0000

    gio/tests/gsettings: Assert that g_chmod succeeds
    
    Signed-off-by: Simon McVittie <smcv collabora com>

 gio/tests/gsettings.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gio/tests/gsettings.c b/gio/tests/gsettings.c
index dba0493d6..d842794ec 100644
--- a/gio/tests/gsettings.c
+++ b/gio/tests/gsettings.c
@@ -1844,7 +1844,7 @@ test_keyfile (Fixture       *fixture,
       g_signal_connect (settings, "writable-changed::greeting",
                         G_CALLBACK (key_changed_cb), &called);
 
-      g_chmod (keyfile_path, 0500);
+      g_assert_no_errno (g_chmod (keyfile_path, 0500));
       while (!called)
         g_main_context_iteration (NULL, FALSE);
       g_signal_handlers_disconnect_by_func (settings, key_changed_cb, &called);
@@ -1859,7 +1859,7 @@ test_keyfile (Fixture       *fixture,
   g_object_unref (settings);
 
   /* Clean up the temporary directory. */
-  g_chmod (keyfile_path, 0777);
+  g_assert_no_errno (g_chmod (keyfile_path, 0777));
   g_assert_no_errno (g_remove (store_path));
   g_rmdir (keyfile_path);
   g_free (store_path);


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