mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-09 20:35:49 +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;
|
GError *error = NULL;
|
||||||
|
|
||||||
/* The permissions tests here don’t work when running as root. */
|
/* The permissions tests here don’t work when running as root. */
|
||||||
|
#ifdef G_OS_UNIX
|
||||||
if (getuid () == 0 || geteuid () == 0)
|
if (getuid () == 0 || geteuid () == 0)
|
||||||
{
|
{
|
||||||
g_test_skip ("File permissions tests cannot be run as root");
|
g_test_skip ("File permissions tests cannot be run as root");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
g_remove ("mkdir-test/test-create");
|
g_remove ("mkdir-test/test-create");
|
||||||
ret = g_rmdir ("mkdir-test");
|
ret = g_rmdir ("mkdir-test");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user