Re: [libvirt] tweak a format string and add a test

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

 



Daniel P. Berrange wrote:
...
> I really don't like these kind of tests in here - tests of the
> live drivers should be part of a separate integration test suite
> bundle, that's independant of main code releases.

As I already mentioned, adding them here is simply a
stop-gap measure to ensure we record how to exercise
the just-fixed code.

I expect to convert them to a more general framework
as time permits.

>> +libvirtd --config=conf > libvirtd-log 2>&1 & pid=$!
>> +sleep 1
>> +
>> +url="qemu:///session?socket=@$sock_dir/libvirt-sock"
>> +virsh -c "$url" \
>> +    'net-define net.xml; net-destroy N; net-list --all' > out 2>&1 \
>> +  || fail=1
>
> Calling 'net-destroy' doesn't make sense because the network
> hasn't been started here yet, merely defined as an inactive
> config. Starting the network would not be a thing you want to
> do in the test suite, because it may mess with your host networking.
> The virtual network driver shouldn't be usable under the 'qemu:///session'
> instance either, because it needs to be running privileged.

My goal was to exercise the code in question with as simple
an example as possible, while remaining non-invasive -- i.e.,
don't start network, don't require root.
If you have a better way, please describe it.

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