[glib] fileutils test - use UIDs only on *nix
- From: LRN <ruslanizhb src gnome org>
 
- To: commits-list gnome org
 
- Cc: 
 
- Subject: [glib] fileutils test - use UIDs only on *nix
 
- Date: Sat, 21 Apr 2018 20:54:14 +0000 (UTC)
 
commit cf581713426871cbd764a594f92aae0f7491f961
Author: Руслан Ижбулатов <lrn1986 gmail com>
Date:   Fri Apr 20 17:05:10 2018 +0000
    fileutils test - use UIDs only on *nix
    
    As usual, only call getuid() or geteuid() if G_OS_UNIX is defined.
 glib/tests/fileutils.c | 2 ++
 1 file changed, 2 insertions(+)
---
diff --git a/glib/tests/fileutils.c b/glib/tests/fileutils.c
index 555c58edf..9bf7b6e0a 100644
--- a/glib/tests/fileutils.c
+++ b/glib/tests/fileutils.c
@@ -881,11 +881,13 @@ test_stdio_wrappers (void)
   GError *error = NULL;
 
   /* The permissions tests here don’t work when running as root. */
+#ifdef G_OS_UNIX
   if (getuid () == 0 || geteuid () == 0)
     {
       g_test_skip ("File permissions tests cannot be run as root");
       return;
     }
+#endif
 
   g_remove ("mkdir-test/test-create");
   ret = g_rmdir ("mkdir-test");
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]