Re: [libvirt] -cpu check, rdtscp and AMD KVM
by Eduardo Habkost
(CCing libvir-list)
On Thu, Nov 12, 2015 at 05:35:59PM +0100, Paolo Bonzini wrote:
> On 12/11/2015 17:27, Eduardo Habkost wrote:
> >> > > To simply remove rdtscp from all Opteron_G* models?
> > >
> > > Not sure this is the right thing to do... Real hardware has it, and
> > > going forward KVM will provide it.
> >
> > Do you see any alternative?
>
> Live with the warning, and document it in the release notes.
That's an option too. But it will cause breakage when upgrading
the host kernel, and force users to live with a broken setup
because we don't provide CPU models that work.
In addition to providing CPU models that work, I believe it's
better to make QEMU CPU models match what is already happening in
practice with the existing VMs.
>
> > We need AMD CPU models that can run
> > out of the box using today's kernels. As no existing VMs running
> > Opteron_G* on AMD CPUs have rdtscp, I believe it makes sense to
> > just define Opteron_G* without rdtscp.
> >
> > When we add SVM rdtscp support to KVM, we can add new
> > "Opteron_G[2-5]-rdtscp" CPU models.
>
> Makes sense too.
>
> However, I'm a bit afraid of the interaction with libvirt. Right now,
> libvirt has rdtscp in the description. If we remove it from libvirt,
> libvirt will start adding +rdtscp to the QEMU CPU command line option,
> so our change will be moot. And if we do not remove it from libvirt,
> libvirt will not be able to start a VM with rdtscp on a fixed kernel.
The former is not true (the change won't be moot). The latter
seems true.
AFAIK, the presence of rdtscp in cpu_map.xml only does two
things:
* Makes libvirt never use "-cpu Opteron_G2,+rdtscp" even if the
user explicitly asked for rdtscp (which is a libvirt bug that
should be fixed);
* Makes libvirt refuse to run Opteron_G2 in hosts that lack
rdtscp (which is also a libvirt bug, because it's checking host
CPUID directly instead of GET_SUPPORTED_CPUID; libvirt must let
QEMU check if the feature is really available).
--
Eduardo
9 years, 1 month
[libvirt] [RFC] migration encryption
by Nikolay Shirokovskiy
Hi guys.
I have a problem getting migration traffic encrypted for some scenarios. I need to
migrate domain with non shared disks and can't use tunelled migration because of RHEL7 qemu.
Without tunnel i get both vm state and disk state traffic unencrypted between
peer's qemus. AFAIK there is a work in progress in qemu to bring TLS encryption
to all channels and eventually I get desired functionality but what are my options
now?
I thinking of forwarding ports from destination to source and use localhost in
hypervisor uri. The only problem is that port for disk migration is auto selected.
Can we add a patch to pass this port as a migration parameter?
9 years, 1 month
[libvirt] [PATCHv2 0/3] Hyper-v crash feature support
by Dmitry Andreev
A new Hyper-V cpu feature 'hv_crash' was added to QEMU. The feature
will become available in v2.5.0.
This patch adds support for this feature.
Dmitry Andreev (3):
conf: add 'model' attribute for panic device with values isa, pseries,
hyperv
qemu: add support for hv_crash feature as a panic device
tests: add tests for panic device with model 'hyperv'
docs/formatdomain.html.in | 29 ++++++++++++-
docs/schemas/domaincommon.rng | 9 ++++
src/conf/domain_conf.c | 33 ++++++++++++---
src/conf/domain_conf.h | 10 +++++
src/qemu/qemu_command.c | 48 +++++++++++++++++++---
src/qemu/qemu_domain.c | 4 ++
tests/qemuargv2xmltest.c | 1 +
.../qemuxml2argv-hyperv-panic.args | 21 ++++++++++
.../qemuxml2argvdata/qemuxml2argv-hyperv-panic.xml | 25 +++++++++++
.../qemuxml2argv-panic-no-address.xml | 2 +-
tests/qemuxml2argvdata/qemuxml2argv-panic.xml | 2 +-
.../qemuxml2argvdata/qemuxml2argv-pseries-disk.xml | 2 +-
.../qemuxml2argv-pseries-nvram.xml | 2 +-
.../qemuxml2argv-pseries-panic-address.xml | 2 +-
.../qemuxml2argv-pseries-panic-no-address.xml | 2 +-
tests/qemuxml2argvtest.c | 1 +
.../qemuxml2xmlout-pseries-panic-missing.xml | 2 +-
tests/qemuxml2xmltest.c | 1 +
18 files changed, 176 insertions(+), 20 deletions(-)
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-hyperv-panic.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-hyperv-panic.xml
--
1.8.3.1
9 years, 1 month
[libvirt] [PATCH 0/3] qemu: Tweak VFIO limit documentation
by Peter Krempa
Peter Krempa (3):
qemu: domain: Restructurate control flow in
qemuDomainGetMlockLimitBytes
qemu: Explain mlock limit size more in detail
qemu: Explain why mlock size is modified when def->mem.locked is
enabled
src/qemu/qemu_domain.c | 34 ++++++++++++++++++++++++++++------
1 file changed, 28 insertions(+), 6 deletions(-)
--
2.6.2
9 years, 1 month
[libvirt] Fwd: xen/libvirt freeze while attching network-device to vm´s
by Eric Blake
[edited to reduce size to get past moderation]
-------- Forwarded Message --------
Date: Wed, 4 Nov 2015 15:57:26 +0100
From: max ustermann <ustermann78(a)web.de>
To: libvirt-users(a)redhat.com
Subject: xen/libvirt freeze while attching network-device to vm´s
Message-ID: <20151104155726.72fd6109@linux-3go9>
Hi,
first sorry for the cross-posting, but i don Ìt known exactly if my
problem belongs to xen or libvirt.
I have an VM-Host with Xen 4.6.0 und libvirt 1.2.19. The Job of the
Host is to resume in parallel 20 VM Ìs (HVM WinXp) attach a
block-device to each VM , wait 60 Seconds, kill the VM and start from
beginning. For that, a python script create for each vm a thread and
each thread get a connection to the Libvirt-Daemon via
"libvirt.open(None)" and do the resume, attach and so on in a loop.
This Setup works fine, it do several thousand cycle without any
problems. If i complement this setup, so that each vm get , additonal
to the blockdevice an network-interface after resume, via
"attachDevice" call from the python-script, i observe that libvirtd/xen
freeze after 20 to 100 cycle. Their are no error-messages, no crash,
noting in "dmesg" or "xl dmesg".
When i attached to the libvirtd via gdb and do a "info thread", i get
the following:
Id Target Id Frame
21 Thread 0x7f792a92c700 (LWP 1312) "libvirtd" __lll_lock_wait ()
at ../nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S:135 20
Thread 0x7f792a12b700 (LWP 1313) "libvirtd" __lll_lock_wait ()
at ../nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S:135 19
Thread 0x7f792992a700 (LWP 1314) "libvirtd" __lll_lock_wait ()
at ../nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S:135 18
Thread 0x7f7929129700 (LWP 1315) "libvirtd" __lll_lock_wait ()
at ../nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S:135 17
Thread 0x7f7928928700 (LWP 1316) "libvirtd" __lll_lock_wait ()
at ../nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S:135 16
Thread 0x7f791bfff700 (LWP 1317) "libvirtd" __lll_lock_wait ()
at ../nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S:135 15
Thread 0x7f791b7fe700 (LWP 1318) "libvirtd" __lll_lock_wait ()
at ../nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S:135 14
Thread 0x7f791affd700 (LWP 1319) "libvirtd" __lll_lock_wait ()
at ../nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S:135 13
Thread 0x7f791a7fc700 (LWP 1320) "libvirtd" __lll_lock_wait ()
at ../nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S:135 12
Thread 0x7f7919ffb700 (LWP 1321) "libvirtd" __lll_lock_wait ()
at ../nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S:135 11
Thread 0x7f78fd6ff700 (LWP 1334) "libvirtd"
pthread_cond_wait@(a)GLIBC_2.3.2 ()
at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
10 Thread 0x7f78fcefe700 (LWP 1335) "libvirtd"
pthread_cond_wait@(a)GLIBC_2.3.2 ()
at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
9 Thread 0x7f78f3fff700 (LWP 1336) "libvirtd"
pthread_cond_wait@(a)GLIBC_2.3.2 ()
at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
8 Thread 0x7f78ebfff700 (LWP 1337) "libvirtd"
pthread_cond_wait@(a)GLIBC_2.3.2 ()
at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
7 Thread 0x7f78f37fe700 (LWP 1338) "libvirtd"
pthread_cond_wait@(a)GLIBC_2.3.2 ()
at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
6 Thread 0x7f793bf94700 (LWP 1494) "libvirtd" 0x00007f79375c87fd
in read () at ../sysdeps/unix/syscall-template.S:81 5 Thread
0x7f78f241d700 (LWP 17709) "libvirtd" __lll_lock_wait ()
at ../nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S:135 4
Thread 0x7f78f1c1c700 (LWP 17717) "libvirtd" __lll_lock_wait ()
at ../nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S:135 3
Thread 0x7f78f141b700 (LWP 17722) "libvirtd" __lll_lock_wait ()
at ../nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S:135 2
Thread 0x7f78f0c1a700 (LWP 17751) "libvirtd" __lll_lock_wait ()
at ../nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S:135
* 1 Thread 0x7f793c0428c0 (LWP 1269) "libvirtd" __lll_lock_wait ()
at ../nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S:135
i start to examine at thread 1 and get the fowlling bt:
#0 __lll_lock_wait ()
at ../nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S:135 #1
0x00007f79375c411b in _L_lock_812 () from /lib64/libpthread.so.0 #2
0x00007f79375c3fe8 in __GI___pthread_mutex_lock (mutex=0x7f78d80edd30)
at ../nptl/pthread_mutex_lock.c:79 #3 0x00007f793b09cd0c in
virMutexLock (m=0x7f78d80edd30) at util/virthread.c:89 #4
0x00007f793b07d831 in virObjectLock (anyobj=0x7f78d80edd20) at
util/virobject.c:323 #5 0x00007f793b0b71d7 in virDomainObjListFindByID
(doms=0x7f78d80edd20, id=1) at conf/domain_conf.c:1237 #6
0x00007f78fe3f7eb3 in libxlDomainEventHandler (data=0x7f78d81ce940,
event=0x7f793c30c2e0) at libxl/libxl_domain.c:534 #7
0x00007f793806f7c0 in egc_run_callbacks (egc=egc@entry=0x7ffdb79c7490)
at libxl_event.c:1405 #8 0x00007f793806fb9d in libxl__egc_cleanup
(egc=0x7ffdb79c7490) at libxl_event.c:1436 #9
libxl_osevent_occurred_fd (ctx=<optimized out>,
for_libxl=0x7f78d80ec220, fd=27, events_ign=<optimized out>,
revents_ign=<optimized out>) at libxl_event.c:1339 #10
0x00007f78fe3f9ac5 in libxlFDEventCallback (watch=11, fd=27,
vir_events=1, fd_info=0x7f78d811c430) at libxl/libxl_driver.c:134 #11
0x00007f793b04a9c4 in virEventPollDispatchHandles (nfds=31,
fds=0x7f793c30b510) at util/vireventpoll.c:509 #12 0x00007f793b04b224
in virEventPollRunOnce () at util/vireventpoll.c:658 #13
0x00007f793b0490cd in virEventRunDefaultImpl () at util/virevent.c:308
#14 0x00007f793b1f5ab6 in virNetDaemonRun (dmn=0x7f793c2e1b80) at
rpc/virnetdaemon.c:701 #15 0x00007f793be0bc27 in main (argc=1,
argv=0x7ffdb79c7d78) at libvirtd.c:1577
i select frame 3 and look who holds the lock:
(gdb) frame 3
#3 0x00007f793b09cd0c in virMutexLock (m=0x7f78d80edd30) at
util/virthread.c:89 89 pthread_mutex_lock(&m->lock);
(gdb) p *m
$5 = {lock = {__data = {__lock = 2, __count = 0, __owner = 1312,
__nusers = 1, __kind = 512, __spins = 0, __elision = 0, __list =
{__prev = 0x0, __next = 0x0}}, __size =
"\002\000\000\000\000\000\000\000
\005\000\000\001\000\000\000\000\002", '\000' <repeats 21 times>,
__align = 2}}
i switch to frame 21 (LWP1312) i taek a look to the bt:
(gdb) bt
#0 __lll_lock_wait ()
at ../nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S:135 #1
0x00007f79375c411b in _L_lock_812 () from /lib64/libpthread.so.0 #2
0x00007f79375c3fe8 in __GI___pthread_mutex_lock (mutex=0x7f79140099d0)
at ../nptl/pthread_mutex_lock.c:79 #3 0x00007f793b09cd0c in
virMutexLock (m=0x7f79140099d0) at util/virthread.c:89 #4
0x00007f793b07d831 in virObjectLock (anyobj=0x7f79140099c0) at
util/virobject.c:323 #5 0x00007f793b0b717f in virDomainObjListSearchID
(payload=0x7f79140099c0, name=0x7f791400f7c0, data=0x7f792a92b464) at
conf/domain_conf.c:1225 #6 0x00007f793b055f1e in virHashSearch
(ctable=0x7f78d81ccc40, iter=0x7f793b0b7148 <virDomainObjListSearchID>,
data=0x7f792a92b464) at util/virhash.c:724 #7 0x00007f793b0b71f2 in
virDomainObjListFindByID (doms=0x7f78d80edd20, id=2) at
conf/domain_conf.c:1238 #8 0x00007f78fe3f7eb3 in
libxlDomainEventHandler (data=0x7f78d81ce940, event=0x7f791c005610) at
libxl/libxl_domain.c:534 #9 0x00007f793806f7c0 in egc_run_callbacks
(egc=egc@entry=0x7f792a92b580) at libxl_event.c:1405 #10
0x00007f7938070f8b in libxl__egc_cleanup (egc=0x7f792a92b580) at
libxl_event.c:1436 #11 libxl__ao_inprogress
(ao=ao@entry=0x7f791c00c6e0, file=file@entry=0x7f793808d512 "libxl.c",
line=line@entry=4226, func=func@entry=0x7f7938090150 <__func__.20288>
"libxl_device_nic_add") at libxl_event.c:2014 #12 0x00007f7938048fa6 in
libxl_device_nic_add (ctx=0x7f78d8112830, domid=19, nic=0x7f792a92b6b0,
ao_how=<optimized out>) at libxl.c:4226 #13 0x00007f78fe402baa in
libxlDomainAttachNetDevice (driver=0x7f78d81ce940, vm=0x7f79140099c0,
net=0x7f791c003610) at libxl/libxl_driver.c:3199 #14 0x00007f78fe402d12
in libxlDomainAttachDeviceLive (driver=0x7f78d81ce940,
vm=0x7f79140099c0, dev=0x7f791c001350) at libxl/libxl_driver.c:3231 #15
0x00007f78fe404135 in libxlDomainAttachDeviceFlags (dom=0x7f791c009150,
xml=0x7f791c009230 "<interface type=\"bridge\">\n <source
bridge=\"xenbr0\" />\n <model type=\"rtl8139\" />\n <mac
address=\"00:27:0e:0c:01:09\" />\n </interface>", flags=1) at
libxl/libxl_driver.c:3707 #16 0x00007f78fe404239 in
libxlDomainAttachDevice (dom=0x7f791c009150, xml=0x7f791c009230
"<interface type=\"bridge\">\n <source bridge=\"xenbr0\" />\n
<model type=\"rtl8139\" />\n <mac
address=\"00:27:0e:0c:01:09\" />\n </interface>") at
libxl/libxl_driver.c:3745 #17 0x00007f793b18422c in
virDomainAttachDevice (domain=0x7f791c009150, xml=0x7f791c009230
"<interface type=\"bridge\">\n <source bridge=\"xenbr0\" />\n
<model type=\"rtl8139\" />\n <mac
address=\"00:27:0e:0c:01:09\" />\n </interface>") at
libvirt-domain.c:8351 #18 0x00007f793be11a1f in
remoteDispatchDomainAttachDevice (server=0x7f793c2e0a90,
client=0x7f793c2f34c0, msg=0x7f793c2feca0, rerr=0x7f792a92bab0,
args=0x7f791c009190) at remote_dispatch.h:2850 #19 0x00007f793be11923
in remoteDispatchDomainAttachDeviceHelper (server=0x7f793c2e0a90,
client=0x7f793c2f34c0, msg=0x7f793c2feca0, rerr=0x7f792a92bab0,
args=0x7f791c009190, ret=0x7f791c009130) at remote_dispatch.h:2826 #20
0x00007f793b1fccfc in virNetServerProgramDispatchCall
(prog=0x7f793c2eefd0, server=0x7f793c2e0a90, client=0x7f793c2f34c0,
msg=0x7f793c2feca0) at rpc/virnetserverprogram.c:437 #21
0x00007f793b1fc863 in virNetServerProgramDispatch (prog=0x7f793c2eefd0,
server=0x7f793c2e0a90, client=0x7f793c2f34c0, msg=0x7f793c2feca0) at
rpc/virnetserverprogram.c:307 #22 0x00007f793b1f5e6d in
virNetServerProcessMsg (srv=0x7f793c2e0a90, client=0x7f793c2f34c0,
prog=0x7f793c2eefd0, msg=0x7f793c2feca0) at rpc/virnetserver.c:135 #23
0x00007f793b1f5f3a in virNetServerHandleJob (jobOpaque=0x7f793c302c60,
opaque=0x7f793c2e0a90) at rpc/virnetserver.c:156 #24 0x00007f793b09d9f7
in virThreadPoolWorker (opaque=0x7f793c2e0750) at
util/virthreadpool.c:145 #25 0x00007f793b09d00a in virThreadHelper
(data=0x7f793c2eced0) at util/virthread.c:206 #26 0x00007f79375c1ee5 in
start_thread (arg=0x7f792a92c700) at pthread_create.c:309 #27
0x00007f79372f0d1d in clone ()
at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
here i select frame 3 and look who holds the lock:
(gdb) frame 3
#3 0x00007f793b09cd0c in virMutexLock (m=0x7f79140099d0) at
util/virthread.c:89 89 pthread_mutex_lock(&m->lock);
$6 = {lock = {__data = {__lock = 2, __count = 0, __owner = 1312,
__nusers = 1, __kind = 512, __spins = 0, __elision = 0, __list =
{__prev = 0x0, __next = 0x0}}, __size =
"\002\000\000\000\000\000\000\000
\005\000\000\001\000\000\000\000\002", '\000' <repeats 21 times>,
__align = 2}}
so i see that thread 21 waits for a lock that holds by thread 21
from frame 4 i see, that the process want a lock for vm object:
#4 0x00007f793b07d831 in virObjectLock (anyobj=0x7f79140099c0) at
util/virobject.c:323
further down in the bt i see in frame 14:
#14 0x00007f78fe402d12 in libxlDomainAttachDeviceLive
(driver=0x7f78d81ce940, vm=0x7f79140099c0, dev=0x7f791c001350) at
libxl/libxl_driver.c:3231 that vm-object 0x7f79140099c0 is the object
for that also a network-device should be attached. And from that i know
that there is a lock on the vm-object.
so i go up in the bt an see that libxlDomainAttachDeviceLive(libvirtd)
(frame14) calls libxlDomainAttachNetDevice(libvirtd) (frame13), that
calls libxl_device_nic_add(libxl/xen) (frame12)
from info frame for frame12 i see that he calls frame 0x7f792a92b5f0:
(gdb) info f
Stack level 12, frame at 0x7f792a92b670:
rip = 0x7f7938048fa6 in libxl_device_nic_add (libxl.c:4226); saved rip
= 0x7f78fe402baa called by frame at 0x7f792a92b760, caller of frame at
0x7f792a92b5f0 source language c.
Arglist at 0x7f792a92b5e8, args: ctx=0x7f78d8112830, domid=19,
nic=0x7f792a92b6b0, ao_how=<optimized out> Locals at 0x7f792a92b5e8,
Previous frame's sp is 0x7f792a92b670 Saved registers:
rbx at 0x7f792a92b640, rbp at 0x7f792a92b648, r12 at 0x7f792a92b650,
r13 at 0x7f792a92b658, r14 at 0x7f792a92b660, rip at 0x7f792a92b668
and this is frame 11 libxl__ao_inprogress (ao=ao@entry=0x7f791c00c6e0,
file=file@entry=0x7f793808d512 "libxl.c", line=line@entry=4226,
func=func@entry=0x7f7938090150 <__func__.20288> "libxl_device_nic_add")
at libxl_event.c:2014
so further i see that libxl__ao_inprogress calls libxl__egc_cleanup and
that calls egc_run_callbacks, frame 9 info frame for frame 9 gives:
(gdb) info f
Stack level 9, frame at 0x7f792a92b540:
rip = 0x7f793806f7c0 in egc_run_callbacks (libxl_event.c:1405); saved
rip = 0x7f7938070f8b called by frame at 0x7f792a92b5f0, caller of frame
at 0x7f792a92b500 source language c.
Arglist at 0x7f792a92b4f8, args: egc=egc@entry=0x7f792a92b580
Locals at 0x7f792a92b4f8, Previous frame's sp is 0x7f792a92b540
Saved registers:
rbx at 0x7f792a92b520, rbp at 0x7f792a92b528, r12 at 0x7f792a92b530,
rip at 0x7f792a92b538
and list gives:
(gdb) list
1400
1401 LIBXL_TAILQ_FOREACH_SAFE(ev, &egc->occurred_for_callback,
link, ev_tmp) { 1402
LIBXL_TAILQ_REMOVE(&egc->occurred_for_callback, ev, link);
1403 LOG(DEBUG,"event %p callback type=%s",
1404 ev, libxl_event_type_to_string(ev->type));
1405 CTX->event_hooks->event_occurs(CTX->event_hooks_user,
ev); 1406 } 1407
1408 LIBXL_TAILQ_FOREACH_SAFE(aop, &egc->aops_for_callback,
entry, aop_tmp) { 1409
LIBXL_TAILQ_REMOVE(&egc->aops_for_callback, aop, entry);
from here i see that egc_run_callbacks is at line 1405 "
CTX->event_hooks->event_occurs(CTX->event_hooks_user, ev);" , but i
have no idea what he is doing there and while it "hangs" here!?!
if i see it correctly, the systems freeze/hangs because it waits of the
release of the lock for the vm which actuall attach a network-device,
and the process of attaching the network-device didn Ìt finished and
hold the lock. as i say at the geginning of my mail, if i only attach a
block-device to the vm`s every thing runs, and with additional
attaching a network-device after 20 to 100 resume , it freeze´s.
i am gratefull for any help,hints and tips for further debugging.
all the best
max
for completness , here are the output of "(gdb) thread apply all bt
full":
[trimmed by moderator]
9 years, 1 month
[libvirt] libvirt-snmp development
by Maxim Nestratov
Hi all,
There were no active develoment in libvirt-snmp subproject for a while.
Taking this into account I want to ask the following.
If we are, here in Virtuozzo, interested in extending this subproject,
will there be support from project maintainers in doing this or not?
Maxim Nestratov
9 years, 1 month
[libvirt] [PATCH] libxl: open libxl log stream with libvirtd log_level
by Jim Fehlig
Instead of a hardcoded DEBUG log level, use the overall
daemon log level specified in libvirtd.conf when opening
a log stream with libxl. libxl is very verbose when DEBUG
log level is set, resulting in huge log files that can
potentially fill a disk. Control of libxl verbosity should
be placed in the administrator's hands.
Signed-off-by: Jim Fehlig <jfehlig(a)suse.com>
---
src/libxl/libxl_conf.c | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/libxl/libxl_conf.c b/src/libxl/libxl_conf.c
index a76ad5a..40fa4b5 100644
--- a/src/libxl/libxl_conf.c
+++ b/src/libxl/libxl_conf.c
@@ -1496,6 +1496,7 @@ libxlDriverConfigNew(void)
{
libxlDriverConfigPtr cfg;
char *log_file = NULL;
+ xentoollog_level log_level;
char ebuf[1024];
unsigned int free_mem;
@@ -1540,9 +1541,24 @@ libxlDriverConfigNew(void)
}
VIR_FREE(log_file);
+ switch (virLogGetDefaultPriority()) {
+ case VIR_LOG_DEBUG:
+ log_level = XTL_DEBUG;
+ break;
+ case VIR_LOG_INFO:
+ log_level = XTL_INFO;
+ break;
+ case VIR_LOG_WARN:
+ log_level = XTL_WARN;
+ break;
+ case VIR_LOG_ERROR:
+ log_level = XTL_ERROR;
+ break;
+ }
+
cfg->logger =
(xentoollog_logger *)xtl_createlogger_stdiostream(cfg->logger_file,
- XTL_DEBUG, XTL_STDIOSTREAM_SHOW_DATE);
+ log_level, XTL_STDIOSTREAM_SHOW_DATE);
if (!cfg->logger) {
VIR_ERROR(_("cannot create logger for libxenlight, disabling driver"));
goto error;
--
2.5.0
9 years, 1 month
[libvirt] [PATCH v2 00/17] Drop support for QEMU < 0.12.0
by Daniel P. Berrange
A v2 of this series:
https://www.redhat.com/archives/libvir-list/2015-November/msg00165.html
The patches for introducing virtlogd will be significantly
simplified if we don't need to worry about parsing stderr
during startup. This is required prior to QEMU 0.11 so
that we can get the dyanamically allocated /dev/pty/NNN
paths.
The QEMU 0.12.1 release was shipped in RHEL-6 vintage
distros and is already quite old, so seems like a fair
target version to aim for as the minimum required.
By dropping support for anything older than QEMU 0.12.0
we can remove the code for parsing stderr. The QEMU 0.12.0
release was quite special because it was the release where
QEMU switched what I call its "modern" approach to configuration
via -device. A major part of the complexity of the QEMU command
line generator is due to need to support non-device syntax,
so by mandating QEMU 0.12.0 we'll be able to kill off alot
of conditional code. This series makes a start by assuming
existance of 5 features, -vnc, 'info chardev', -no-reboot,
-drive and -name, but there are a tonne more we can assume.
This series drops 20 QEMU_CAPS_* flags, but there are still
another ~15-20 that can be dropped, now we assume 0.12.0
or better.
Changed in v2:
- Fixed misc coverity reports from John
- Rebased to use test .args files with new line wrapping for clarity
- Split out some fixes into separate patches
- Dropped a bunch more capabilities
Daniel P. Berrange (17):
qemu: mandate QEMU version 0.12.0 or newer
qemu: remove all support for kQEMU
qemu: assume -vnc arg always takes a ':'
qemu: assume 'info chardev' is always available
qemu: assume -no-reboot is always available
qemu: handle USB bus in qemuAssignDeviceDiskAliasFixed()
qemu: handle floppy disk bus when parsing command line argv
qemu: assume -drive argument is always available
qemu: assume -name is always available
qemu: assume -uuid is always available
qemu: really remove last traces of Xenner support
qemu: assume vnet-hdr feature is always available
qemu: assume support for all migration protocols except rdma
qemu: assume -drive cache always uses v2 option names
qemu: assume -drive format is always available
qemu: assume -vga is always available
qemu: assume various QEMU 0.10 features are always available
src/qemu/qemu_capabilities.c | 145 +---
src/qemu/qemu_capabilities.h | 57 +-
src/qemu/qemu_command.c | 748 +++++++--------------
src/qemu/qemu_command.h | 2 -
src/qemu/qemu_hotplug.c | 15 +-
src/qemu/qemu_migration.c | 77 +--
src/qemu/qemu_process.c | 204 +-----
tests/qemuargv2xmltest.c | 7 -
tests/qemucapabilitiesdata/caps_1.2.2-1.caps | 14 -
tests/qemucapabilitiesdata/caps_1.3.1-1.caps | 14 -
tests/qemucapabilitiesdata/caps_1.4.2-1.caps | 14 -
tests/qemucapabilitiesdata/caps_1.5.3-1.caps | 14 -
tests/qemucapabilitiesdata/caps_1.6.0-1.caps | 14 -
tests/qemucapabilitiesdata/caps_1.6.50-1.caps | 14 -
tests/qemucapabilitiesdata/caps_2.1.1-1.caps | 14 -
tests/qemucaps2xmldata/all_1.6.0-1.caps | 14 -
tests/qemucaps2xmldata/nodisksnapshot_1.6.0-1.caps | 14 -
tests/qemuhelpdata/kvm-74 | 111 ---
tests/qemuhelpdata/kvm-83-rhel56 | 141 ----
tests/qemuhelpdata/kvm-86 | 170 -----
tests/qemuhelpdata/qemu-0.10.5 | 141 ----
tests/qemuhelpdata/qemu-0.9.1 | 102 ---
tests/qemuhelpdata/qemu-kvm-0.10.5 | 155 -----
tests/qemuhelpdata/qemu-kvm-0.11.0-rc2 | 177 -----
tests/qemuhelptest.c | 276 --------
tests/qemuhotplugtest.c | 2 -
.../qemuxml2argv-aarch64-aavmf-virtio-mmio.args | 4 +-
.../qemuxml2argv-aarch64-cpu-passthrough.args | 4 +-
.../qemuxml2argvdata/qemuxml2argv-aarch64-gic.args | 2 +
.../qemuxml2argv-aarch64-gicv3.args | 2 +
.../qemuxml2argv-aarch64-kvm-32-on-64.args | 4 +-
.../qemuxml2argv-aarch64-mmio-default-pci.args | 4 +-
.../qemuxml2argv-aarch64-virt-default-nic.args | 2 +
.../qemuxml2argv-aarch64-virt-virtio.args | 4 +-
.../qemuxml2argv-aarch64-virtio-pci.args | 4 +-
.../qemuxml2argv-arm-vexpressa9-basic.args | 4 +-
.../qemuxml2argv-arm-vexpressa9-nodevs.args | 2 +
.../qemuxml2argv-arm-vexpressa9-virtio.args | 4 +-
.../qemuxml2argv-arm-virt-virtio.args | 4 +-
.../qemuxml2argv-balloon-device-auto.args | 5 +-
.../qemuxml2argv-balloon-device-period.args | 5 +-
.../qemuxml2argv-balloon-device.args | 5 +-
.../qemuxml2argvdata/qemuxml2argv-bios-nvram.args | 2 +
tests/qemuxml2argvdata/qemuxml2argv-bios.args | 5 +-
.../qemuxml2argv-blkdeviotune-max.args | 9 +-
.../qemuxml2argv-blkdeviotune.args | 9 +-
.../qemuxml2argv-blkiotune-device.args | 3 +-
tests/qemuxml2argvdata/qemuxml2argv-blkiotune.args | 3 +-
.../qemuxml2argvdata/qemuxml2argv-boot-cdrom.args | 4 +-
.../qemuxml2argv-boot-complex-bootindex.args | 16 +-
.../qemuxml2argv-boot-complex.args | 16 +-
.../qemuxml2argv-boot-floppy-q35.args | 4 +-
.../qemuxml2argvdata/qemuxml2argv-boot-floppy.args | 6 +-
...xml2argv-boot-menu-disable-drive-bootindex.args | 4 +-
.../qemuxml2argv-boot-menu-disable-drive.args | 4 +-
.../qemuxml2argv-boot-menu-disable.args | 4 +-
...qemuxml2argv-boot-menu-enable-with-timeout.args | 4 +-
.../qemuxml2argv-boot-menu-enable.args | 4 +-
.../qemuxml2argvdata/qemuxml2argv-boot-multi.args | 4 +-
.../qemuxml2argv-boot-network.args | 4 +-
.../qemuxml2argvdata/qemuxml2argv-boot-order.args | 11 +-
.../qemuxml2argvdata/qemuxml2argv-boot-strict.args | 16 +-
.../qemuxml2argv-bootindex-floppy-q35.args | 4 +-
.../qemuxml2argv-channel-guestfwd.args | 5 +-
.../qemuxml2argv-channel-spicevmc-old.args | 6 +-
.../qemuxml2argv-channel-spicevmc.args | 6 +-
.../qemuxml2argv-channel-virtio-auto.args | 5 +-
.../qemuxml2argv-channel-virtio-autoadd.args | 5 +-
.../qemuxml2argv-channel-virtio-autoassign.args | 5 +-
.../qemuxml2argv-channel-virtio-default.args | 5 +-
.../qemuxml2argv-channel-virtio-state.args | 5 +-
.../qemuxml2argv-channel-virtio-unix.args | 5 +-
.../qemuxml2argv-channel-virtio.args | 5 +-
.../qemuxml2argv-clock-catchup.args | 4 +-
.../qemuxml2argv-clock-france.args | 4 +-
.../qemuxml2argv-clock-hpet-off.args | 4 +-
...muxml2argv-clock-localtime-basis-localtime.args | 4 +-
.../qemuxml2argv-clock-localtime.args | 4 +-
.../qemuxml2argv-clock-timer-hyperv-rtc.args | 2 +
tests/qemuxml2argvdata/qemuxml2argv-clock-utc.args | 10 +-
tests/qemuxml2argvdata/qemuxml2argv-clock-utc.xml | 2 +-
.../qemuxml2argv-clock-variable.args | 4 +-
.../qemuxml2argv-console-compat-auto.args | 4 +-
.../qemuxml2argv-console-compat-chardev.args | 5 +-
.../qemuxml2argv-console-compat.args | 4 +-
.../qemuxml2argv-console-sclp.args | 4 +-
.../qemuxml2argv-console-virtio-ccw.args | 4 +-
.../qemuxml2argv-console-virtio-many.args | 5 +-
.../qemuxml2argv-console-virtio-s390.args | 4 +-
.../qemuxml2argv-console-virtio.args | 5 +-
.../qemuxml2argv-controller-order.args | 8 +-
.../qemuxml2argv-cpu-Haswell-noTSX.args | 2 +
.../qemuxml2argvdata/qemuxml2argv-cpu-Haswell.args | 2 +
.../qemuxml2argv-cpu-Haswell2.args | 2 +
.../qemuxml2argv-cpu-Haswell3.args | 2 +
.../qemuxml2argv-cpu-eoi-disabled.args | 2 +
.../qemuxml2argv-cpu-eoi-enabled.args | 2 +
.../qemuxml2argvdata/qemuxml2argv-cpu-exact1.args | 2 +
.../qemuxml2argv-cpu-exact2-nofallback.args | 2 +
.../qemuxml2argvdata/qemuxml2argv-cpu-exact2.args | 2 +
.../qemuxml2argv-cpu-fallback.args | 2 +
.../qemuxml2argv-cpu-host-kvmclock.args | 2 +
.../qemuxml2argv-cpu-host-model-fallback.args | 2 +
.../qemuxml2argv-cpu-host-model-vendor.args | 2 +
.../qemuxml2argv-cpu-host-model.args | 2 +
...qemuxml2argv-cpu-host-passthrough-features.args | 4 +-
.../qemuxml2argv-cpu-host-passthrough.args | 2 +
.../qemuxml2argv-cpu-kvmclock.args | 2 +
.../qemuxml2argv-cpu-minimum1.args | 2 +
.../qemuxml2argv-cpu-minimum2.args | 2 +
.../qemuxml2argv-cpu-numa-disjoint.args | 2 +
.../qemuxml2argv-cpu-numa-no-memory-element.args | 2 +
tests/qemuxml2argvdata/qemuxml2argv-cpu-numa1.args | 2 +
tests/qemuxml2argvdata/qemuxml2argv-cpu-numa2.args | 2 +
.../qemuxml2argvdata/qemuxml2argv-cpu-strict1.args | 2 +
.../qemuxml2argv-cpu-topology1.args | 2 +
.../qemuxml2argv-cpu-topology2.args | 2 +
.../qemuxml2argv-cpu-topology3.args | 2 +
.../qemuxml2argv-cputune-numatune.args | 2 +
.../qemuxml2argv-cputune-zero-shares.args | 3 +-
tests/qemuxml2argvdata/qemuxml2argv-cputune.args | 3 +-
.../qemuxml2argv-default-kvm-host-arch.args | 2 +
.../qemuxml2argv-default-qemu-host-arch.args | 2 +
tests/qemuxml2argvdata/qemuxml2argv-disk-aio.args | 2 +
.../qemuxml2argv-disk-blockio.args | 6 +-
.../qemuxml2argv-disk-cdrom-empty.args | 6 +-
.../qemuxml2argv-disk-cdrom-network-ftp.args | 4 +-
.../qemuxml2argv-disk-cdrom-network-ftps.args | 4 +-
.../qemuxml2argv-disk-cdrom-network-http.args | 4 +-
.../qemuxml2argv-disk-cdrom-network-https.args | 4 +-
.../qemuxml2argv-disk-cdrom-network-tftp.args | 4 +-
...qemuxml2argv-disk-cdrom-tray-no-device-cap.args | 5 +-
.../qemuxml2argv-disk-cdrom-tray.args | 9 +-
.../qemuxml2argvdata/qemuxml2argv-disk-cdrom.args | 6 +-
.../qemuxml2argv-disk-copy_on_read.args | 6 +-
.../qemuxml2argv-disk-drive-boot-cdrom.args | 6 +-
.../qemuxml2argv-disk-drive-boot-disk.args | 6 +-
.../qemuxml2argv-disk-drive-cache-directsync.args | 2 +
.../qemuxml2argv-disk-drive-cache-unsafe.args | 2 +
.../qemuxml2argv-disk-drive-cache-v1-none.args | 21 -
.../qemuxml2argv-disk-drive-cache-v1-none.xml | 35 -
.../qemuxml2argv-disk-drive-cache-v1-wb.args | 21 -
.../qemuxml2argv-disk-drive-cache-v1-wb.xml | 35 -
.../qemuxml2argv-disk-drive-cache-v1-wt.args | 21 -
.../qemuxml2argv-disk-drive-cache-v1-wt.xml | 35 -
.../qemuxml2argv-disk-drive-cache-v2-none.args | 2 +
.../qemuxml2argv-disk-drive-cache-v2-wb.args | 2 +
.../qemuxml2argv-disk-drive-cache-v2-wt.args | 2 +
.../qemuxml2argv-disk-drive-copy-on-read.args | 2 +
.../qemuxml2argv-disk-drive-discard.args | 6 +-
...uxml2argv-disk-drive-error-policy-enospace.args | 4 +-
.../qemuxml2argv-disk-drive-error-policy-stop.args | 4 +-
...gv-disk-drive-error-policy-wreport-rignore.args | 4 +-
.../qemuxml2argv-disk-drive-fat.args | 2 +
.../qemuxml2argv-disk-drive-fmt-qcow.args | 2 +
.../qemuxml2argv-disk-drive-network-gluster.args | 2 +
...qemuxml2argv-disk-drive-network-iscsi-auth.args | 2 +
.../qemuxml2argv-disk-drive-network-iscsi-lun.args | 2 +
.../qemuxml2argv-disk-drive-network-iscsi.args | 2 +
...qemuxml2argv-disk-drive-network-nbd-export.args | 2 +
...ml2argv-disk-drive-network-nbd-ipv6-export.args | 2 +
.../qemuxml2argv-disk-drive-network-nbd-ipv6.args | 2 +
.../qemuxml2argv-disk-drive-network-nbd-unix.args | 2 +
.../qemuxml2argv-disk-drive-network-nbd.args | 2 +
.../qemuxml2argv-disk-drive-network-rbd-auth.args | 2 +
...muxml2argv-disk-drive-network-rbd-ceph-env.args | 4 +-
.../qemuxml2argv-disk-drive-network-rbd-ipv6.args | 2 +
.../qemuxml2argv-disk-drive-network-rbd.args | 2 +
.../qemuxml2argv-disk-drive-network-sheepdog.args | 2 +
.../qemuxml2argv-disk-drive-no-boot.args | 9 +-
.../qemuxml2argv-disk-drive-readonly-disk.args | 7 +-
...qemuxml2argv-disk-drive-readonly-no-device.args | 6 +-
.../qemuxml2argv-disk-drive-shared.args | 4 +-
.../qemuxml2argv-disk-floppy-pseries.args | 8 +-
...emuxml2argv-disk-floppy-tray-no-device-cap.args | 7 +-
.../qemuxml2argv-disk-floppy-tray.args | 8 +-
.../qemuxml2argvdata/qemuxml2argv-disk-floppy.args | 8 +-
.../qemuxml2argv-disk-geometry.args | 6 +-
.../qemuxml2argv-disk-ide-drive-split.args | 6 +-
.../qemuxml2argv-disk-ide-wwn.args | 4 +-
.../qemuxml2argv-disk-ioeventfd.args | 7 +-
.../qemuxml2argv-disk-ioeventfd.xml | 1 +
.../qemuxml2argvdata/qemuxml2argv-disk-iscsi.args | 7 +-
tests/qemuxml2argvdata/qemuxml2argv-disk-many.args | 10 +-
.../qemuxml2argvdata/qemuxml2argv-disk-order.args | 11 +-
.../qemuxml2argv-disk-sata-device.args | 4 +-
.../qemuxml2argv-disk-scsi-device-auto.args | 6 +-
.../qemuxml2argv-disk-scsi-device.args | 6 +-
.../qemuxml2argv-disk-scsi-disk-split.args | 10 +-
.../qemuxml2argv-disk-scsi-disk-vpd.args | 6 +-
.../qemuxml2argv-disk-scsi-disk-wwn.args | 6 +-
.../qemuxml2argv-disk-scsi-lun-passthrough.args | 6 +-
.../qemuxml2argv-disk-scsi-megasas.args | 6 +-
.../qemuxml2argv-disk-scsi-virtio-scsi.args | 6 +-
.../qemuxml2argv-disk-scsi-vscsi.args | 6 +-
.../qemuxml2argvdata/qemuxml2argv-disk-serial.args | 4 +-
.../qemuxml2argv-disk-snapshot.args | 2 +
.../qemuxml2argv-disk-source-pool-mode.args | 4 +-
.../qemuxml2argv-disk-source-pool.args | 6 +-
.../qemuxml2argv-disk-usb-device-removable.args | 6 +-
.../qemuxml2argv-disk-usb-device.args | 6 +-
tests/qemuxml2argvdata/qemuxml2argv-disk-usb.args | 4 +-
.../qemuxml2argv-disk-virtio-ccw-many.args | 10 +-
.../qemuxml2argv-disk-virtio-ccw.args | 6 +-
.../qemuxml2argv-disk-virtio-s390.args | 4 +-
.../qemuxml2argv-disk-virtio-scsi-ccw.args | 6 +-
.../qemuxml2argv-disk-virtio-scsi-cmd_per_lun.args | 4 +-
.../qemuxml2argv-disk-virtio-scsi-ioeventfd.args | 4 +-
.../qemuxml2argv-disk-virtio-scsi-max_sectors.args | 4 +-
.../qemuxml2argv-disk-virtio-scsi-num_queues.args | 4 +-
.../qemuxml2argvdata/qemuxml2argv-disk-virtio.args | 10 +-
.../qemuxml2argvdata/qemuxml2argv-disk-xenvbd.args | 10 +-
.../qemuxml2argv-encrypted-disk.args | 3 +-
.../qemuxml2argv-eoi-disabled.args | 2 +
.../qemuxml2argvdata/qemuxml2argv-eoi-enabled.args | 2 +
tests/qemuxml2argvdata/qemuxml2argv-event_idx.args | 7 +-
.../qemuxml2argv-fips-enabled.args | 4 +-
.../qemuxml2argv-floppy-drive-fat.args | 2 +
tests/qemuxml2argvdata/qemuxml2argv-fs9p-ccw.args | 4 +-
tests/qemuxml2argvdata/qemuxml2argv-fs9p.args | 5 +-
.../qemuxml2argv-graphics-sdl-fullscreen.args | 8 +-
.../qemuxml2argv-graphics-sdl.args | 7 +-
...emuxml2argv-graphics-spice-agent-file-xfer.args | 5 +-
.../qemuxml2argv-graphics-spice-agentmouse.args | 5 +-
.../qemuxml2argv-graphics-spice-compression.args | 5 +-
.../qemuxml2argv-graphics-spice-qxl-vga.args | 5 +-
.../qemuxml2argv-graphics-spice-sasl.args | 5 +-
.../qemuxml2argv-graphics-spice-timeout.args | 7 +-
.../qemuxml2argv-graphics-spice-usb-redir.args | 2 +
.../qemuxml2argv-graphics-spice.args | 5 +-
.../qemuxml2argv-graphics-vnc-policy.args | 7 +-
.../qemuxml2argv-graphics-vnc-sasl.args | 4 +-
.../qemuxml2argv-graphics-vnc-socket.args | 7 +-
.../qemuxml2argv-graphics-vnc-tls.args | 7 +-
.../qemuxml2argv-graphics-vnc-websocket.args | 5 +-
.../qemuxml2argv-graphics-vnc.args | 7 +-
.../qemuxml2argv-hostdev-pci-address-device.args | 5 +-
.../qemuxml2argv-hostdev-pci-address.args | 4 +-
.../qemuxml2argv-hostdev-scsi-boot.args | 4 +-
.../qemuxml2argv-hostdev-scsi-lsi-iscsi-auth.args | 4 +-
.../qemuxml2argv-hostdev-scsi-lsi-iscsi.args | 4 +-
.../qemuxml2argv-hostdev-scsi-lsi.args | 4 +-
.../qemuxml2argv-hostdev-scsi-readonly.args | 4 +-
...emuxml2argv-hostdev-scsi-virtio-iscsi-auth.args | 4 +-
.../qemuxml2argv-hostdev-scsi-virtio-iscsi.args | 4 +-
.../qemuxml2argv-hostdev-scsi-virtio-scsi.args | 4 +-
...muxml2argv-hostdev-usb-address-device-boot.args | 5 +-
.../qemuxml2argv-hostdev-usb-address-device.args | 5 +-
.../qemuxml2argv-hostdev-usb-address.args | 4 +-
.../qemuxml2argv-hostdev-vfio-multidomain.args | 5 +-
.../qemuxml2argv-hostdev-vfio.args | 5 +-
.../qemuxml2argv-hotplug-base.args | 2 +
.../qemuxml2argv-hugepages-numa.args | 7 +-
.../qemuxml2argv-hugepages-pages.args | 4 +-
.../qemuxml2argv-hugepages-pages2.args | 4 +-
.../qemuxml2argv-hugepages-pages3.args | 4 +-
.../qemuxml2argv-hugepages-pages5.args | 4 +-
.../qemuxml2argv-hugepages-pages6.args | 4 +-
.../qemuxml2argv-hugepages-shared.args | 4 +-
tests/qemuxml2argvdata/qemuxml2argv-hugepages.args | 4 +-
.../qemuxml2argvdata/qemuxml2argv-hyperv-off.args | 2 +
tests/qemuxml2argvdata/qemuxml2argv-hyperv.args | 2 +
.../qemuxml2argv-input-usbmouse-addr.args | 5 +-
.../qemuxml2argv-input-usbmouse.args | 4 +-
.../qemuxml2argv-input-usbtablet.args | 4 +-
.../qemuxml2argv-iothreads-disk-virtio-ccw.args | 6 +-
.../qemuxml2argv-iothreads-disk.args | 10 +-
.../qemuxml2argv-iothreads-ids-partial.args | 4 +-
.../qemuxml2argv-iothreads-ids.args | 4 +-
tests/qemuxml2argvdata/qemuxml2argv-iothreads.args | 4 +-
.../qemuxml2argv-kvm-features-off.args | 2 +
.../qemuxml2argv-kvm-features.args | 2 +
.../qemuxml2argv-kvm-pit-delay.args | 4 +-
.../qemuxml2argv-kvm-pit-device.args | 4 +-
tests/qemuxml2argvdata/qemuxml2argv-kvm.args | 2 +
.../qemuxml2argv-kvmclock+eoi-disabled.args | 2 +
tests/qemuxml2argvdata/qemuxml2argv-kvmclock.args | 2 +
tests/qemuxml2argvdata/qemuxml2argv-lease.args | 4 +-
.../qemuxml2argv-machine-aeskeywrap-off-argv.args | 5 +-
.../qemuxml2argv-machine-aeskeywrap-off-cap.args | 4 +-
.../qemuxml2argv-machine-aeskeywrap-off-caps.args | 4 +-
.../qemuxml2argv-machine-aeskeywrap-on-argv.args | 5 +-
.../qemuxml2argv-machine-aeskeywrap-on-cap.args | 4 +-
.../qemuxml2argv-machine-aeskeywrap-on-caps.args | 4 +-
.../qemuxml2argv-machine-aliases1.args | 4 +-
.../qemuxml2argv-machine-aliases2.args | 4 +-
.../qemuxml2argv-machine-core-off.args | 4 +-
.../qemuxml2argv-machine-core-on.args | 4 +-
.../qemuxml2argv-machine-deakeywrap-off-argv.args | 5 +-
.../qemuxml2argv-machine-deakeywrap-off-cap.args | 4 +-
.../qemuxml2argv-machine-deakeywrap-off-caps.args | 4 +-
.../qemuxml2argv-machine-deakeywrap-on-argv.args | 5 +-
.../qemuxml2argv-machine-deakeywrap-on-cap.args | 4 +-
.../qemuxml2argv-machine-deakeywrap-on-caps.args | 4 +-
.../qemuxml2argv-machine-keywrap-none-argv.args | 5 +-
.../qemuxml2argv-machine-keywrap-none-caps.args | 4 +-
.../qemuxml2argv-machine-keywrap-none.args | 4 +-
.../qemuxml2argv-machine-usb-opt.args | 4 +-
.../qemuxml2argv-machine-vmport-opt.args | 4 +-
.../qemuxml2argv-memory-hotplug-dimm-addr.args | 5 +-
.../qemuxml2argv-memory-hotplug-dimm.args | 5 +-
.../qemuxml2argv-memory-hotplug.args | 4 +-
.../qemuxml2argv-memtune-unlimited.args | 3 +-
tests/qemuxml2argvdata/qemuxml2argv-memtune.args | 3 +-
tests/qemuxml2argvdata/qemuxml2argv-metadata.args | 3 +-
.../qemuxml2argv-migrate-numa-unaligned.args | 4 +-
tests/qemuxml2argvdata/qemuxml2argv-migrate.args | 4 +-
.../qemuxml2argv-minimal-msg-timestamp.args | 3 +-
.../qemuxml2argv-minimal-s390.args | 3 +-
tests/qemuxml2argvdata/qemuxml2argv-minimal.args | 3 +-
tests/qemuxml2argvdata/qemuxml2argv-misc-acpi.args | 4 +-
.../qemuxml2argv-misc-disable-s3.args | 4 +-
.../qemuxml2argv-misc-disable-suspends.args | 4 +-
.../qemuxml2argv-misc-enable-s4.args | 4 +-
.../qemuxml2argv-misc-no-reboot.args | 4 +-
tests/qemuxml2argvdata/qemuxml2argv-misc-uuid.args | 2 +-
tests/qemuxml2argvdata/qemuxml2argv-mlock-off.args | 2 +
tests/qemuxml2argvdata/qemuxml2argv-mlock-on.args | 2 +
.../qemuxml2argv-mlock-unsupported.args | 2 +
.../qemuxml2argv-monitor-json.args | 5 +-
.../qemuxml2argv-multifunction-pci-device.args | 4 +-
.../qemuxml2argvdata/qemuxml2argv-net-client.args | 8 +-
.../qemuxml2argv-net-eth-ifname.args | 8 +-
.../qemuxml2argv-net-eth-names.args | 4 +-
tests/qemuxml2argvdata/qemuxml2argv-net-eth.args | 8 +-
.../qemuxml2argv-net-hostdev-multidomain.args | 5 +-
.../qemuxml2argv-net-hostdev-vfio-multidomain.args | 5 +-
.../qemuxml2argv-net-hostdev-vfio.args | 5 +-
.../qemuxml2argvdata/qemuxml2argv-net-hostdev.args | 5 +-
tests/qemuxml2argvdata/qemuxml2argv-net-mcast.args | 8 +-
.../qemuxml2argvdata/qemuxml2argv-net-server.args | 8 +-
tests/qemuxml2argvdata/qemuxml2argv-net-udp.args | 9 +-
tests/qemuxml2argvdata/qemuxml2argv-net-user.args | 8 +-
.../qemuxml2argv-net-vhostuser-multiq.args | 5 +-
.../qemuxml2argv-net-vhostuser.args | 5 +-
.../qemuxml2argv-net-virtio-ccw.args | 2 +
.../qemuxml2argv-net-virtio-device.args | 5 +-
.../qemuxml2argv-net-virtio-disable-offloads.args | 5 +-
.../qemuxml2argv-net-virtio-netdev.args | 5 +-
.../qemuxml2argv-net-virtio-s390.args | 2 +
.../qemuxml2argvdata/qemuxml2argv-net-virtio.args | 8 +-
.../qemuxml2argvdata/qemuxml2argv-no-shutdown.args | 5 +-
.../qemuxml2argv-nographics-vga.args | 4 +-
.../qemuxml2argvdata/qemuxml2argv-nographics.args | 4 +-
.../qemuxml2argv-nosharepages.args | 4 +-
...qemuxml2argv-numad-auto-memory-vcpu-cpuset.args | 4 +-
...d-auto-memory-vcpu-no-cpuset-and-placement.args | 4 +-
...muxml2argv-numad-auto-vcpu-static-numatune.args | 4 +-
...qemuxml2argv-numad-static-memory-auto-vcpu.args | 4 +-
tests/qemuxml2argvdata/qemuxml2argv-numad.args | 4 +-
...qemuxml2argv-numatune-auto-nodeset-invalid.args | 4 +-
.../qemuxml2argv-numatune-auto-prefer.args | 2 +
.../qemuxml2argv-numatune-memnode-no-memory.args | 2 +
.../qemuxml2argv-numatune-memnode.args | 2 +
.../qemuxml2argv-numatune-memory.args | 4 +-
.../qemuxml2argv-panic-no-address.args | 5 +-
tests/qemuxml2argvdata/qemuxml2argv-panic.args | 5 +-
.../qemuxml2argv-parallel-parport-chardev.args | 5 +-
.../qemuxml2argv-parallel-tcp-chardev.args | 5 +-
.../qemuxml2argv-parallel-tcp.args | 4 +-
.../qemuxml2argv-pci-autoadd-addr.args | 6 +-
.../qemuxml2argv-pci-autoadd-idx.args | 6 +-
.../qemuxml2argv-pci-bridge-many-disks.args | 317 ++++++---
tests/qemuxml2argvdata/qemuxml2argv-pci-many.args | 89 ++-
tests/qemuxml2argvdata/qemuxml2argv-pci-rom.args | 5 +-
.../qemuxml2argv-pci-serial-dev-chardev.args | 5 +-
.../qemuxml2argv-pcie-root-port.args | 4 +-
tests/qemuxml2argvdata/qemuxml2argv-pcie-root.args | 2 +
.../qemuxml2argv-pcie-switch-downstream-port.args | 4 +-
.../qemuxml2argv-pcie-switch-upstream-port.args | 4 +-
.../qemuxml2argv-pcihole64-none.args | 2 +
.../qemuxml2argv-pcihole64-q35.args | 4 +-
tests/qemuxml2argvdata/qemuxml2argv-pcihole64.args | 2 +
.../qemuxml2argv-pmu-feature-off.args | 2 +
.../qemuxml2argvdata/qemuxml2argv-pmu-feature.args | 2 +
tests/qemuxml2argvdata/qemuxml2argv-ppc-dtb.args | 2 +
.../qemuxml2argv-ppce500-serial.args | 2 +
.../qemuxml2argv-ppce500-serial.xml | 1 +
.../qemuxml2argv-pseries-basic.args | 2 +
.../qemuxml2argv-pseries-cpu-compat.args | 2 +
.../qemuxml2argv-pseries-cpu-compat.xml | 1 +
.../qemuxml2argv-pseries-cpu-exact.args | 2 +
.../qemuxml2argv-pseries-cpu-le.args | 2 +
.../qemuxml2argv-pseries-disk.args | 1 +
.../qemuxml2argv-pseries-nvram.args | 2 +
.../qemuxml2argv-pseries-panic-missing.args | 2 +
.../qemuxml2argv-pseries-panic-no-address.args | 2 +
.../qemuxml2argv-pseries-usb-default.args | 2 +
.../qemuxml2argv-pseries-usb-kbd.args | 2 +
.../qemuxml2argv-pseries-usb-multi.args | 2 +
.../qemuxml2argv-pseries-vio-user-assigned.args | 4 +-
.../qemuxml2argvdata/qemuxml2argv-pseries-vio.args | 4 +-
.../qemuxml2argv-pv-spinlock-disabled.args | 2 +
.../qemuxml2argv-pv-spinlock-enabled.args | 2 +
tests/qemuxml2argvdata/qemuxml2argv-q35.args | 4 +-
.../qemuxml2argv-qemu-ns-no-env.args | 4 +-
tests/qemuxml2argvdata/qemuxml2argv-qemu-ns.args | 4 +-
.../qemuxml2argv-reboot-timeout-disabled.args | 2 +
.../qemuxml2argv-reboot-timeout-enabled.args | 2 +
.../qemuxml2argvdata/qemuxml2argv-restore-v1.args | 21 -
tests/qemuxml2argvdata/qemuxml2argv-restore-v1.xml | 28 -
.../qemuxml2argv-restore-v2-fd.args | 4 +-
.../qemuxml2argvdata/qemuxml2argv-restore-v2.args | 4 +-
...muxml2argv-s390-allow-bogus-usb-controller.args | 4 +-
...emuxml2argv-s390-allow-bogus-usb-controller.xml | 1 +
.../qemuxml2argv-s390-allow-bogus-usb-none.args | 4 +-
.../qemuxml2argv-s390-allow-bogus-usb-none.xml | 1 +
.../qemuxml2argv-seclabel-dac-none.args | 3 +-
.../qemuxml2argv-seclabel-dynamic-baselabel.args | 3 +-
.../qemuxml2argv-seclabel-dynamic-labelskip.args | 3 +-
.../qemuxml2argv-seclabel-dynamic-override.args | 5 +-
.../qemuxml2argv-seclabel-dynamic-relabel.args | 3 +-
.../qemuxml2argv-seclabel-dynamic.args | 3 +-
.../qemuxml2argv-seclabel-none.args | 3 +-
.../qemuxml2argv-seclabel-static-labelskip.args | 3 +-
.../qemuxml2argv-seclabel-static-relabel.args | 3 +-
.../qemuxml2argv-seclabel-static.args | 3 +-
.../qemuxml2argv-serial-dev-chardev-iobase.args | 5 +-
.../qemuxml2argv-serial-dev-chardev.args | 5 +-
.../qemuxml2argvdata/qemuxml2argv-serial-dev.args | 4 +-
.../qemuxml2argv-serial-file-chardev.args | 5 +-
.../qemuxml2argvdata/qemuxml2argv-serial-file.args | 4 +-
.../qemuxml2argv-serial-many-chardev.args | 5 +-
.../qemuxml2argvdata/qemuxml2argv-serial-many.args | 4 +-
.../qemuxml2argv-serial-pty-chardev.args | 5 +-
.../qemuxml2argvdata/qemuxml2argv-serial-pty.args | 4 +-
.../qemuxml2argv-serial-spiceport-nospice.args | 3 +-
.../qemuxml2argv-serial-spiceport.args | 5 +-
.../qemuxml2argv-serial-tcp-chardev.args | 5 +-
.../qemuxml2argv-serial-tcp-telnet-chardev.args | 5 +-
.../qemuxml2argv-serial-tcp-telnet.args | 4 +-
.../qemuxml2argvdata/qemuxml2argv-serial-tcp.args | 4 +-
.../qemuxml2argv-serial-udp-chardev.args | 5 +-
.../qemuxml2argvdata/qemuxml2argv-serial-udp.args | 4 +-
.../qemuxml2argv-serial-unix-chardev.args | 5 +-
.../qemuxml2argvdata/qemuxml2argv-serial-unix.args | 4 +-
.../qemuxml2argv-serial-vc-chardev.args | 5 +-
tests/qemuxml2argvdata/qemuxml2argv-serial-vc.args | 4 +-
tests/qemuxml2argvdata/qemuxml2argv-shmem.args | 2 +
.../qemuxml2argv-smartcard-controller.args | 2 +
.../qemuxml2argv-smartcard-host-certificates.args | 2 +
.../qemuxml2argv-smartcard-host.args | 2 +
...emuxml2argv-smartcard-passthrough-spicevmc.args | 2 +
.../qemuxml2argv-smartcard-passthrough-tcp.args | 2 +
tests/qemuxml2argvdata/qemuxml2argv-smbios.args | 4 +-
tests/qemuxml2argvdata/qemuxml2argv-smp.args | 4 +-
.../qemuxml2argv-sound-device.args | 5 +-
tests/qemuxml2argvdata/qemuxml2argv-sound.args | 4 +-
.../qemuxml2argv-tpm-passthrough.args | 2 +
.../qemuxml2argv-usb-controller.args | 2 +
tests/qemuxml2argvdata/qemuxml2argv-usb-hub.args | 2 +
.../qemuxml2argv-usb-ich9-companion.args | 2 +
.../qemuxml2argv-usb-ich9-ehci-addr.args | 2 +
tests/qemuxml2argvdata/qemuxml2argv-usb-none.args | 2 +
.../qemuxml2argv-usb-piix3-controller.args | 2 +
tests/qemuxml2argvdata/qemuxml2argv-usb-ports.args | 2 +
.../qemuxml2argv-usb-redir-boot.args | 2 +
.../qemuxml2argv-usb-redir-filter-version.args | 2 +
.../qemuxml2argv-usb-redir-filter.args | 2 +
tests/qemuxml2argvdata/qemuxml2argv-usb-redir.args | 2 +
tests/qemuxml2argvdata/qemuxml2argv-usb1-usb2.args | 2 +
.../qemuxml2argv-video-device-pciaddr-default.args | 6 +-
.../qemuxml2argv-video-qxl-device-vgamem.args | 6 +-
.../qemuxml2argv-video-qxl-device.args | 6 +-
.../qemuxml2argv-video-qxl-nodevice.args | 5 +-
.../qemuxml2argv-video-qxl-sec-device-vgamem.args | 6 +-
.../qemuxml2argv-video-qxl-sec-device.args | 6 +-
.../qemuxml2argv-video-vga-device-vgamem.args | 6 +-
.../qemuxml2argv-video-vga-device.args | 6 +-
.../qemuxml2argv-video-vga-nodevice.args | 5 +-
.../qemuxml2argvdata/qemuxml2argv-virtio-lun.args | 6 +-
.../qemuxml2argv-virtio-rng-ccw.args | 4 +-
.../qemuxml2argv-virtio-rng-default.args | 2 +
.../qemuxml2argv-virtio-rng-egd.args | 2 +
.../qemuxml2argv-virtio-rng-multiple.args | 2 +
.../qemuxml2argv-virtio-rng-random.args | 2 +
.../qemuxml2argv-watchdog-device.args | 5 +-
.../qemuxml2argv-watchdog-diag288.args | 4 +-
.../qemuxml2argv-watchdog-dump.args | 4 +-
.../qemuxml2argv-watchdog-injectnmi.args | 4 +-
tests/qemuxml2argvdata/qemuxml2argv-watchdog.args | 4 +-
tests/qemuxml2argvtest.c | 498 ++++++--------
tests/qemuxml2xmltest.c | 8 -
.../qemuxmlns-qemu-ns-commandline-ns0.args | 4 +-
.../qemuxmlns-qemu-ns-commandline-ns1.args | 4 +-
.../qemuxmlns-qemu-ns-commandline.args | 4 +-
.../qemuxmlns-qemu-ns-domain-commandline-ns0.args | 4 +-
.../qemuxmlns-qemu-ns-domain-commandline.args | 4 +-
.../qemuxmlns-qemu-ns-domain-ns0.args | 4 +-
tests/qemuxmlnsdata/qemuxmlns-qemu-ns-domain.args | 4 +-
tests/qemuxmlnstest.c | 2 -
491 files changed, 2258 insertions(+), 3395 deletions(-)
delete mode 100644 tests/qemuhelpdata/kvm-74
delete mode 100644 tests/qemuhelpdata/kvm-83-rhel56
delete mode 100644 tests/qemuhelpdata/kvm-86
delete mode 100644 tests/qemuhelpdata/qemu-0.10.5
delete mode 100644 tests/qemuhelpdata/qemu-0.9.1
delete mode 100644 tests/qemuhelpdata/qemu-kvm-0.10.5
delete mode 100644 tests/qemuhelpdata/qemu-kvm-0.11.0-rc2
delete mode 100644 tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v1-none.args
delete mode 100644 tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v1-none.xml
delete mode 100644 tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v1-wb.args
delete mode 100644 tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v1-wb.xml
delete mode 100644 tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v1-wt.args
delete mode 100644 tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v1-wt.xml
delete mode 100644 tests/qemuxml2argvdata/qemuxml2argv-restore-v1.args
delete mode 100644 tests/qemuxml2argvdata/qemuxml2argv-restore-v1.xml
--
2.5.0
9 years, 1 month
[libvirt] [PATCH] tests: Remove qemuxmlnstest
by Jiri Denemark
It's just a copy&paste of qemuxml2argv test anyway. We can test most of
them (except for qemuxmlns-qemu-ns-domain.xml which fails to validate
against our schema) by qemuxml2argv test.
Signed-off-by: Jiri Denemark <jdenemar(a)redhat.com>
---
tests/Makefile.am | 10 +-
.../qemuxml2argv-qemu-ns-commandline-ns0.args} | 2 +-
.../qemuxml2argv-qemu-ns-commandline-ns0.xml} | 0
.../qemuxml2argv-qemu-ns-commandline-ns1.args} | 2 +-
.../qemuxml2argv-qemu-ns-commandline-ns1.xml} | 0
.../qemuxml2argv-qemu-ns-commandline.args} | 2 +-
.../qemuxml2argv-qemu-ns-commandline.xml} | 0
...muxml2argv-qemu-ns-domain-commandline-ns0.args} | 2 +-
...emuxml2argv-qemu-ns-domain-commandline-ns0.xml} | 0
.../qemuxml2argv-qemu-ns-domain-commandline.args | 22 ++
.../qemuxml2argv-qemu-ns-domain-commandline.xml} | 0
.../qemuxml2argv-qemu-ns-domain-ns0.args | 22 ++
.../qemuxml2argv-qemu-ns-domain-ns0.xml} | 0
tests/qemuxml2argvtest.c | 7 +
.../qemuxmlns-qemu-ns-domain-commandline.args | 22 --
.../qemuxmlns-qemu-ns-domain-ns0.args | 22 --
tests/qemuxmlnsdata/qemuxmlns-qemu-ns-domain.args | 22 --
tests/qemuxmlnsdata/qemuxmlns-qemu-ns-domain.xml | 27 ---
tests/qemuxmlnstest.c | 269 ---------------------
19 files changed, 57 insertions(+), 374 deletions(-)
rename tests/{qemuxmlnsdata/qemuxmlns-qemu-ns-commandline-ns0.args => qemuxml2argvdata/qemuxml2argv-qemu-ns-commandline-ns0.args} (84%)
rename tests/{qemuxmlnsdata/qemuxmlns-qemu-ns-commandline-ns0.xml => qemuxml2argvdata/qemuxml2argv-qemu-ns-commandline-ns0.xml} (100%)
rename tests/{qemuxmlnsdata/qemuxmlns-qemu-ns-commandline.args => qemuxml2argvdata/qemuxml2argv-qemu-ns-commandline-ns1.args} (84%)
rename tests/{qemuxmlnsdata/qemuxmlns-qemu-ns-commandline-ns1.xml => qemuxml2argvdata/qemuxml2argv-qemu-ns-commandline-ns1.xml} (100%)
rename tests/{qemuxmlnsdata/qemuxmlns-qemu-ns-commandline-ns1.args => qemuxml2argvdata/qemuxml2argv-qemu-ns-commandline.args} (84%)
rename tests/{qemuxmlnsdata/qemuxmlns-qemu-ns-commandline.xml => qemuxml2argvdata/qemuxml2argv-qemu-ns-commandline.xml} (100%)
rename tests/{qemuxmlnsdata/qemuxmlns-qemu-ns-domain-commandline-ns0.args => qemuxml2argvdata/qemuxml2argv-qemu-ns-domain-commandline-ns0.args} (84%)
rename tests/{qemuxmlnsdata/qemuxmlns-qemu-ns-domain-commandline-ns0.xml => qemuxml2argvdata/qemuxml2argv-qemu-ns-domain-commandline-ns0.xml} (100%)
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-qemu-ns-domain-commandline.args
rename tests/{qemuxmlnsdata/qemuxmlns-qemu-ns-domain-commandline.xml => qemuxml2argvdata/qemuxml2argv-qemu-ns-domain-commandline.xml} (100%)
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-qemu-ns-domain-ns0.args
rename tests/{qemuxmlnsdata/qemuxmlns-qemu-ns-domain-ns0.xml => qemuxml2argvdata/qemuxml2argv-qemu-ns-domain-ns0.xml} (100%)
delete mode 100644 tests/qemuxmlnsdata/qemuxmlns-qemu-ns-domain-commandline.args
delete mode 100644 tests/qemuxmlnsdata/qemuxmlns-qemu-ns-domain-ns0.args
delete mode 100644 tests/qemuxmlnsdata/qemuxmlns-qemu-ns-domain.args
delete mode 100644 tests/qemuxmlnsdata/qemuxmlns-qemu-ns-domain.xml
delete mode 100644 tests/qemuxmlnstest.c
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 4af38fe..c564038 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -116,7 +116,6 @@ EXTRA_DIST = \
qemumonitorjsondata \
qemuxml2argvdata \
qemuxml2xmloutdata \
- qemuxmlnsdata \
schematestutils.sh \
secretxml2xmlin \
securityselinuxhelperdata \
@@ -244,7 +243,7 @@ test_programs += xlconfigtest
endif WITH_LIBXL
if WITH_QEMU
-test_programs += qemuxml2argvtest qemuxml2xmltest qemuxmlnstest \
+test_programs += qemuxml2argvtest qemuxml2xmltest \
qemuargv2xmltest qemuhelptest domainsnapshotxml2xmltest \
qemumonitortest qemumonitorjsontest qemuhotplugtest \
qemuagenttest qemucapabilitiestest qemucaps2xmltest \
@@ -567,11 +566,6 @@ qemuxml2xmltest_SOURCES = \
testutils.c testutils.h
qemuxml2xmltest_LDADD = $(qemu_LDADDS) $(LDADDS)
-qemuxmlnstest_SOURCES = \
- qemuxmlnstest.c testutilsqemu.c testutilsqemu.h \
- testutils.c testutils.h
-qemuxmlnstest_LDADD = $(qemu_LDADDS) $(LDADDS)
-
qemuargv2xmltest_SOURCES = \
qemuargv2xmltest.c testutilsqemu.c testutilsqemu.h \
testutils.c testutils.h
@@ -642,7 +636,7 @@ domainsnapshotxml2xmltest_SOURCES = \
domainsnapshotxml2xmltest_LDADD = $(qemu_LDADDS) $(LDADDS)
else ! WITH_QEMU
EXTRA_DIST += qemuxml2argvtest.c qemuxml2xmltest.c qemuargv2xmltest.c \
- qemuxmlnstest.c qemuhelptest.c domainsnapshotxml2xmltest.c \
+ qemuhelptest.c domainsnapshotxml2xmltest.c \
qemumonitortest.c testutilsqemu.c testutilsqemu.h \
qemumonitorjsontest.c qemuhotplugtest.c \
qemuagenttest.c qemucapabilitiestest.c \
diff --git a/tests/qemuxmlnsdata/qemuxmlns-qemu-ns-commandline-ns0.args b/tests/qemuxml2argvdata/qemuxml2argv-qemu-ns-commandline-ns0.args
similarity index 84%
rename from tests/qemuxmlnsdata/qemuxmlns-qemu-ns-commandline-ns0.args
rename to tests/qemuxml2argvdata/qemuxml2argv-qemu-ns-commandline-ns0.args
index c25a069..ba786b9 100644
--- a/tests/qemuxmlnsdata/qemuxmlns-qemu-ns-commandline-ns0.args
+++ b/tests/qemuxml2argvdata/qemuxml2argv-qemu-ns-commandline-ns0.args
@@ -12,7 +12,7 @@ QEMU_AUDIO_DRV=none \
-smp 1 \
-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
-nographic \
--monitor unix:/tmp/domain-QEMUGuest1/monitor.sock,server,nowait \
+-monitor unix:/tmp/test-monitor,server,nowait \
-no-acpi \
-boot c \
-usb \
diff --git a/tests/qemuxmlnsdata/qemuxmlns-qemu-ns-commandline-ns0.xml b/tests/qemuxml2argvdata/qemuxml2argv-qemu-ns-commandline-ns0.xml
similarity index 100%
rename from tests/qemuxmlnsdata/qemuxmlns-qemu-ns-commandline-ns0.xml
rename to tests/qemuxml2argvdata/qemuxml2argv-qemu-ns-commandline-ns0.xml
diff --git a/tests/qemuxmlnsdata/qemuxmlns-qemu-ns-commandline.args b/tests/qemuxml2argvdata/qemuxml2argv-qemu-ns-commandline-ns1.args
similarity index 84%
rename from tests/qemuxmlnsdata/qemuxmlns-qemu-ns-commandline.args
rename to tests/qemuxml2argvdata/qemuxml2argv-qemu-ns-commandline-ns1.args
index c25a069..ba786b9 100644
--- a/tests/qemuxmlnsdata/qemuxmlns-qemu-ns-commandline.args
+++ b/tests/qemuxml2argvdata/qemuxml2argv-qemu-ns-commandline-ns1.args
@@ -12,7 +12,7 @@ QEMU_AUDIO_DRV=none \
-smp 1 \
-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
-nographic \
--monitor unix:/tmp/domain-QEMUGuest1/monitor.sock,server,nowait \
+-monitor unix:/tmp/test-monitor,server,nowait \
-no-acpi \
-boot c \
-usb \
diff --git a/tests/qemuxmlnsdata/qemuxmlns-qemu-ns-commandline-ns1.xml b/tests/qemuxml2argvdata/qemuxml2argv-qemu-ns-commandline-ns1.xml
similarity index 100%
rename from tests/qemuxmlnsdata/qemuxmlns-qemu-ns-commandline-ns1.xml
rename to tests/qemuxml2argvdata/qemuxml2argv-qemu-ns-commandline-ns1.xml
diff --git a/tests/qemuxmlnsdata/qemuxmlns-qemu-ns-commandline-ns1.args b/tests/qemuxml2argvdata/qemuxml2argv-qemu-ns-commandline.args
similarity index 84%
rename from tests/qemuxmlnsdata/qemuxmlns-qemu-ns-commandline-ns1.args
rename to tests/qemuxml2argvdata/qemuxml2argv-qemu-ns-commandline.args
index c25a069..ba786b9 100644
--- a/tests/qemuxmlnsdata/qemuxmlns-qemu-ns-commandline-ns1.args
+++ b/tests/qemuxml2argvdata/qemuxml2argv-qemu-ns-commandline.args
@@ -12,7 +12,7 @@ QEMU_AUDIO_DRV=none \
-smp 1 \
-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
-nographic \
--monitor unix:/tmp/domain-QEMUGuest1/monitor.sock,server,nowait \
+-monitor unix:/tmp/test-monitor,server,nowait \
-no-acpi \
-boot c \
-usb \
diff --git a/tests/qemuxmlnsdata/qemuxmlns-qemu-ns-commandline.xml b/tests/qemuxml2argvdata/qemuxml2argv-qemu-ns-commandline.xml
similarity index 100%
rename from tests/qemuxmlnsdata/qemuxmlns-qemu-ns-commandline.xml
rename to tests/qemuxml2argvdata/qemuxml2argv-qemu-ns-commandline.xml
diff --git a/tests/qemuxmlnsdata/qemuxmlns-qemu-ns-domain-commandline-ns0.args b/tests/qemuxml2argvdata/qemuxml2argv-qemu-ns-domain-commandline-ns0.args
similarity index 84%
rename from tests/qemuxmlnsdata/qemuxmlns-qemu-ns-domain-commandline-ns0.args
rename to tests/qemuxml2argvdata/qemuxml2argv-qemu-ns-domain-commandline-ns0.args
index c25a069..ba786b9 100644
--- a/tests/qemuxmlnsdata/qemuxmlns-qemu-ns-domain-commandline-ns0.args
+++ b/tests/qemuxml2argvdata/qemuxml2argv-qemu-ns-domain-commandline-ns0.args
@@ -12,7 +12,7 @@ QEMU_AUDIO_DRV=none \
-smp 1 \
-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
-nographic \
--monitor unix:/tmp/domain-QEMUGuest1/monitor.sock,server,nowait \
+-monitor unix:/tmp/test-monitor,server,nowait \
-no-acpi \
-boot c \
-usb \
diff --git a/tests/qemuxmlnsdata/qemuxmlns-qemu-ns-domain-commandline-ns0.xml b/tests/qemuxml2argvdata/qemuxml2argv-qemu-ns-domain-commandline-ns0.xml
similarity index 100%
rename from tests/qemuxmlnsdata/qemuxmlns-qemu-ns-domain-commandline-ns0.xml
rename to tests/qemuxml2argvdata/qemuxml2argv-qemu-ns-domain-commandline-ns0.xml
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-qemu-ns-domain-commandline.args b/tests/qemuxml2argvdata/qemuxml2argv-qemu-ns-domain-commandline.args
new file mode 100644
index 0000000..ba786b9
--- /dev/null
+++ b/tests/qemuxml2argvdata/qemuxml2argv-qemu-ns-domain-commandline.args
@@ -0,0 +1,22 @@
+LC_ALL=C \
+PATH=/bin \
+HOME=/home/test \
+USER=test \
+LOGNAME=test \
+QEMU_AUDIO_DRV=none \
+/usr/bin/qemu \
+-name QEMUGuest1 \
+-S \
+-M pc \
+-m 214 \
+-smp 1 \
+-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
+-nographic \
+-monitor unix:/tmp/test-monitor,server,nowait \
+-no-acpi \
+-boot c \
+-usb \
+-drive file=/dev/HostVG/QEMUGuest1,if=ide,bus=0,unit=0,format=raw \
+-net none \
+-serial none \
+-parallel none ARGUMENT
diff --git a/tests/qemuxmlnsdata/qemuxmlns-qemu-ns-domain-commandline.xml b/tests/qemuxml2argvdata/qemuxml2argv-qemu-ns-domain-commandline.xml
similarity index 100%
rename from tests/qemuxmlnsdata/qemuxmlns-qemu-ns-domain-commandline.xml
rename to tests/qemuxml2argvdata/qemuxml2argv-qemu-ns-domain-commandline.xml
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-qemu-ns-domain-ns0.args b/tests/qemuxml2argvdata/qemuxml2argv-qemu-ns-domain-ns0.args
new file mode 100644
index 0000000..ba786b9
--- /dev/null
+++ b/tests/qemuxml2argvdata/qemuxml2argv-qemu-ns-domain-ns0.args
@@ -0,0 +1,22 @@
+LC_ALL=C \
+PATH=/bin \
+HOME=/home/test \
+USER=test \
+LOGNAME=test \
+QEMU_AUDIO_DRV=none \
+/usr/bin/qemu \
+-name QEMUGuest1 \
+-S \
+-M pc \
+-m 214 \
+-smp 1 \
+-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
+-nographic \
+-monitor unix:/tmp/test-monitor,server,nowait \
+-no-acpi \
+-boot c \
+-usb \
+-drive file=/dev/HostVG/QEMUGuest1,if=ide,bus=0,unit=0,format=raw \
+-net none \
+-serial none \
+-parallel none ARGUMENT
diff --git a/tests/qemuxmlnsdata/qemuxmlns-qemu-ns-domain-ns0.xml b/tests/qemuxml2argvdata/qemuxml2argv-qemu-ns-domain-ns0.xml
similarity index 100%
rename from tests/qemuxmlnsdata/qemuxmlns-qemu-ns-domain-ns0.xml
rename to tests/qemuxml2argvdata/qemuxml2argv-qemu-ns-domain-ns0.xml
diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c
index 256027e..1c52828 100644
--- a/tests/qemuxml2argvtest.c
+++ b/tests/qemuxml2argvtest.c
@@ -1733,6 +1733,13 @@ mymain(void)
QEMU_CAPS_MACHINE_OPT, QEMU_CAPS_VIRTIO_SCSI,
QEMU_CAPS_DEVICE, QEMU_CAPS_VIRTIO_CCW, QEMU_CAPS_VIRTIO_S390);
+ DO_TEST("qemu-ns-domain-ns0", NONE);
+ DO_TEST("qemu-ns-domain-commandline", NONE);
+ DO_TEST("qemu-ns-domain-commandline-ns0", NONE);
+ DO_TEST("qemu-ns-commandline", NONE);
+ DO_TEST("qemu-ns-commandline-ns0", NONE);
+ DO_TEST("qemu-ns-commandline-ns1", NONE);
+
qemuTestDriverFree(&driver);
return ret == 0 ? EXIT_SUCCESS : EXIT_FAILURE;
diff --git a/tests/qemuxmlnsdata/qemuxmlns-qemu-ns-domain-commandline.args b/tests/qemuxmlnsdata/qemuxmlns-qemu-ns-domain-commandline.args
deleted file mode 100644
index c25a069..0000000
--- a/tests/qemuxmlnsdata/qemuxmlns-qemu-ns-domain-commandline.args
+++ /dev/null
@@ -1,22 +0,0 @@
-LC_ALL=C \
-PATH=/bin \
-HOME=/home/test \
-USER=test \
-LOGNAME=test \
-QEMU_AUDIO_DRV=none \
-/usr/bin/qemu \
--name QEMUGuest1 \
--S \
--M pc \
--m 214 \
--smp 1 \
--uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
--nographic \
--monitor unix:/tmp/domain-QEMUGuest1/monitor.sock,server,nowait \
--no-acpi \
--boot c \
--usb \
--drive file=/dev/HostVG/QEMUGuest1,if=ide,bus=0,unit=0,format=raw \
--net none \
--serial none \
--parallel none ARGUMENT
diff --git a/tests/qemuxmlnsdata/qemuxmlns-qemu-ns-domain-ns0.args b/tests/qemuxmlnsdata/qemuxmlns-qemu-ns-domain-ns0.args
deleted file mode 100644
index c25a069..0000000
--- a/tests/qemuxmlnsdata/qemuxmlns-qemu-ns-domain-ns0.args
+++ /dev/null
@@ -1,22 +0,0 @@
-LC_ALL=C \
-PATH=/bin \
-HOME=/home/test \
-USER=test \
-LOGNAME=test \
-QEMU_AUDIO_DRV=none \
-/usr/bin/qemu \
--name QEMUGuest1 \
--S \
--M pc \
--m 214 \
--smp 1 \
--uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
--nographic \
--monitor unix:/tmp/domain-QEMUGuest1/monitor.sock,server,nowait \
--no-acpi \
--boot c \
--usb \
--drive file=/dev/HostVG/QEMUGuest1,if=ide,bus=0,unit=0,format=raw \
--net none \
--serial none \
--parallel none ARGUMENT
diff --git a/tests/qemuxmlnsdata/qemuxmlns-qemu-ns-domain.args b/tests/qemuxmlnsdata/qemuxmlns-qemu-ns-domain.args
deleted file mode 100644
index fc42040..0000000
--- a/tests/qemuxmlnsdata/qemuxmlns-qemu-ns-domain.args
+++ /dev/null
@@ -1,22 +0,0 @@
-LC_ALL=C \
-PATH=/bin \
-HOME=/home/test \
-USER=test \
-LOGNAME=test \
-QEMU_AUDIO_DRV=none \
-/usr/bin/qemu \
--name QEMUGuest1 \
--S \
--M pc \
--m 214 \
--smp 1 \
--uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
--nographic \
--monitor unix:/tmp/domain-QEMUGuest1/monitor.sock,server,nowait \
--no-acpi \
--boot c \
--usb \
--drive file=/dev/HostVG/QEMUGuest1,if=ide,bus=0,unit=0,format=raw \
--net none \
--serial none \
--parallel none
diff --git a/tests/qemuxmlnsdata/qemuxmlns-qemu-ns-domain.xml b/tests/qemuxmlnsdata/qemuxmlns-qemu-ns-domain.xml
deleted file mode 100644
index 5d697fc..0000000
--- a/tests/qemuxmlnsdata/qemuxmlns-qemu-ns-domain.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-<domain type='qemu' xmlns:qemu='urn:dummy'>
- <name>QEMUGuest1</name>
- <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
- <memory unit='KiB'>219136</memory>
- <currentMemory unit='KiB'>219136</currentMemory>
- <vcpu>1</vcpu>
- <os>
- <type arch='i686' machine='pc'>hvm</type>
- <boot dev='hd'/>
- </os>
- <clock offset='utc'/>
- <on_poweroff>destroy</on_poweroff>
- <on_reboot>restart</on_reboot>
- <on_crash>destroy</on_crash>
- <devices>
- <emulator>/usr/bin/qemu</emulator>
- <disk type='block' device='disk'>
- <source dev='/dev/HostVG/QEMUGuest1'/>
- <target dev='hda' bus='ide'/>
- <address type='drive' controller='0' bus='0' unit='0'/>
- </disk>
- <controller type='ide' index='0'/>
- </devices>
- <qemu:commandline>
- <qemu:arg value='ARGUMENT'/>
- </qemu:commandline>
-</domain>
diff --git a/tests/qemuxmlnstest.c b/tests/qemuxmlnstest.c
deleted file mode 100644
index 4d83f7a..0000000
--- a/tests/qemuxmlnstest.c
+++ /dev/null
@@ -1,269 +0,0 @@
-#include <config.h>
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <string.h>
-
-#include <sys/types.h>
-#include <fcntl.h>
-
-#include "testutils.h"
-
-#ifdef WITH_QEMU
-
-# include "internal.h"
-# include "qemu/qemu_capabilities.h"
-# include "qemu/qemu_command.h"
-# include "qemu/qemu_domain.h"
-# include "qemu/qemu_process.h"
-# include "datatypes.h"
-# include "cpu/cpu_map.h"
-# include "testutilsqemu.h"
-# include "virstring.h"
-
-# define VIR_FROM_THIS VIR_FROM_QEMU
-
-static const char *abs_top_srcdir;
-static virQEMUDriver driver;
-
-static int testCompareXMLToArgvFiles(const char *xml,
- const char *cmdline,
- virQEMUCapsPtr extraFlags,
- const char *migrateFrom,
- int migrateFd,
- bool json,
- bool expectError)
-{
- char *actualargv = NULL;
- int ret = -1;
- virDomainDefPtr vmdef = NULL;
- virDomainChrSourceDefPtr monitor_chr = NULL;
- virConnectPtr conn;
- char *log = NULL;
- char *emulator = NULL;
- virCommandPtr cmd = NULL;
-
- if (!(conn = virGetConnect()))
- goto fail;
-
- if (!(vmdef = virDomainDefParseFile(xml, driver.caps, driver.xmlopt,
- VIR_DOMAIN_DEF_PARSE_INACTIVE)))
- goto fail;
-
- if (!virDomainDefCheckABIStability(vmdef, vmdef)) {
- VIR_TEST_DEBUG("ABI stability check failed on %s", xml);
- goto fail;
- }
-
- /*
- * For test purposes, we may want to fake emulator's output by providing
- * our own script instead of a real emulator. For this to work we need to
- * specify a relative path in <emulator/> element, which, however, is not
- * allowed by RelaxNG schema for domain XML. To work around it we add an
- * extra '/' at the beginning of relative emulator path so that it looks
- * like, e.g., "/./qemu.sh" or "/../emulator/qemu.sh" instead of
- * "./qemu.sh" or "../emulator/qemu.sh" respectively. The following code
- * detects such paths, strips the extra '/' and makes the path absolute.
- */
- if (vmdef->emulator && STRPREFIX(vmdef->emulator, "/.")) {
- if (VIR_STRDUP(emulator, vmdef->emulator + 1) < 0)
- goto fail;
- VIR_FREE(vmdef->emulator);
- vmdef->emulator = NULL;
- if (virAsprintf(&vmdef->emulator, "%s/qemuxml2argvdata/%s",
- abs_srcdir, emulator) < 0)
- goto fail;
- }
-
- vmdef->id = -1;
-
- if (VIR_ALLOC(monitor_chr) < 0)
- goto fail;
- if (qemuProcessPrepareMonitorChr(driver.config,
- monitor_chr,
- vmdef->name) < 0)
- goto fail;
-
- virQEMUCapsSetList(extraFlags,
- QEMU_CAPS_NO_ACPI,
- QEMU_CAPS_LAST);
-
- if (virQEMUCapsGet(extraFlags, QEMU_CAPS_DEVICE))
- qemuDomainAssignAddresses(vmdef, extraFlags, NULL);
-
- log = virtTestLogContentAndReset();
- VIR_FREE(log);
- virResetLastError();
-
- if (vmdef->os.arch == VIR_ARCH_X86_64 ||
- vmdef->os.arch == VIR_ARCH_I686) {
- virQEMUCapsSet(extraFlags, QEMU_CAPS_PCI_MULTIBUS);
- }
-
- if (qemuAssignDeviceAliases(vmdef, extraFlags) < 0)
- goto fail;
-
- if (!(cmd = qemuBuildCommandLine(conn, &driver,
- vmdef, monitor_chr, json, extraFlags,
- migrateFrom, migrateFd, NULL,
- VIR_NETDEV_VPORT_PROFILE_OP_NO_OP,
- &testCallbacks, false, false, NULL,
- NULL, NULL)))
- goto fail;
-
- if (!virtTestOOMActive()) {
- if (!!virGetLastError() != expectError) {
- if ((log = virtTestLogContentAndReset()))
- VIR_TEST_DEBUG("\n%s", log);
- goto fail;
- }
-
- if (expectError) {
- /* need to suppress the errors */
- virResetLastError();
- }
- }
-
- if (!(actualargv = virCommandToString(cmd)))
- goto fail;
-
- if (emulator) {
- /* Skip the abs_srcdir portion of replacement emulator. */
- char *start_skip = strstr(actualargv, abs_srcdir);
- char *end_skip = strstr(actualargv, emulator);
- if (!start_skip || !end_skip)
- goto fail;
- memmove(start_skip, end_skip, strlen(end_skip) + 1);
- }
-
- if (virtTestCompareToFile(actualargv, cmdline) < 0)
- goto fail;
-
- ret = 0;
-
- fail:
- virDomainChrSourceDefFree(monitor_chr);
- VIR_FREE(log);
- VIR_FREE(emulator);
- VIR_FREE(actualargv);
- virCommandFree(cmd);
- virDomainDefFree(vmdef);
- virObjectUnref(conn);
- return ret;
-}
-
-
-struct testInfo {
- const char *name;
- virQEMUCapsPtr extraFlags;
- const char *migrateFrom;
- int migrateFd;
- bool json;
- bool expectError;
-};
-
-static int
-testCompareXMLToArgvHelper(const void *data)
-{
- int result = -1;
- const struct testInfo *info = data;
- char *xml = NULL;
- char *args = NULL;
-
- if (virAsprintf(&xml, "%s/qemuxmlnsdata/qemuxmlns-%s.xml",
- abs_srcdir, info->name) < 0 ||
- virAsprintf(&args, "%s/qemuxmlnsdata/qemuxmlns-%s.args",
- abs_srcdir, info->name) < 0)
- goto cleanup;
-
- qemuTestCapsName = info->name;
- result = qemuTestCapsCacheInsert(driver.qemuCapsCache, info->name,
- info->extraFlags);
- if (result < 0)
- goto cleanup;
-
- result = testCompareXMLToArgvFiles(xml, args, info->extraFlags,
- info->migrateFrom, info->migrateFd,
- info->json, info->expectError);
-
- cleanup:
- VIR_FREE(xml);
- VIR_FREE(args);
- return result;
-}
-
-
-
-static int
-mymain(void)
-{
- int ret = 0;
- bool json = false;
-
- abs_top_srcdir = getenv("abs_top_srcdir");
- if (!abs_top_srcdir)
- abs_top_srcdir = abs_srcdir "/..";
-
- if (qemuTestDriverInit(&driver) < 0)
- return EXIT_FAILURE;
-
- VIR_FREE(driver.config->libDir);
- if (VIR_STRDUP_QUIET(driver.config->libDir, "/tmp") < 0)
- return EXIT_FAILURE;
-
-# define DO_TEST_FULL(name, migrateFrom, migrateFd, expectError, ...) \
- do { \
- struct testInfo info = { \
- name, NULL, migrateFrom, migrateFd, json, expectError \
- }; \
- if (!(info.extraFlags = virQEMUCapsNew())) \
- return EXIT_FAILURE; \
- virQEMUCapsSetList(info.extraFlags, __VA_ARGS__, QEMU_CAPS_LAST);\
- if (virtTestRun("QEMU XML-2-ARGV " name, \
- testCompareXMLToArgvHelper, &info) < 0) \
- ret = -1; \
- virObjectUnref(info.extraFlags); \
- } while (0)
-
-# define DO_TEST(name, expectError, ...) \
- DO_TEST_FULL(name, NULL, -1, expectError, __VA_ARGS__)
-
-# define NONE QEMU_CAPS_LAST
-
- /* Unset or set all envvars here that are copied in qemudBuildCommandLine
- * using ADD_ENV_COPY, otherwise these tests may fail due to unexpected
- * values for these envvars */
- setenv("PATH", "/bin", 1);
- setenv("USER", "test", 1);
- setenv("LOGNAME", "test", 1);
- setenv("HOME", "/home/test", 1);
- unsetenv("TMPDIR");
- unsetenv("LD_PRELOAD");
- unsetenv("LD_LIBRARY_PATH");
- unsetenv("QEMU_AUDIO_DRV");
- unsetenv("SDL_AUDIODRIVER");
-
- DO_TEST("qemu-ns-domain", false, NONE);
- DO_TEST("qemu-ns-domain-ns0", false, NONE);
- DO_TEST("qemu-ns-domain-commandline", false, NONE);
- DO_TEST("qemu-ns-domain-commandline-ns0", false, NONE);
- DO_TEST("qemu-ns-commandline", false, NONE);
- DO_TEST("qemu-ns-commandline-ns0", false, NONE);
- DO_TEST("qemu-ns-commandline-ns1", false, NONE);
-
- qemuTestDriverFree(&driver);
-
- return ret == 0 ? EXIT_SUCCESS : EXIT_FAILURE;
-}
-
-VIRT_TEST_MAIN(mymain)
-
-#else
-
-int main(void)
-{
- return EXIT_AM_SKIP;
-}
-
-#endif /* WITH_QEMU */
--
2.6.3
9 years, 1 month
[libvirt] [PATCH] security: Cleanup DAC driver
by Jiri Denemark
Fixes several style issues and removes "DEF" (what is it supposed to
mean anyway?) from debug messages.
Signed-off-by: Jiri Denemark <jdenemar(a)redhat.com>
---
src/security/security_dac.c | 22 ++++++++++------------
1 file changed, 10 insertions(+), 12 deletions(-)
diff --git a/src/security/security_dac.c b/src/security/security_dac.c
index 7200a1a..dfdeffd 100644
--- a/src/security/security_dac.c
+++ b/src/security/security_dac.c
@@ -856,14 +856,13 @@ virSecurityDACSetChardevLabel(virSecurityManagerPtr mgr,
break;
case VIR_DOMAIN_CHR_TYPE_PIPE:
- if ((virAsprintf(&in, "%s.in", dev_source->data.file.path) < 0) ||
- (virAsprintf(&out, "%s.out", dev_source->data.file.path) < 0))
+ if (virAsprintf(&in, "%s.in", dev_source->data.file.path) < 0 ||
+ virAsprintf(&out, "%s.out", dev_source->data.file.path) < 0)
goto done;
if (virFileExists(in) && virFileExists(out)) {
- if ((virSecurityDACSetOwnership(priv, NULL, in, user, group) < 0) ||
- (virSecurityDACSetOwnership(priv, NULL, out, user, group) < 0)) {
+ if (virSecurityDACSetOwnership(priv, NULL, in, user, group) < 0 ||
+ virSecurityDACSetOwnership(priv, NULL, out, user, group) < 0)
goto done;
- }
} else if (virSecurityDACSetOwnership(priv, NULL,
dev_source->data.file.path,
user, group) < 0) {
@@ -927,14 +926,13 @@ virSecurityDACRestoreChardevLabel(virSecurityManagerPtr mgr,
break;
case VIR_DOMAIN_CHR_TYPE_PIPE:
- if ((virAsprintf(&out, "%s.out", dev_source->data.file.path) < 0) ||
- (virAsprintf(&in, "%s.in", dev_source->data.file.path) < 0))
+ if (virAsprintf(&out, "%s.out", dev_source->data.file.path) < 0 ||
+ virAsprintf(&in, "%s.in", dev_source->data.file.path) < 0)
goto done;
if (virFileExists(in) && virFileExists(out)) {
- if ((virSecurityDACRestoreSecurityFileLabel(priv, out) < 0) ||
- (virSecurityDACRestoreSecurityFileLabel(priv, in) < 0)) {
+ if (virSecurityDACRestoreSecurityFileLabel(priv, out) < 0 ||
+ virSecurityDACRestoreSecurityFileLabel(priv, in) < 0)
goto done;
- }
} else if (virSecurityDACRestoreSecurityFileLabel(priv, dev_source->data.file.path) < 0) {
goto done;
}
@@ -1213,7 +1211,7 @@ virSecurityDACSetProcessLabel(virSecurityManagerPtr mgr,
if (virSecurityDACGetIds(secdef, priv, &user, &group, &groups, &ngroups) < 0)
return -1;
- VIR_DEBUG("Dropping privileges of DEF to %u:%u, %d supplemental groups",
+ VIR_DEBUG("Dropping privileges to %u:%u, %d supplemental groups",
(unsigned int) user, (unsigned int) group, ngroups);
if (virSetUIDGID(user, group, groups, ngroups) < 0)
@@ -1238,7 +1236,7 @@ virSecurityDACSetChildProcessLabel(virSecurityManagerPtr mgr,
if (virSecurityDACGetIds(secdef, priv, &user, &group, NULL, NULL))
return -1;
- VIR_DEBUG("Setting child to drop privileges of DEF to %u:%u",
+ VIR_DEBUG("Setting child to drop privileges to %u:%u",
(unsigned int) user, (unsigned int) group);
virCommandSetUID(cmd, user);
--
2.6.3
9 years, 1 month