c401cc
From f9e0da521a871d9e3b05116bc7dc844a44284051 Mon Sep 17 00:00:00 2001
c401cc
Message-Id: <f9e0da521a871d9e3b05116bc7dc844a44284051.1386348946.git.jdenemar@redhat.com>
c401cc
From: Martin Kletzander <mkletzan@redhat.com>
c401cc
Date: Thu, 28 Nov 2013 15:42:54 +0100
c401cc
Subject: [PATCH] tests: Don't test user config file if ran as root
c401cc
c401cc
https://bugzilla.redhat.com/show_bug.cgi?id=1034380
c401cc
c401cc
(cherry picked from commit a1db95d0fe5d898b4098ad59a670878906af8199)
c401cc
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
c401cc
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
c401cc
---
c401cc
 tests/virsh-uriprecedence | 6 +++++-
c401cc
 1 file changed, 5 insertions(+), 1 deletion(-)
c401cc
c401cc
diff --git a/tests/virsh-uriprecedence b/tests/virsh-uriprecedence
c401cc
index f4d84a4..f9e3256 100755
c401cc
--- a/tests/virsh-uriprecedence
c401cc
+++ b/tests/virsh-uriprecedence
c401cc
@@ -56,7 +56,11 @@ bad_uri="test:///default?bad_uri"
c401cc
 good_uri="test:///default?good_uri"
c401cc
 
c401cc
 printf "uri_default=\"%s\"\n" "$good_uri" >"$XDG_CONFIG_HOME/libvirt/libvirt.conf"
c401cc
-test_uri "User config file"
c401cc
+if uid_is_privileged_; then
c401cc
+    test_skip_case "$counter" "User config file" "must not be run as root"
c401cc
+else
c401cc
+    test_uri "User config file"
c401cc
+fi
c401cc
 
c401cc
 printf "uri_default=\"%s\"\n" "$bad_uri" >"$XDG_CONFIG_HOME/libvirt/libvirt.conf"
c401cc
 export LIBVIRT_DEFAULT_URI="$good_uri"
c401cc
-- 
c401cc
1.8.4.5
c401cc