- 30 3月, 2014 1 次提交
-
-
由 Matthias Bolte 提交于
Windows doesn't allow : in filenames. Commit 6fdece9a added files with a : in their names. This broke git operations on Windows as git is not able to create those files on clone or pull. Replace : with - in the offending filenames and adapt the test case. As the tested Linux specific code expects the files to exist with : in their path use symlinks to provide the name that way.
-
- 27 3月, 2014 2 次提交
-
-
由 Nehal J Wani 提交于
While running qemucaps2xmltest, it was found that valgrind pointed out the following memory leaks: ==27045== 160 (112 direct, 48 indirect) bytes in 1 blocks are definitely lost in loss record 51 of 65 ==27045== at 0x4A0577B: calloc (vg_replace_malloc.c:593) ==27045== by 0x4C6BACD: virAllocVar (viralloc.c:560) ==27045== by 0x4CAF095: virObjectNew (virobject.c:193) ==27045== by 0x421453: virQEMUCapsNew (qemu_capabilities.c:1805) ==27045== by 0x41F04F: testQemuCapsXML (qemucaps2xmltest.c:72) ==27045== by 0x41FFD1: virtTestRun (testutils.c:201) ==27045== by 0x41EE7A: mymain (qemucaps2xmltest.c:203) ==27045== by 0x42074D: virtTestMain (testutils.c:789) ==27045== by 0x3E6CE1ED1C: (below main) (libc-start.c:226) ==27045== ==27045== 160 (112 direct, 48 indirect) bytes in 1 blocks are definitely lost in loss record 52 of 65 ==27045== at 0x4A0577B: calloc (vg_replace_malloc.c:593) ==27045== by 0x4C6BACD: virAllocVar (viralloc.c:560) ==27045== by 0x4CAF095: virObjectNew (virobject.c:193) ==27045== by 0x421453: virQEMUCapsNew (qemu_capabilities.c:1805) ==27045== by 0x41F04F: testQemuCapsXML (qemucaps2xmltest.c:72) ==27045== by 0x41FFD1: virtTestRun (testutils.c:201) ==27045== by 0x41EEA3: mymain (qemucaps2xmltest.c:204) ==27045== by 0x42074D: virtTestMain (testutils.c:789) ==27045== by 0x3E6CE1ED1C: (below main) (libc-start.c:226)
-
由 Roman Bogorodskiy 提交于
At this point unittest covers 4 basic cases: - minimal working XML for bhyve - same as above, but with virtio disk - ACPI and APIC args test - MAC address test
-
- 26 3月, 2014 5 次提交
-
-
由 Laine Stump 提交于
A patch submitted by Steven Malin last week pointed out a problem with libvirt's DNS SRV record configuration: https://www.redhat.com/archives/libvir-list/2014-March/msg00536.html When searching for that message later, I found another series that had been posted by Guannan Ren back in 2012 that somehow slipped between the cracks: https://www.redhat.com/archives/libvir-list/2012-July/msg00236.html That patch was very much out of date, but also pointed out some real problems. This patch fixes all the noted problems by refactoring virNetworkDNSSrvDefParseXML() and networkDnsmasqConfContents(), then verifies those fixes by added several new records to the test case. Problems fixed: * both service and protocol now have an underscore ("_") prepended on the commandline, as required by RFC2782. <srv service='sip' protocol='udp' domain='example.com' target='tests.example.com' port='5060' priority='10' weight='150'/> before: srv-host=sip.udp.example.com,tests.example.com,5060,10,150 after: srv-host=_sip._udp.example.com,tests.example.com,5060,10,150 * if "domain" wasn't specified in the <srv> element, the extra trailing "." will no longer be added to the dnsmasq commandline. <srv service='sip' protocol='udp' target='tests.example.com' port='5060' priority='10' weight='150'/> before: srv-host=sip.udp.,tests.example.com,5060,10,150 after: srv-host=_sip._udp,tests.example.com,5060,10,150 * when optional attributes aren't specified, the separating comma is also now not placed on the dnsmasq commandline. If optional attributes in the middle of the line are not specified, they are replaced with a default value in the commandline (1 for port, 0 for priority and weight). <srv service='sip' protocol='udp' target='tests.example.com' port='5060'/> before: srv-host=sip.udp.,tests.example.com,5060,, after: srv-host=_sip._udp,tests.example.com,5060 (actually the would have generated an error, because "optional" attributes weren't really optional.) * The allowed characters for both service and protocol are now limited to alphanumerics, plus a few special characters that are found in existing names in /etc/services and /etc/protocols. (One exception is that both of these files contain names with an embedded ".", but "." can't be used in these fields of an SRV record because it is used as a field separator and there is no method to escape a "." into a field.) (Previously only the strings "tcp" and "udp" were allowed for protocol, but this restriction has been removed, since RFC2782 specifically says that it isn't limited to those, and that anyway it is case insensitive.) * the "domain" attribute is no longer required in order to recognize the port, priority, and weight attributes during parsing. Only "target" is required for this. * if "target" isn't specified, port, priority, and weight are not allowed (since they are meaningless - an empty target means "this service is *not available* for this domain"). * port, priority, and weight are now truly optional, as the comments originally suggested, but which was not actually true.
-
由 Michal Privoznik 提交于
In all other drivers we are doing so. Moreover, we don't want to parse runtime information in attach (even if the attach is meant as live) because we are generating the runtime info ourselves. We can't trust users they supply sane values anyway. ==1140== 9 bytes in 1 blocks are definitely lost in loss record 72 of 1,151 ==1140== at 0x4A06C2B: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) ==1140== by 0x623C758: xmlStrndup (in /usr/lib64/libxml2.so.2.9.1) ==1140== by 0x50FD763: virXMLPropString (virxml.c:483) ==1140== by 0x510F8B7: virDomainDeviceInfoParseXML (domain_conf.c:3685) ==1140== by 0x511ACFD: virDomainChrDefParseXML (domain_conf.c:7535) ==1140== by 0x5121D13: virDomainDeviceDefParse (domain_conf.c:9918) ==1140== by 0x13AE6313: qemuDomainAttachDeviceFlags (qemu_driver.c:6926) ==1140== by 0x13AE65FA: qemuDomainAttachDevice (qemu_driver.c:7005) ==1140== by 0x51C77DA: virDomainAttachDevice (libvirt.c:10231) ==1140== by 0x127FDD: remoteDispatchDomainAttachDevice (remote_dispatch.h:2404) ==1140== by 0x127EC5: remoteDispatchDomainAttachDeviceHelper (remote_dispatch.h:2382) ==1140== by 0x5241F81: virNetServerProgramDispatchCall (virnetserverprogram.c:437) When doing live attach, we are passing the inactive definition anyway since we are passing the result of virDomainDeviceDefCopy() which does inactive copy by default. Moreover, we are doing the same mistake in qemuhotplugtest. Just a side note - it makes perfect sense to parse the runtime info like alias in qemuDomainDetachDevice and qemuDomainUpdateDeviceFlags() as in some cases the only difference to distinguish two devices can be just their alias. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Francesco Romani 提交于
The test is loosely inspired from qemucapabilitiestest and qemuxml2xmltest. Added a new test instead of extending an existing one because the feature being tested don't really fits nicely in any existing place.
-
由 Ján Tomko 提交于
Currently, <cputune><shares>0</shares></cputune> is treated as if it were not specified. Treat is as a valid value if it was explicitly specified and write it to the cgroups.
-
由 John Ferlan 提交于
Recent changes in the module seemed to have caused Coverity to reanalyze certain parts of the code. Previously the code was modified via commit id '11a11812' to resolve a different error (perhaps DEADCODE). Up through commit id '7b3f1f8c' there were no issues. The new error indicats the 'outbuf' was checked for NULL and then complains because of the dereference. Adding checks for non-NULL prior to the deref resulted in a DEADCODE message. So, resolve using an sa_assert() to keep Coverity quiet especially since it doesn't understand that outbuf will change as a result of a successful virCommandRun() call.
-
- 25 3月, 2014 4 次提交
-
-
由 Ján Tomko 提交于
-
由 Qiao Nuohan 提交于
This patch makes qemu driver support virDomainCoreDumpWithFormat API. Signed-off-by: NQiao Nuohan <qiaonuohan@cn.fujitsu.com>
-
由 Qiao Nuohan 提交于
This patch adds qemuMonitorGetDumpGuestMemoryCapability, which is used to check whether the specified dump-guest-memory format is supported by qemu. Signed-off-by: NQiao Nuohan <qiaonuohan@cn.fujitsu.com>
-
由 Eric Blake 提交于
It's finally time to start tracking disk backing chains in <domain> XML. The first step is to start refactoring code so that we have an object more convenient for representing each host source resource in the context of a single guest <disk>. Ultimately, I plan to move the new type into src/util where it can be reused by virStorageFile, but to make the transition easier to review, this patch just creates the new type then fixes everything until it compiles again. * src/conf/domain_conf.h (_virDomainDiskDef): Split... (_virDomainDiskSourceDef): ...to new struct. (virDomainDiskAuthClear): Use new type. * src/conf/domain_conf.c (virDomainDiskDefFree): Split... (virDomainDiskSourceDefClear): ...to new function. (virDomainDiskGetType, virDomainDiskSetType) (virDomainDiskGetSource, virDomainDiskSetSource) (virDomainDiskGetDriver, virDomainDiskSetDriver) (virDomainDiskGetFormat, virDomainDiskSetFormat) (virDomainDiskAuthClear, virDomainDiskGetActualType) (virDomainDiskDefParseXML, virDomainDiskSourceDefFormat) (virDomainDiskDefFormat, virDomainDiskDefForeachPath) (virDomainDiskDefGetSecurityLabelDef) (virDomainDiskSourceIsBlockType): Adjust all users. * src/lxc/lxc_controller.c (virLXCControllerSetupDisk): Likewise. * src/lxc/lxc_driver.c (lxcDomainAttachDeviceMknodHelper): Likewise. * src/qemu/qemu_command.c (qemuAddRBDHost, qemuParseRBDString) (qemuParseDriveURIString, qemuParseGlusterString) (qemuParseISCSIString, qemuParseNBDString) (qemuDomainDiskGetSourceString, qemuBuildDriveStr) (qemuBuildCommandLine, qemuParseCommandLineDisk) (qemuParseCommandLine): Likewise. * src/qemu/qemu_conf.c (qemuCheckSharedDevice) (qemuAddISCSIPoolSourceHost, qemuTranslateDiskSourcePool): Likewise. * src/qemu/qemu_driver.c (qemuDomainUpdateDeviceConfig) (qemuDomainPrepareDiskChainElement) (qemuDomainSnapshotCreateInactiveExternal) (qemuDomainSnapshotPrepareDiskExternalBackingInactive) (qemuDomainSnapshotPrepareDiskInternal) (qemuDomainSnapshotPrepare) (qemuDomainSnapshotCreateSingleDiskActive) (qemuDomainSnapshotUndoSingleDiskActive) (qemuDomainBlockPivot, qemuDomainBlockJobImpl) (qemuDomainBlockCopy, qemuDomainBlockCommit): Likewise. * src/qemu/qemu_migration.c (qemuMigrationIsSafe): Likewise. * src/qemu/qemu_process.c (qemuProcessGetVolumeQcowPassphrase) (qemuProcessInitPasswords): Likewise. * src/security/security_selinux.c (virSecuritySELinuxSetSecurityFileLabel): Likewise. * src/storage/storage_driver.c (virStorageFileInitFromDiskDef): Likewise. * tests/securityselinuxlabeltest.c (testSELinuxLoadDef): Likewise. Signed-off-by: NEric Blake <eblake@redhat.com>
-
- 21 3月, 2014 7 次提交
-
-
由 Ján Tomko 提交于
tests/viriscsitest.c:27:12: error: 'EXIT_AM_SKIP' undeclared (first use in this function)
-
由 Daniel P. Berrange 提交于
Currently the DBus helper APIs require the values for an array to be passed inline in the variadic argument list. This change introduces support for passing arrays using a pointer to a plain C array of the basic type. This is of particular benefit for decoding messages when you don't know how many array elements are being received. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
The dbus_connection_send_with_reply_and_block method will automatically call dbus_set_error_from_message for us. We mistakenly thought we had todo it because of a flaw in the systemd unit test mock impl. The latter should have directly set the error object, instead of creating an error message object. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Jiri Denemark 提交于
Use $(shell cd $(...) && pwd) to set abs_*dir variables similarly to what src/Makefile.am does. Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Ján Tomko 提交于
-
由 Ján Tomko 提交于
Parse iscsiadm output with and without the recently introduced flashnode info. [1] This should check that commits like 57e17a74 (fixing [2]) do not break iscsiadm output parsing. [1] https://github.com/mikechristie/open-iscsi/commit/181af9a [2] https://bugzilla.redhat.com/show_bug.cgi?id=1067173
-
由 Martin Kletzander 提交于
Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
- 20 3月, 2014 1 次提交
-
-
由 Daniel P. Berrange 提交于
The virSocketAddrMask method did not initialize all fields in the sockaddr_in6 struct. In paticular the 'sin6_scope_id' field could contain random garbage, which would in turn affect the result of any later virSocketAddrFormat calls. This led to ip6tables rules in the FORWARD chain which matched on random garbage sin6_scope_id. Fortunately these were ACCEPT rules, so the impact was merely that desired traffic was blocked, rather than undesired traffic allowed. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 19 3月, 2014 3 次提交
-
-
由 Nehal J Wani 提交于
While running qemuhotplugtest, it was found that valgrind pointed out the following memory leak: ==7906== 5 bytes in 1 blocks are definitely lost in loss record 7 of 121 ==7906== at 0x4A069EE: malloc (vg_replace_malloc.c:270) ==7906== by 0x3E782A754D: xmlStrndup (in /usr/lib64/libxml2.so.2.7.6) ==7906== by 0x4CDAE03: virDomainDeviceInfoParseXML.isra.32 (domain_conf.c:3685) ==7906== by 0x4CE3BB9: virDomainNetDefParseXML (domain_conf.c:6707) ==7906== by 0x4CFBA08: virDomainDefParseXML (domain_conf.c:12235) ==7906== by 0x4CFBC1E: virDomainDefParseNode (domain_conf.c:13039) ==7906== by 0x4CFBD95: virDomainDefParse (domain_conf.c:12981) ==7906== by 0x41FEB4: testQemuHotplug (qemuhotplugtest.c:66) ==7906== by 0x420F41: virtTestRun (testutils.c:201) ==7906== by 0x41F287: mymain (qemuhotplugtest.c:422) ==7906== by 0x4216BD: virtTestMain (testutils.c:784) ==7906== by 0x3E6CE1ED1C: (below main) (libc-start.c:226) ...and 10 more. Problem is, since 20745748 we do both, parse <alias/> elements from XML files and call qemuAssignDeviceAliases(). While generating runtime info for domain at runtime is just fine in the test, we can parse just inactive XML and remove all <alias/>-es from the XML files. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Martin Kletzander 提交于
I forgot to delete the underscore in object_locking_SOURCES when changing the name in one of previous cleanups. Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Daniel P. Berrange 提交于
To allow for fault injection of the virCommand dry run, add the ability to register a callback. The callback will be passed the argv, env and stdin buffer and is expected to return the exit status and optionally fill stdout and stderr buffers. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 18 3月, 2014 7 次提交
-
-
由 Daniel P. Berrange 提交于
A earlier commit changed the global log buffer so that it only records messages that are explicitly requested via the log filters setting. This removes the performance burden, and improves the signal/noise ratio for messages in the global buffer. At the same time though, it is somewhat pointless, since all the recorded log messages are already going to be sent to an explicit log output like syslog, stderr or the journal. The global log buffer is thus just duplicating this data on stderr upon crash. The log_buffer_size config parameter is left in the augeas lens to prevent breakage for users on upgrade. It is however completely ignored hereafter. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
Any source file which calls the logging APIs now needs to have a VIR_LOG_INIT("source.name") declaration at the start of the file. This provides a static variable of the virLogSource type. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
As part of the goal to get away from doing string matching on filenames when deciding whether to emit a log message, turn the virLogSource enum into a struct which contains a log "name". There will eventually be one virLogSource instance statically declared per source file. To minimise churn in this commit though, a single global instance is used. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Martin Kletzander 提交于
If there should be some sort of separator it is better to use comment with the filename, copyright, description, license information and authors. Found by: git grep -nH '^$' | grep '\.[ch]:1:' Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Martin Kletzander 提交于
Commit a1cbe4b5 added a check for spaces around assignments and this patch extends it to checks for spaces around '=='. One exception is virAssertCmpInt where comma after '==' is acceptable (since it is a macro and '==' is its argument). Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Martin Kletzander 提交于
When ran, cil is throwing out some errors and warnings for obsolete 'or' unused variables and wrong module name (it should not contain a hyphen; hence the rename). Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Martin Kletzander 提交于
Introducing keepalive similarly to Guannan around 2 years ago. Since we want to introduce keepalive for every connection, it makes sense to wrap the connecting function into new virsh one that can deal keepalive as well. Function vshConnect() is now used for connecting and keepalive added in that function (if possible) helps preventing long waits e.g. while nework goes down during migration. This patch also adds the options for keepalive tuning into virsh and fails connecting only when keepalives are explicitly requested and cannot be set (whether it is due to missing support in connected driver or remote server). If not explicitely requested, a debug message is printed (hence the addition to virsh-optparse test). Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1073506 Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=822839Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
- 15 3月, 2014 1 次提交
-
-
由 Cole Robinson 提交于
-S causes qemu to start in the paused state. Since XML2Native is intended to generate something that users can run directly, this will trip them up.
-
- 13 3月, 2014 1 次提交
-
-
由 Chunyan Liu 提交于
Add unit test for hostdev common library. Current tests are based on virpcimock.
-
- 12 3月, 2014 1 次提交
-
-
由 Ján Tomko 提交于
So far it's just virCommandSetDryRun.
-
- 11 3月, 2014 2 次提交
-
-
由 Jiri Denemark 提交于
Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Daniel P. Berrange 提交于
GNULIB provides APIs for calculating md5 and sha256 hashes, but these APIs only return you raw byte arrays. Most users in libvirt want the hash in printable string format. Add some helper APIs in util/vircrypto.{c,h} for doing this. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 10 3月, 2014 2 次提交
-
-
由 Ján Tomko 提交于
Some of these are leftovers from renaming the files, others are just typos. Also introduce an ugly awk script to enforce this.
-
由 Jiri Denemark 提交于
-
- 07 3月, 2014 3 次提交
-
-
由 Michael Chapman 提交于
Test it once with SELinux enabled and once with it disabled. Signed-off-by: NMichael Chapman <mike@very.puzzling.org>
-
由 Michael Chapman 提交于
With the previous commit's securityselinuxhelper enhancements, the SELinux security manager can be tested even without SELinux enabled on the test system. Signed-off-by: NMichael Chapman <mike@very.puzzling.org>
-
由 Michael Chapman 提交于
Add fake implementations of: - is_selinux_enabled - security_disable - selinux_virtual_domain_context_path - selinux_virtual_image_context_path - selinux_lxc_contexts_path - selabel_open - selabel_close - selabel_lookup_raw The selabel_* functions back onto the real implementations if SELinux is enabled on the test system, otherwise we just implement a fake selabel handle which errors out on all labelling lookups. With these changes in place, securityselinuxtest and securityselinuxlabeltest don't need to skip all tests if SELinux isn't available; they can exercise much of the security manager code. Signed-off-by: NMichael Chapman <mike@very.puzzling.org>
-