Re: [libvirt] adding tests....

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jim Meyering <jim@xxxxxxxxxxxx> wrote:
> Jim Meyering <jim@xxxxxxxxxxxx> wrote:
>> "Daniel P. Berrange" <berrange@xxxxxxxxxx> wrote:
>> ...
>>> The QEMU driver runs as non-root too. This is what the qemu:///session
>>> URI is used for. Likewise with the UML driver. The existing tests that
>>> invoke libvirtd fail quite frequently for me already due to them activating
>>> the QEMU / UML drivers. We really need a way to explicitly say what drivers
>>> should be allowed by the daemon, overriding what's compiled in. THis could
>>> in fact be useful even for production deployment, allowing site admins to
>>> guarentee that Xen driver is never used in the daemon even if it is compiled
>>> in by default.
>>>
>>> So perhaps a couple of config params like
>>>
>>>  allowed_drivers = [ "qemu", "xen", "test" ]
>>>  unix_sock_dir = "/var/run/libvirt/"
>>>
>>> Not sure how best to hook the first one up to libvirt.so though - the
>>> virInitialize/virStateInitize calls always activate all of them, with
>>> no easy way to disable.
>>
>> Sounds good.
>> I'm deferring "allowed_drivers" for now, and preparing
>> a patch to add support for a new configuration parameter
>>
>>   unix_sock_dir
>>
>> and also for
>>
>>   log_dir
>
> I'll add only unix_sock_dir for starters:
>
> The first patch adds the new parameter, and the second
> uses it in one of the two new libvirtd-running tests.

Here's one more change, this time to make the final actual
libvirtd-running test use the new parameter:

>From 337b40846c8510e00b33d6ba8bedb045d99bd721 Mon Sep 17 00:00:00 2001
From: Jim Meyering <meyering@xxxxxxxxxx>
Date: Tue, 13 Jan 2009 10:54:41 +0100
Subject: [PATCH] * tests/daemon-conf: Specify a non-default socket directory.

---
 tests/daemon-conf |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/tests/daemon-conf b/tests/daemon-conf
index b357c39..55671b8 100755
--- a/tests/daemon-conf
+++ b/tests/daemon-conf
@@ -71,6 +71,11 @@ done

 # Run with the unmodified config file.
 sleep_secs=2
+
+# Be careful to specify a non-default socket directory:
+sed 's,^unix_sock_dir.*,unix_sock_dir="'"$(pwd)"'",' tmp.conf > k || fail=1
+mv k tmp.conf || fail=1
+
 printf "running libvirtd with a valid config file ($sleep_secs seconds)\n" 1>&2
 libvirtd --config=tmp.conf > log 2>&1 & pid=$!
 sleep $sleep_secs
--
1.6.1.198.g1eb4d

--
Libvir-list mailing list
Libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]