]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
tests: fix daemon-conf testing failure
authorOsier Yang <jyang@redhat.com>
Wed, 3 Nov 2010 10:43:11 +0000 (11:43 +0100)
committerDaniel Veillard <veillard@redhat.com>
Wed, 3 Nov 2010 10:43:11 +0000 (11:43 +0100)
libvirtd.conf uses "libvirt" as the value of "unix_sock_group",
however, group "libvirt" may not exist on the system, in this case
the case will always fail.

As a solution, replace "libvirt" with "$USER" in "tmp.conf".

tests/daemon-conf

index 6c91d9686aa37d91a4991e4952954fe167beb610..f2b513d72df554907fb75e482869f44183eff79c 100755 (executable)
@@ -25,6 +25,9 @@ grep -v '\"PARAMETER = VALUE\"' "$conf" | grep '[a-z_]  *=  *[^ ]' | grep -vE '^
 # Start with the sample libvirtd.conf file, uncommenting all real directives.
 sed -n 's/^#\([^ #]\)/\1/p' "$conf" > tmp.conf
 
+sed -e "s/^\(unix_sock_group =\).*/\1 \"$USER\"/g" tmp.conf > k
+mv k tmp.conf
+
 # Iterate through that list of directives, corrupting one RHS at a
 # time and running libvirtd with the resulting config.  Each libvirtd
 # invocation must fail.