Commit c8cbfd55 authored by Philip Withnall's avatar Philip Withnall

tests: Skip some of the fileutils tests when running as root

The tests which check permissions and errors like EACCES aren’t going to
work as root, since root always has permission to do things. Skip them
if running as root.
Signed-off-by: Philip Withnall's avatarPhilip Withnall <>
parent 33749d83
Pipeline #8816 failed with stage
in 9 minutes and 15 seconds
......@@ -880,6 +880,13 @@ test_stdio_wrappers (void)
struct utimbuf ut;
GError *error = NULL;
/* The permissions tests here don’t work when running as root. */
if (getuid () == 0 || geteuid () == 0)
g_test_skip ("File permissions tests cannot be run as root");
g_remove ("mkdir-test/test-create");
ret = g_rmdir ("mkdir-test");
g_assert (ret == 0 || errno == ENOENT);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment