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:
Руслан Ижбулатов 2018-04-20 17:05:10 +00:00
parent 5c8b80c1e4
commit cf58171342

View File

@ -881,11 +881,13 @@ test_stdio_wrappers (void)
GError *error = NULL;
/* The permissions tests here dont 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");