- 09 5月, 2012 5 次提交
-
-
由 Osier Yang 提交于
<vcpu> is not an optional node. The value for its 'placement' actually always defaults to 'static' in the underlying codes. (Even no 'cpuset' and 'placement' is specified, the domain process will be pinned to all the available pCPUs).
-
由 Osier Yang 提交于
With this patch, one can also fully drive numad by: <vcpu>2</vcpu> <numatune> <memory placement='auto'/> </numatune> New tests are added.
-
由 Osier Yang 提交于
Though numad will manage the memory allocation of task dynamically, it wants management application (libvirt) to pre-set the memory policy according to the advisory nodeset returned from querying numad, (just like pre-bind CPU nodeset for domain process), and thus the performance could benefit much more from it. This patch introduces new XML tag 'placement', value 'auto' indicates whether to set the memory policy with the advisory nodeset from numad, and its value defaults to the value of <vcpu> placement, or 'static' if 'nodeset' is specified. Example of the new XML tag's usage: <numatune> <memory placement='auto' mode='interleave'/> </numatune> Just like what current "numatune" does, the 'auto' numa memory policy setting uses libnuma's API too. If <vcpu> "placement" is "auto", and <numatune> is not specified explicitly, a default <numatume> will be added with "placement" set as "auto", and "mode" set as "strict". The following XML can now fully drive numad: 1) <vcpu> placement is 'auto', no <numatune> is specified. <vcpu placement='auto'>10</vcpu> 2) <vcpu> placement is 'auto', no 'placement' is specified for <numatune>. <vcpu placement='auto'>10</vcpu> <numatune> <memory mode='interleave'/> </numatune> And it's also able to control the CPU placement and memory policy independently. e.g. 1) <vcpu> placement is 'auto', and <numatune> placement is 'static' <vcpu placement='auto'>10</vcpu> <numatune> <memory mode='strict' nodeset='0-10,^7'/> </numatune> 2) <vcpu> placement is 'static', and <numatune> placement is 'auto' <vcpu placement='static' cpuset='0-24,^12'>10</vcpu> <numatune> <memory mode='interleave' placement='auto'/> </numatume> A follow up patch will change the XML formatting codes to always output 'placement' for <vcpu>, even it's 'static'.
-
由 Alon Levy 提交于
Alon tried './qemuxml2argvtest --help' to figure out a test failure, but it didn't help. The information is in HACKING, but it doesn't hurt to make the tests also provide their own help. Signed-off-by: NAlon Levy <alevy@redhat.com> Signed-off-by: NEric Blake <eblake@redhat.com>
-
由 Alon Levy 提交于
qemu's behavior in this case is to change the spice server behavior to require secure connection to any channel not otherwise specified as being in plaintext mode. libvirt doesn't currently allow requesting this (via plaintext-channel=<channel name>). RHBZ: 819499 Signed-off-by: NAlon Levy <alevy@redhat.com>
-
- 08 5月, 2012 2 次提交
-
-
由 Alon Levy 提交于
Add "usbredir" channel to list of recognized spice channels. RHBZ: 819498 Signed-off-by: NAlon Levy <alevy@redhat.com>
-
由 Eric Blake 提交于
We only know -lpthread exists on platforms where we build threads-pthread.c; but when we build threads-win32.c, LIB_PTHREAD is empty. * tests/Makefile.am (shunloadtest_LDADD): Use correct library.
-
- 04 5月, 2012 3 次提交
-
-
由 Stefan Berger 提交于
Error: RESOURCE_LEAK: /libvirt/tests/qemuxml2argvtest.c:47: alloc_arg: Calling allocation function "virAlloc" on "ret". /libvirt/src/util/memory.c:101: alloc_fn: Storage is returned from allocation function "calloc". /libvirt/src/util/memory.c:101: var_assign: Assigning: "*((void **)ptrptr)" = "calloc(1UL, size)". /libvirt/tests/qemuxml2argvtest.c:54: leaked_storage: Variable "ret" going out of scope leaks the storage it points to.
-
由 Guido Günther 提交于
-
由 Eric Blake 提交于
On cygwin, <rpc/rpc.h> lives in a different directory than /usr/include, so anything that uses it must modify CFLAGS. This previously tripped up just 'make check', but now that we build all test programs unconditionally, it also trips up 'make'. * tests/Makefile.am (virnetmessagetest_CFLAGS): Find rpc headers.
-
- 02 5月, 2012 1 次提交
-
-
由 Eric Blake 提交于
The recent push to use correct scaling terms (kB for 1000, KiB for 1024 - such as commit 9dfdeadc) missed some places in virsh. * tools/virsh.c (prettyCapacity, cmdDominfo, cmdFreecell) (cmdNodeinfo, cmdNodeMemStats, cmdMigrateSetMaxSpeed) (cmdBlockCopy, cmdBlockPull, cmdBlockJob): Use KiB, not kB, when referring to multiples of 1024. * tests/virshtest.c: Update expected output to match.
-
- 01 5月, 2012 1 次提交
-
-
由 Josh Durgin 提交于
This works with newer qemu that doesn't allow escaping spaces. It's backwards compatible as well. Signed-off-by: NJosh Durgin <josh.durgin@dreamhost.com>
-
- 28 4月, 2012 1 次提交
-
-
由 Stefan Berger 提交于
More bug extermination in the category of: Error: CHECKED_RETURN: /libvirt/src/conf/network_conf.c:595: check_return: Calling function "virAsprintf" without checking return value (as is done elsewhere 515 out of 543 times). /libvirt/src/qemu/qemu_process.c:2780: unchecked_value: No check of the return value of "virAsprintf(&msg, "was paused (%s)", virDomainPausedReasonTypeToString(reason))". /libvirt/tests/commandtest.c:809: check_return: Calling function "setsid" without checking return value (as is done elsewhere 4 out of 5 times). /libvirt/tests/commandtest.c:830: unchecked_value: No check of the return value of "virTestGetDebug()". /libvirt/tests/commandtest.c:831: check_return: Calling function "virTestGetVerbose" without checking return value (as is done elsewhere 41 out of 42 times). /libvirt/tests/commandtest.c:833: check_return: Calling function "virInitialize" without checking return value (as is done elsewhere 18 out of 21 times). One note about the error in commandtest line 809: setsid() seems to fail when running the test -- could be removed ?
-
- 23 4月, 2012 2 次提交
-
-
由 Eric Blake 提交于
In order to track a block copy job across libvirtd restarts, we need to save internal XML that tracks the name of the file holding the mirror. Displaying this name in dumpxml might also be useful to the user, even if we don't yet have a way to (re-) start a domain with mirroring enabled up front. This is done with a new <mirror> sub-element to <disk>, as in: <disk type='file' device='disk'> <driver name='qemu' type='raw'/> <source file='/var/lib/libvirt/images/original.img'/> <mirror file='/var/lib/libvirt/images/copy.img' format='qcow2' ready='yes'/> ... </disk> For now, the element is output-only, in live domains; it is ignored when defining a domain or hot-plugging a disk (since those contexts use VIR_DOMAIN_XML_INACTIVE in parsing). The 'ready' attribute appears when libvirt knows that the job has changed from the initial pulling phase over to the mirroring phase, although absence of the attribute is not a sure indicator of the current phase. If we come up with a way to make qemu start with mirroring enabled, we can relax the xml restriction, and allow <mirror> (but not attribute 'ready') on input. Testing active-only XML meant tweaking the testsuite slightly, but it was worth it. * docs/schemas/domaincommon.rng (diskspec): Add diskMirror. * docs/formatdomain.html.in (elementsDisks): Document it. * src/conf/domain_conf.h (_virDomainDiskDef): New members. * src/conf/domain_conf.c (virDomainDiskDefFree): Clean them. (virDomainDiskDefParseXML): Parse them, but only internally. (virDomainDiskDefFormat): Output them. * tests/qemuxml2argvdata/qemuxml2argv-disk-mirror.xml: New test file. * tests/qemuxml2xmloutdata/qemuxml2xmlout-disk-mirror.xml: Likewise. * tests/qemuxml2xmltest.c (testInfo): Alter members. (testCompareXMLToXMLHelper): Allow more test control. (mymain): Run new test.
-
由 Peter Krempa 提交于
This patch modifies the CPU comparrison function to report the incompatibilities in more detail to ease identification of problems. * src/cpu/cpu.h: cpuGuestData(): Add argument to return detailed error message. * src/cpu/cpu.c: cpuGuestData(): Add passthrough for error argument. * src/cpu/cpu_x86.c x86FeatureNames(): Add function to convert a CPU definition to flag names. x86Compute(): - Add error message parameter - Add macro for reporting detailed error messages. - Improve error reporting. - Simplify calculation of forbidden flags. x86DataIteratorInit(): x86cpuidMatchAny(): Remove functions that are no longer needed. * src/qemu/qemu_command.c: qemuBuildCpuArgStr(): - Modify for new function prototype - Add detailed error reports - Change error code on incompatible processors to VIR_ERR_CONFIG_UNSUPPORTED instead of internal error * tests/cputest.c: cpuTestGuestData(): Modify for new function prototype
-
- 17 4月, 2012 3 次提交
-
-
由 Osier Yang 提交于
Since now we have fixed domain UUID for test driver, defining a domain with different name but same UUID doesn't work any more. This patch delete the UUID from the dumped XML so that it could be generated.
-
由 Osier Yang 提交于
A "ide-drive" device can be either a hard disk or a CD-ROM, if there is ",media=cdrom" specified for the backend, it's a CD-ROM, otherwise it's a hard disk. Upstream qemu splitted "ide-drive" into "ide-hd" and "ide-cd" since commit 1f56e32, and ",media=cdrom" is not required for ide-cd anymore. "ide-drive" is still supported for backwards compatibility, but no doubt we should go foward.
-
由 Osier Yang 提交于
A "scsi-disk" device can be either a hard disk or a CD-ROM, if there is ",media=cdrom" specified for the backend, it's a CD-ROM, otherwise it's a hard disk. But upstream qemu splitted "scsi-disk" into "scsi-hd" and "scsi-cd" since commit b443ae, and ",media=cdrom" is not required for scsi-cd anymore. "scsi-disk" is still supported for backwards compatibility, but no doubt we should go foward.
-
- 11 4月, 2012 1 次提交
-
-
由 Jiri Denemark 提交于
Without this, libvirtdconftest fails to build with "fatal error: daemon/libvirtd-config.h: No such file or directory"
-
- 10 4月, 2012 2 次提交
-
-
由 Daniel P. Berrange 提交于
* src/qemu/qemu_command.c: Wire up -bios with <loader> * tests/qemuxml2argvdata/qemuxml2argv-bios.args, tests/qemuxml2argvdata/qemuxml2argv-bios.xml: Expand existing BIOS test case to cover <loader>
-
由 Daniel P. Berrange 提交于
The daemon-conf test script continues to be very fragile to changes in libvirt. It currently fails 1 time in 3/4 due to race conditions in startup/shutdown of the test script. Replace it with a proper test case tailored to the code being tested * tests/Makefile.am: Remove daemon-conf, add libvirtdconftest * tests/daemon-conf: Delete obsolete test * tests/libvirtdconftest.c: Test config file handling
-
- 06 4月, 2012 3 次提交
-
-
由 Eric Blake 提交于
gcc 4.7 warns about uninitialized struct members * tests/testutilsqemu.c (testQemuCapsInit): Populate new members. * tests/viruritest.c (mymain): Likewise.
-
由 Laine Stump 提交于
When building on Fedora 17 (which uses gcc 4.7.0) with -O0 in CFLAGS, three of the tests failed to compile. cputest.c and qemuxml2argvtest.c had non-static structs defined inside the macro that was being repeatedly invoked. Due to some so-far unidentified change in gcc, the stack space used by variables defined inside { } is not recovered/re-used when the block ends, so all these structs have become additive (this is the same problem worked around in commit cf57d345). Fortunately, these two files could be fixed with a single line addition of "static" to the struct definition in the macro. virnettlscontexttest.c was a bit different, though. The problem structs in the do/while loop of macros had non-constant initializers, so it took a bit more work and piecemeal initialization instead of member initialization to get things to be happy. In an ideal world, none of these changes should be necessary, but not knowing how long it will be until the gcc regressions are fixed, and since the code is just as correct after this patch as before, it makes sense to fix libvirt's build for -O0 while also reporting the gcc problem.
-
由 Guido Günther 提交于
This got dropped with 300e60e1 Cheers, -- Guido
-
- 05 4月, 2012 1 次提交
-
-
由 Laine Stump 提交于
This bug resolves https://bugzilla.redhat.com/show_bug.cgi?id=810100 rpm builds for i686 were failing with a segfault in networkxml2argvtest. Running under valgrind showed that a region of memory was being referenced after it had been freed (as the result of realloc - see the valgrind report in the BZ). The problem (in replaceTokens() - added in commit 22ec60, meaning this bug was in 0.9.10 and 0.9.11) was that the pointers token_start and token_end were being computed based on the value of *buf, then *buf was being realloc'ed (potentially moving it), then token_start and token_end were used without recomputing them to account for movement of *buf. The solution is to change the code so that token_start and token_end are offsets into *buf rather than pointers. This way there is only a single pointer to the buffer, and nothing needs readjusting after a realloc. (You may note that some uses of token_start/token_end didn't need to be changed to add in "*buf +" - that's because there ended up being a +*buf and -*buf which canceled each other out). DV gets the credit for finding this bug and pointing out the valgrind report.
-
- 04 4月, 2012 1 次提交
-
-
由 Daniel P. Berrange 提交于
Some of the test suites use fprintf with format specifiers that are not supported on Win32 and are not fixed by gnulib. The mingw32 compiler also has trouble detecting ssize_t correctly, complaining that 'ssize_t' does not match 'signed size_t' (which it expects for %zd). Force the cast to size_t to avoid this problem * tests/testutils.c, tests/testutils.h: Fix printf annotation on virTestResult. Use virVasprintf instead of vfprintf * tests/virhashtest.c: Use VIR_WARN instead of fprintf(stderr). Cast to size_t to avoid mingw32 compiler bug Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 02 4月, 2012 2 次提交
-
-
由 Philipp Hahn 提交于
XenD-3.1 introduced managed domains. HV-domains have rtc_timeoffset (hgd24f37b31030 from 2007-04-03), which tracks the offset between the hypervisors clock and the domains RTC, and is persisted by XenD. In combination with localtime=1 this had a bug until XenD-3.4 (hg5d701be7c37b from 2009-04-01) (I'm not 100% sure how that bug manifests, but at least for me in TZ=Europe/Berlin I see the previous offset relative to utc being applied to localtime again, which manifests in an extra hour being added) XenD implements the following variants for clock/@offset: - PV domains don't have a RTC → 'localtime' | 'utc' - <3.1: no managed domains → 'localtime' | 'utc' - ≥3.1: the offset is tracked for HV → 'variable' due to the localtime=1 bug → 'localtime' | 'utc' - ≥3.4: the offset is tracked for HV → 'variable' Current libvirtd still thinks XenD only implements <clock offset='utc'/> and <clock offset='localtime'/>, which is wrong, since the semantic of 'utc' and 'localtime' specifies, that the offset will be reset on domain-restart, while with 'variable' the offset is kept. (keeping the offset over "virsh edit" is important, since otherwise the clock might jump, which confuses certain guest OSs) xendConfigVersion was last incremented to 4 by the xen-folks for xen-3.1.0. I know of no way to reliably detect the version of XenD (user space tools), which may be different from the version of the hypervisor (kernel) version! Because of this only the change from 'utc'/'localtime' to 'variable' in XenD-3.1 is handled, not the buggy behaviour of XenD-3.1 until XenD-3.4. For backward compatibility with previous versions of libvirt Xen-HV still accepts 'utc' and 'localtime', but they are returned as 'variable' on the next read-back from Xend to libvirt, since this is what XenD implements: The RTC is NOT reset back to the specified time on next restart, but the previous offset is kept. This behaviour can be turned off by adding the additional attribute adjustment='reset', in which case libvirt will report an error instead of doing the conversion. The attribute can also be used as a shortcut to offset='variable' with basis='...'. With these changes, it is also necessary to adjust the xen tests: "localtime = 0" is always inserted, because otherwise on updates the value is not changed within XenD. adjustment='reset' is inserted for all cases, since they're all < XEND_CONFIG_VERSION_3_1_0, only 3.1 introduced persistent rtc_timeoffset. Some statements change their order because code was moved around. Signed-off-by: NPhilipp Hahn <hahn@univention.de>
-
由 Philipp Hahn 提交于
Since Xen 3.1 the clock=variable semantic is supported. In addition to qemu/kvm Xen also knows about a variant where the offset is relative to 'localtime' instead of 'utc'. Extends the libvirt structure with a flag 'basis' to specify, if the offset is relative to 'localtime' or 'utc'. Extends the libvirt structure with a flag 'reset' to force the reset behaviour of 'localtime' and 'utc'; this is needed for backward compatibility with previous versions of libvirt, since they report incorrect XML. Adapt the only user 'qemu' to the new name. Extend the RelaxNG schema accordingly. Document the new 'basis' attribute in the HTML documentation. Adapt test for the new attribute. Signed-off-by: NPhilipp Hahn <hahn@univention.de>
-
- 30 3月, 2012 4 次提交
-
-
由 Daniel P. Berrange 提交于
The code is splattered with a mix of sizeof foo sizeof (foo) sizeof(foo) Standardize on sizeof(foo) and add a syntax check rule to enforce it Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
The commandhelper.c & ssh.c programs rely on various APIs not present on Win32. Disable them, since the tests that uses these helpers are already disabled * tests/commandhelper.c, tests/ssh.c: Disable on WIN32 Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
Defining an enum with names like "ERROR" causes a world of hurt on Win32 whose headers have such symbol names already * tests/cputest.c: Remove redefinition of CPU constants Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Eric Blake 提交于
An upstream gnulib bug[1] meant that some of our syntax checks weren't being run. Fix up our offenders before we upgrade to a newer gnulib. [1] https://lists.gnu.org/archive/html/bug-gnulib/2012-03/msg00194.html * src/util/virnetdevtap.c (virNetDevTapCreate): Use flags. * tests/lxcxml2xmltest.c (mymain): Strip useless ().
-
- 28 3月, 2012 1 次提交
-
-
由 Daniel P. Berrange 提交于
Add a new flag '--with-test-suite' to configure to control whether the test suite binaries are built by default. ie built with a plain 'make', as opposed to delayed until 'make check' For builds from tar.gz tests will not be built by default. For builds from GIT, tests with be on by default, to try and ensure that patch developers don't accidentally break the test suites without noticing. * configure.ac: Add --with-test-suite * tests/Makefile.am: Use noinst_PROGRAMS instead of check_PROGRAMS if building tests by default. Consolidate setting of TESTS and {noinst,check}_PROGRAMS to avoid duplication
-
- 27 3月, 2012 4 次提交
-
-
由 Stef Walter 提交于
* Don't advertise information on the network without consent of the user, either through manual configuration, or a user interface that drives this option. * Since libvirtd must be configured for network access anyway (for all but ssh), this setting was not useful "out of the box", so changing this default setting does not remove "out of the box" functionality.
-
由 Daniel P. Berrange 提交于
* docs/schemas/domaincommon.rng: Add missing lxc & openvz console target types. Allow arch on LXC <os> type element * tests/domainschematest: Include tests/lxcxml2xmldata/
-
由 Daniel P. Berrange 提交于
Pass argv to the init binary of LXC, using a new <initarg> element. * docs/formatdomain.html.in: Document <os> usage for containers * docs/schemas/domaincommon.rng: Add <initarg> element * src/conf/domain_conf.c, src/conf/domain_conf.h: parsing and formatting of <initarg> * src/lxc/lxc_container.c: Setup LXC argv * tests/Makefile.am, tests/lxcxml2xmldata/lxc-systemd.xml, tests/lxcxml2xmltest.c, tests/testutilslxc.c, tests/testutilslxc.h: Test parsing/formatting of LXC related XML parts
-
由 Martin Kletzander 提交于
Return statements with parameter enclosed in parentheses were modified and parentheses were removed. The whole change was scripted, here is how: List of files was obtained using this command: git grep -l -e '\<return\s*([^()]*\(([^()]*)[^()]*\)*)\s*;' | \ grep -e '\.[ch]$' -e '\.py$' Found files were modified with this command: sed -i -e \ 's_^\(.*\<return\)\s*(\(\([^()]*([^()]*)[^()]*\)*\))\s*\(;.*$\)_\1 \2\4_' \ -e 's_^\(.*\<return\)\s*(\([^()]*\))\s*\(;.*$\)_\1 \2\3_' Then checked for nonsense. The whole command looks like this: git grep -l -e '\<return\s*([^()]*\(([^()]*)[^()]*\)*)\s*;' | \ grep -e '\.[ch]$' -e '\.py$' | xargs sed -i -e \ 's_^\(.*\<return\)\s*(\(\([^()]*([^()]*)[^()]*\)*\))\s*\(;.*$\)_\1 \2\4_' \ -e 's_^\(.*\<return\)\s*(\([^()]*\))\s*\(;.*$\)_\1 \2\3_'
-
- 26 3月, 2012 1 次提交
-
-
由 Eric Blake 提交于
When qparams support was dropped in commit bc1ff160, we forgot to add tests to ensure that viruri can do the same round trip handling of a URI. This round trip was broken, due to use of the old 'query' field of xmlUriPtr, instead of the new 'query_raw' Also, we forgot to report an OOM error. * tests/viruritest.c (mymain): Add tests based on just-deleted qparamtest. (testURIParse): Allow difference in input and expected output. * src/util/viruri.c (virURIFormat): Add missing error. Use query_raw, instead of query for xmlUriPtr object.
-
- 24 3月, 2012 1 次提交
-
-
由 Eric Blake 提交于
Otherwise, 'make check' breaks since commit bc1ff160 deleted qparams.h. A later patch will ensure that viruri takes over what qparams used to do. * tests/qparamtest.c (mymain): Delete, now that we have viruri. * tests/Makefile.am (check_PROGRAMS, TESTS, qparamtest_SOURCES): Delete old test. * .gitignore: Add recent test additions.
-
- 23 3月, 2012 1 次提交
-
-
由 Osier Yang 提交于
This is similiar with physical world, one will be surprised if the box starts with medium exists while the tray is open. New tests are added, tests disk-{cdrom,floppy}-tray are for the qemu supports "-device" flag, and disk-{cdrom,floppy}-no-device-cap are for old qemu, i.e. which doesn't support "-device" flag.
-