Blame SOURCES/augeas-1.1.0-testPermsErrorReported-root.patch

c537d4
From b0fa354ecada84f7a4fdf586c08ae99ca2dd9a65 Mon Sep 17 00:00:00 2001
c537d4
From: Dominic Cleal <dcleal@redhat.com>
c537d4
Date: Mon, 2 Sep 2013 18:29:49 +0100
c537d4
Subject: [PATCH] * tests/test-load.c (testPermsErrorReported): skip
c537d4
 permissions test when root
c537d4
c537d4
---
c537d4
 tests/test-load.c | 7 +++++++
c537d4
 1 file changed, 7 insertions(+)
c537d4
c537d4
diff --git a/tests/test-load.c b/tests/test-load.c
c537d4
index ef6c01a..fb63a62 100644
c537d4
--- a/tests/test-load.c
c537d4
+++ b/tests/test-load.c
c537d4
@@ -21,6 +21,8 @@
c537d4
  */
c537d4
 
c537d4
 #include <config.h>
c537d4
+#include <sys/types.h>
c537d4
+#include <unistd.h>
c537d4
 
c537d4
 #include "augeas.h"
c537d4
 
c537d4
@@ -529,6 +531,11 @@ static void testParseErrorReported(CuTest *tc) {
c537d4
 
c537d4
 /* Test failed file opening is reported, e.g. EACCES */
c537d4
 static void testPermsErrorReported(CuTest *tc) {
c537d4
+    if (getuid() == 0) {
c537d4
+        puts("pending (testPermsErrorReported): can't test permissions under root account");
c537d4
+        return;
c537d4
+    }
c537d4
+
c537d4
     augeas *aug = NULL;
c537d4
     int r;
c537d4
     const char *s;
c537d4
-- 
c537d4
1.8.4.2
c537d4