- 25 3月, 2016 4 次提交
-
-
由 Jovanka Gulicoska 提交于
qemuStateInitialize uses a mix of VIR_ERROR and standard vir*Error calls. Prefer the standard vir*Error
-
由 Jovanka Gulicoska 提交于
These uses of virGetLastError message are just duplicating virGetLastErrorMessage.
-
由 Michal Privoznik 提交于
Coverity pointed out that getenv("PATH") may return NULL. Well, we check for that in virFindFileInPath() too. If this happens, we will pass NULL into strstr(). Ouch. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Michal Privoznik 提交于
The variable is dereferenced prior its check for NULL. The check itself does not make much sense anyway - it's our test, we know we are not passing NULL. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 24 3月, 2016 9 次提交
-
-
由 Erik Skultety 提交于
Patch 0b231195 refactored logging output parser to make it more readable. This patch does similar thing to logging filter parser.
-
由 Erik Skultety 提交于
-
由 Erik Skultety 提交于
The test can return positive value even though it should have failed. It just returns the value parser returned, which should be flipped back to -1 if something went wrong or the result was unexpected, but it isn't.
-
由 Pavel Hrdina 提交于
If caller of adminConnectListServers() pass NULL instead of servers we need to free the list we've received from virNetDaemonGetServers(). Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
-
由 Michal Privoznik 提交于
The adminDispatchConnectListServers() function is generated by our great perl script. However, it has a tiny flaw: if adminConnectListServers() it calls fails, the control jumps onto cleanup label where we try to free any list of servers built so far. However, in the loop @i is unsigned (size_t) while @nresults is signed (int). Currently, it does no harm because of the check for @result being non-NULL. But if that ever changes in the future, this bug will be hard to chase. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Michal Privoznik 提交于
In an unlikely event of virConnectRegisterCloseCallback failing, the error is ignored. This is an example file and we shouldn't get a bad example. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Michal Privoznik 提交于
Like in the rest of our code we tend to prefer 'goto' and 'cleanup' over 'if else' code structure. Do the same here. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Michal Privoznik 提交于
After 9c17d665 the tap device for ethernet network type is automatically precreated before spawning qemu. Problem is, the qemuxml2argvtest wasn't updated and thus is failing. Because of all the APIs that new code is calling, I had to mock a lot. Also, since the tap FDs are labeled separately from the rest of the devices/files I had to enable NOP security driver for the test too. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Cole Robinson 提交于
We were printing the wrong MAX value
-
- 23 3月, 2016 8 次提交
-
-
由 Michal Privoznik 提交于
When constructing SCSI hostdev command line for qemu, the /sys/bus/scsi/devices/... dir is scanned. Unfortunately, even in the tests. This is needed to determine the name of SCSI device to passthrough to qemu, because in the domain XML we were given its address instead. Anyway, we should not be touching live system data in our test suite as it produced unpredictable results. The test is regressing from 1e9a0837 on. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Vasiliy Tolstov 提交于
If a user specify network type ethernet, then create it via libvirt and run script if it provided. After this commit user does not need to run external script to create tap device or add root permissions to qemu process. Signed-off-by: NVasiliy Tolstov <v.tolstov@selfip.ru>
-
由 Andrea Bolognani 提交于
Ensure the code behaves properly even for situations that were not being considered before, such as simply detaching devices from the host without attaching them to a guest and attaching devices as managed even though they had already been manually detached from the host.
-
由 Andrea Bolognani 提交于
Instead of forcing the values for the unbind_from_stub, remove_slot and reprobe properties, look up the actual device and use that when calling virPCIDeviceReattach(). This ensures the device is restored to its original state after reattach: for example, if it was not bound to any driver before detach, it will not be bound forcefully during reattach.
-
由 Andrea Bolognani 提交于
We would be just fine looking up the information in pcidevs most of the time; however, some corner cases would not be handled properly, so look up the actual device instead.
-
由 Andrea Bolognani 提交于
After this patch, ownership of virPCIDevice instances is very easy to keep track of: for each host PCI device, the only instance that actually matters is the one inside one of the bookkeeping list. Whenever some operation needs to be performed on a PCI device, the actual device is looked up first; when this is not the case, a comment explains the reason.
-
由 Andrea Bolognani 提交于
Unmanaged devices, as the name suggests, are not detached automatically from the host by libvirt before being attached to a guest: it's the user's responsability to detach them manually beforehand. If that preliminary step has not been performed, the attach operation can't complete successfully. Instead of relying on the lower layers to error out with cryptic messages such as error: Failed to attach device from /tmp/hostdev.xml error: Path '/dev/vfio/12' is not accessible: No such file or directory prevent the situation altogether and provide the user with a more useful error message.
-
由 Andrea Bolognani 提交于
Unmanaged devices are attached to guests in two steps: first, the device is detached from the host and marked as inactive; subsequently, it is marked as active and attached to the guest. If the daemon is restarted between these two operations, we lose track of the inactive device. Steps 5 and 6 of virHostdevPreparePCIDevices() already subtly take care of this situation, but some planned changes will make it so that's no longer the case. Plus, explicit is always better than implicit.
-
- 22 3月, 2016 17 次提交
-
-
由 Pavel Hrdina 提交于
Use qemuProcessCreatePretendCmd instead duplicating required steps from qemuProcessStart. Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
-
由 Pavel Hrdina 提交于
Update testutilsqemu to overwrite libDir and channelTargetDir and set private paths using domain's privateData. This changes is required for following patch. Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
-
由 Pavel Hrdina 提交于
Use qemuProcessCreatePretendCmd instead duplicating required steps from qemuProcessStart. Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
-
由 Pavel Hrdina 提交于
This will skip few steps from qemuProcessStart in order to create only qemu CMD. Use a VIR_QEMU_PROCESS_START_PRETEND for all the qemuProcess* functions called by this one to not modify or check host. This new function will be used later on for XMLToNative API and also for qemuxml2argvtest to make sure that both API and test uses the same code as qemuProcessStart. We need also update qemuProcessInit to wrap few lines of code with check that VIR_QEMU_PROCESS_START_PRETEND that makes sense only for qemuProcessStart. Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
-
由 Pavel Hrdina 提交于
Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
-
由 Pavel Hrdina 提交于
Move all code that checks host and domain. Do not check host if we use VIR_QEMU_PROCESS_START_PRETEND flag. Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
-
由 Pavel Hrdina 提交于
This change is required by following patches. Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
-
由 Pavel Hrdina 提交于
Move all code that modifies host system to this function. Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
-
由 Pavel Hrdina 提交于
Move all code that modifies only live XML to this function. The new VIR_QEMU_PROCESS_START_PRETEND flag will be used by qemuXMLToNative and qemuxml2argvtest later in order to reuse the same code as qemuProcessStart uses. Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
-
由 Pavel Hrdina 提交于
This removes the testFailed magic and makes the code more readable. Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
-
由 Pavel Hrdina 提交于
The postParse callback is the correct place to generate default values that should be present in offline XML. Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
-
由 Pavel Hrdina 提交于
Function qemuProcessLaunch returns '-2' in case there was an error and we need to cleanup labels. Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
-
由 Pavel Hrdina 提交于
QEMU changed the error message to: "Tray of device 'drive-sata0-0-1' is not open" and they may change the error massage in the future. This updates the code to not depend on the text from the error message but only on error itself. Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
-
由 Martin Kletzander 提交于
Every aligning requires at least one cast and it's hard to read. Let's make a function that makes sure the pointer is moved according to the alignment and use that to move throughout the data buffer. Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Michal Privoznik 提交于
Problem is that in the test any status file matching tests/nssdata/*.status is loaded as it contains IP addresses that are parsed. However, there's no order specified in which the files are loaded. Therefore on different systems the order may be different. This is then producing an unexpected results. Instead of defining an order in which the files are loaded, make the code that checks for missing IP addresses (or redundant ones) cope with unordered list of addresses. The reasoning behind is that the code doing the parsing is used in real NSS module where we don't care for ordering. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Bjoern Walk 提交于
Let's add a test for SCSI target nodedev devices. Signed-off-by: NBjoern Walk <bwalk@linux.vnet.ibm.com>
-
由 Bjoern Walk 提交于
When reading in an XML definition for a SCSI target device, the name property of struct scsi_target refers to the @target element. Let's fix this obvious typo and also extend the XML schema to provide validation. Signed-off-by: NBjoern Walk <bwalk@linux.vnet.ibm.com>
-
- 21 3月, 2016 2 次提交
-
-
由 Jim Fehlig 提交于
Until now, the libxl driver ignored any <hap> setting in domain XML and deferred to libxl, which enables hap if not specified. While this is a good default, it prevents disabling hap if desired. This change allows disabling hap with <hap state='off'/>. hap is explicitly enabled with <hap/> or <hap state='on/>. Absense of <hap> retains current behavior of deferring default state to libxl.
-
由 Jim Fehlig 提交于
Hardware Assisted Paging is enabled by default in Xen. Change the capabilities output to reflect this. Signed-off-by: NJim Fehlig <jfehlig@suse.com>
-