[libvirt] [PATCH 2/2] tests: Don't test user config file if ran as root

Martin Kletzander mkletzan at redhat.com
Thu Sep 12 11:28:45 UTC 2013


Signed-off-by: Martin Kletzander <mkletzan at redhat.com>
---
 tests/virsh-uriprecedence | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/tests/virsh-uriprecedence b/tests/virsh-uriprecedence
index f4d84a4..aa90efe 100755
--- a/tests/virsh-uriprecedence
+++ b/tests/virsh-uriprecedence
@@ -56,7 +56,11 @@ bad_uri="test:///default?bad_uri"
 good_uri="test:///default?good_uri"

 printf "uri_default=\"%s\"\n" "$good_uri" >"$XDG_CONFIG_HOME/libvirt/libvirt.conf"
-test_uri "User config file"
+if uid_is_privileged_; then
+    test_skip_case "$counter" "User config file" "must be run as root"
+else
+    test_uri "User config file"
+fi

 printf "uri_default=\"%s\"\n" "$bad_uri" >"$XDG_CONFIG_HOME/libvirt/libvirt.conf"
 export LIBVIRT_DEFAULT_URI="$good_uri"
-- 
1.8.3.2




More information about the libvir-list mailing list