Blame SOURCES/0011-Clearly-state-that-tests-cannot-be-run-under-root.patch

00ddc3
From 81a744f1b18475221feaffc8da120628a4ab5da4 Mon Sep 17 00:00:00 2001
00ddc3
From: Jakub Filak <jfilak@redhat.com>
00ddc3
Date: Mon, 13 Jul 2015 15:36:20 +0200
00ddc3
Subject: [PATCH] Clearly state that tests cannot be run under root
00ddc3
00ddc3
Signed-off-by: Jakub Filak <jfilak@redhat.com>
00ddc3
---
00ddc3
 Makefile | 2 +-
00ddc3
 README   | 4 ++++
00ddc3
 2 files changed, 5 insertions(+), 1 deletion(-)
00ddc3
00ddc3
diff --git a/Makefile b/Makefile
00ddc3
index 8802256..15df319 100644
00ddc3
--- a/Makefile
00ddc3
+++ b/Makefile
00ddc3
@@ -67,4 +67,4 @@ distclean:
00ddc3
 
00ddc3
 .PHONY: check
00ddc3
 check: build
00ddc3
-	cd $(OUT_DIR) && make test
00ddc3
+	if [ "_0" != "_$$(id -u)" ]; then cd $(OUT_DIR) && make test; else echo "Cannot run tests under root user."; exit 1; fi
00ddc3
diff --git a/README b/README
00ddc3
index 2657b11..30d0bef 100644
00ddc3
--- a/README
00ddc3
+++ b/README
00ddc3
@@ -141,3 +141,7 @@ $ make rpm
00ddc3
 $ make distclean
00ddc3
 
00ddc3
 All build results are stored in ./bin directory.
00ddc3
+
00ddc3
+The `check' make target will fail if you run it under root user. There are some
00ddc3
+test cases that try to generate 'File Access Denied' exceptions and the easiest
00ddc3
+way to achieve that is to try to access a root's file.
00ddc3
-- 
00ddc3
2.4.6
00ddc3