Imported Upstream version 1.5.0
[platform/upstream/augeas.git] / tests / test-save.c
index 4b6470f..faa24e6 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * test-save.c: test various aspects of saving
  *
- * Copyright (C) 2009-2011 Red Hat Inc.
+ * Copyright (C) 2009-2015 David Lutterkort
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -355,6 +355,11 @@ static void testPathEscaping(CuTest *tc) {
  * used to lead to a SEGV
  */
 static void testSaveNoPermission(CuTest *tc) {
+    if (getuid() == 0) {
+        puts("pending (testSaveNoPermission): can't test permissions under root account");
+        return;
+    }
+
     int r;
     char *path = NULL;
     const char *v;