mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-26 05:56:14 +01:00
fileutils test - use UIDs only on *nix
As usual, only call getuid() or geteuid() if G_OS_UNIX is defined.
This commit is contained in:
parent
5c8b80c1e4
commit
cf58171342
@ -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");
|
||||
|
Loading…
Reference in New Issue
Block a user