Re: [libvirt] adding tests....

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

 



"Daniel P. Berrange" <berrange@xxxxxxxxxx> wrote:

> On Mon, Jan 12, 2009 at 01:28:41PM +0100, Jim Meyering wrote:
>> "Daniel P. Berrange" <berrange@xxxxxxxxxx> wrote:
>> >> +    if (remote_config_file == NULL) {
>> >> +	static const char *default_config_file
>> >> +	  = SYSCONF_DIR "/libvirt/libvirtd.conf";
>> >> +	remote_config_file =
>> >> +	  (access(default_config_file, X_OK) == 0
>> >> +	   ? default_config_file
>> >> +	   : "/dev/null");
>> >> +    }
>> >
>> > Indentation looks off-by-2 there.
>>
>> Good catch.  I had TABs there.
>> Fixed.
>>
>> >> +virsh --connect qemu:///session \
>> >> +    pool-define-as P dir src-host /src/path /src/dev S /target-path > out 2>&1 \
>> >> +  || fail=1
>> >> +virsh --connect qemu:///session pool-dumpxml P >> out 2>&1 || fail=1
>> >
>> > Using qemu:///session here is fragile because it'll see
>> > all existing user defined vms/network/storage/etc. Use
>> > the test:///default  driver instead (or test:///path/to/custom/config.xml)
>>
>> I wanted to exercise a "real" drivers, not always test://.
>> How about using an unlikely pool name instead, i.e.,
>> via this incremental:
>
> That's only one issue. When you start up libvirtd it is going to run
> autostart on all configured vms/networks/pools. We really don't want
> to be booting configured VMs, and then tearing them down after a few
> seconds. The unit tests should restrict themselves to testing things
> which won't have any impact on the host system. Anything else needs
> to be part of a functional/integration test suite, which is better as
> a standalone test suite you can run on any OS with libvirt - not just
> a development tree, so you can test the complete system is functional

When I run "make check", it's almost always as a non-root user,
so there's no risk of this libvirtd running system-related things.

However, I guess you'd like to accommodate the root-run "make check", too?
It's good to recommend against running tests as root, unless absolutely
required, because of the potential risk.

Along those lines, how about if I just arrange to skip this test
when euid == 0 ?

--
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]