- 01 5月, 2011 1 次提交
-
-
由 Matthias Bolte 提交于
-
- 30 4月, 2011 3 次提交
-
-
由 Eric Blake 提交于
Commit 1671d1dc introduced a memory leak in virHashFree, and wholesale table corruption in virHashRemoveSet (elements not requested to be freed are lost). * src/util/hash.c (virHashFree): Free bucket array. (virHashRemoveSet): Don't lose elements. * tests/hashtest.c (testHashCheckForEachCount): New method. (testHashCheckCount): Expose the bug.
-
由 Eric Blake 提交于
* bootstrap.conf (gnulib_modules): Add getcwd-lgpl. * tests/commandtest.c (checkoutput): Drop unused cwd. * tests/commandhelper.c (main): Let getcwd malloc. * tests/testutils.c (virTestMain): Likewise. * tools/virsh.c (cmdPwd): Likewise. (virshCmds): Expose cmdPwd and cmdCd on mingw.
-
由 Eric Blake 提交于
A few of the tests were missing basic sanity checks, while most of them were doing copy-and-paste initialization (in fact, some of them pasted the argc > 1 check more than once!). It's much nicer to do things in one common place, and minimizes the size of the next patch that fixes getcwd usage. * tests/testutils.h (EXIT_AM_HARDFAIL): New define. (progname, abs_srcdir): Define for all tests. (VIRT_TEST_MAIN): Change callback signature. * tests/testutils.c (virtTestMain): Do more common init. * tests/commandtest.c (mymain): Simplify. * tests/cputest.c (mymain): Likewise. * tests/esxutilstest.c (mymain): Likewise. * tests/eventtest.c (mymain): Likewise. * tests/hashtest.c (mymain): Likewise. * tests/networkxml2xmltest.c (mymain): Likewise. * tests/nodedevxml2xmltest.c (myname): Likewise. * tests/nodeinfotest.c (mymain): Likewise. * tests/nwfilterxml2xmltest.c (mymain): Likewise. * tests/qemuargv2xmltest.c (mymain): Likewise. * tests/qemuhelptest.c (mymain): Likewise. * tests/qemuxml2argvtest.c (mymain): Likewise. * tests/qemuxml2xmltest.c (mymain): Likewise. * tests/qparamtest.c (mymain): Likewise. * tests/sexpr2xmltest.c (mymain): Likewise. * tests/sockettest.c (mymain): Likewise. * tests/statstest.c (mymain): Likewise. * tests/storagepoolxml2xmltest.c (mymain): Likewise. * tests/storagevolxml2xmltest.c (mymain): Likewise. * tests/virbuftest.c (mymain): Likewise. * tests/virshtest.c (mymain): Likewise. * tests/vmx2xmltest.c (mymain): Likewise. * tests/xencapstest.c (mymain): Likewise. * tests/xmconfigtest.c (mymain): Likewise. * tests/xml2sexprtest.c (mymain): Likewise. * tests/xml2vmxtest.c (mymain): Likewise.
-
- 28 4月, 2011 1 次提交
-
-
由 Eric Blake 提交于
Same fix as commit 1fc288e1. * tests/hashtest.c (testHashRemoveForEach): Use correct format.
-
- 27 4月, 2011 1 次提交
-
-
由 Jiri Denemark 提交于
This adds several tests for remaining hash APIs (custom hasher/comparator functions are not covered yet, though). All tests pass both before and after the "Simplify hash implementation".
-
- 21 4月, 2011 1 次提交
-
-
由 Eric Blake 提交于
ARRAY_CARDINALITY is typed as size_t, not long; this matters on 32-bit platforms: hashtest.c: In function 'testHashRemoveForEach': hashtest.c:114: error: format '%lu' expects type 'long unsigned int', but argument 4 has type 'unsigned int' [-Wformat] * tests/hashtest.c (testHashRemoveForEach): Use correct format.
-
- 16 4月, 2011 2 次提交
-
-
由 Jiri Denemark 提交于
This is a basic set of tests for testing removals of hash entries during iteration.
-
由 Eric Blake 提交于
* tests/virsh-optparse: New file. * tests/Makefile.am (test_scripts): Use it.
-
- 15 4月, 2011 2 次提交
-
-
由 Michal Novotny 提交于
Make: passed Make check: passed Make syntax-check: passed this is the commit to introduce the function to create new character device definition for the domain as advised by Cole Robinson <crobinso@redhat.com>. The function is used on the relevant places and also new tests has been added. Signed-off-by: NMichal Novotny <minovotn@redhat.com>
-
由 Michal Privoznik 提交于
This extends the SPICE XML to allow variable compression settings for audio, images and streaming: <graphics type='spice' port='5901' tlsPort='-1' autoport='yes'> <image compression='auto_glz'/> <jpeg compression='auto'/> <zlib compression='auto'/> <playback compression='on'/> </graphics> All new elements are optional.
-
- 08 4月, 2011 1 次提交
-
-
由 Stefan Berger 提交于
This patch adds support for the evaluation of TCP flags in nwfilters. It adds documentation to the web page and extends the tests as well. Also, the nwfilter schema is extended. The following are some example for rules using the tcp flags: <rule action='accept' direction='in'> <tcp state='NONE' flags='SYN/ALL' dsptportstart='80'/> </rule> <rule action='drop' direction='in'> <tcp state='NONE' flags='SYN/ALL'/> </rule>
-
- 07 4月, 2011 1 次提交
-
-
由 Eric Blake 提交于
* tests/qemuxml2argvdata/qemuxml2argv-*.args: Reflect reserved VGA port change.
-
- 05 4月, 2011 4 次提交
-
-
由 Daniel P. Berrange 提交于
A couple of functions were declared using the old style foo() for no-parameters, instead of foo(void) * src/xen/xen_hypervisor.c, tests/testutils.c: Replace () with (void) in some function declarations * m4/virt-compile-warnings.m4: Enable -Wold-style-definition
-
由 Daniel P. Berrange 提交于
* src/internal.h: Define a ATTRIBUTE_NO_RETURN annotation * src/lxc/lxc_container.c: Annotate lxcContainerDummyChild with ATTRIBUTE_NO_RETURN * tests/eventtest.c: Mark async thread as ATTRIBUTE_NO_RETURN * m4/virt-compile-warnings.m4: Enable -Wmissing-noreturn
-
由 Daniel P. Berrange 提交于
Add a couple of missing ATTRIBUTE_FMT_PRINTF annotations * tools/virsh.c, tests/testutils.c: Add printf format attribute * m4/virt-compile-warnings.m4: Enable -Wmissing-format-attribute
-
由 Matthias Bolte 提交于
-
- 29 3月, 2011 2 次提交
-
-
由 Osier Yang 提交于
v1 - v2: * Add missed tests/qemuxml2argvdata/qemuxml2argv-cputune.args
-
由 Eric Blake 提交于
Latent bug introduced in commit 2d6a5819 (Aug 2009), but not exposed until commit 1859939a (Jan 2011). Basically, when virExec creates a pipe, it always marks libvirt's side as cloexec. If libvirt then wants to hand that pipe to another child process, things work great if the fd is dup2()'d onto stdin or stdout (as with stdin: or exec: migration), but if the pipe is instead used as-is (such as with fd: migration) then qemu sees EBADF because the fd was closed at exec(). This is a minimal fix for the problem at hand; it is slightly racy, but no more racy than the rest of libvirt fd handling, including the case of uncompressed save images. A more invasive fix, but ultimately safer at avoiding leaking unintended fds, would be to _always and atomically_ open all fds as cloexec in libvirt (thanks to primitives like open(O_CLOEXEC), pipe2(), accept4(), ...), then teach virExec to clear that bit for all fds explicitly marked to be handed to the child only after forking. * src/qemu/qemu_command.c (qemuBuildCommandLine): Clear cloexec flag. * tests/qemuxml2argvtest.c (testCompareXMLToArgvFiles): Tweak test.
-
- 28 3月, 2011 1 次提交
-
-
由 Eric Blake 提交于
Diego reported a bug where virsh tries to initialize a readline history directory during 'make check' run as root, but fails because /root was read-only. It turns out that I could reproduce this as non-root, by using: mv ~/.virsh{,.bak} chmod a-w ~ make check -C tests TESTS=int-overflow chmod u+w ~ mv ~/.virsh{.bak,} * tests/int-overflow: Don't trigger interactive mode. Reported by Diego Elio Pettenò.
-
- 25 3月, 2011 1 次提交
-
-
由 Eric Blake 提交于
Sometimes, an asynchronous helper is started (such as a compressor or iohelper program), but a later error means that we want to abort that child. Make this easier. Note that since daemons and virCommandRunAsync can't mix, the only time virCommandFree can reap a process is if someone did virCommandRunAsync for a non-daemon and didn't stash the pid. * src/util/command.h (virCommandAbort): New prototype. * src/util/command.c (_virCommand): Add new field. (virCommandRunAsync, virCommandWait): Track whether pid was used. (virCommandFree): Reap child if caller did not request pid. (virCommandAbort): New function. * src/libvirt_private.syms (command.h): Export it. * tests/commandtest.c (test19): New test.
-
- 07 3月, 2011 1 次提交
-
-
由 Daniel P. Berrange 提交于
The event loop implementation is used by more than just the daemon, so move it into the shared area. * daemon/event.c, src/util/event_poll.c: Renamed * daemon/event.h, src/util/event_poll.h: Renamed * tools/Makefile.am, tools/console.c, tools/virsh.c: Update to use new virEventPoll APIs * daemon/mdns.c, daemon/mdns.c, daemon/Makefile.am: Update to use new virEventPoll APIs
-
- 06 3月, 2011 1 次提交
-
-
由 Osier Yang 提交于
For qemu names the primary vga as "qxl-vga": 1) if vram is specified for 2nd qxl device: -vga qxl -global qxl-vga.vram_size=$SIZE \ -device qxl,id=video1,vram_size=$SIZE,... 2) if vram is not specified for 2nd qxl device, (use the default set by global): -vga qxl -global qxl-vga.vram_size=$SIZE \ -device qxl,id=video1,... For qemu names all qxl devices as "qxl": 1) if vram is specified for 2nd qxl device: -vga qxl -global qxl.vram_size=$SIZE \ -device qxl,id=video1,vram_size=$SIZE ... 2) if vram is not specified for 2nd qxl device: -vga qxl -global qxl-vga.vram_size=$SIZE \ -device qxl,id=video1,... "-global" is the only way to define vram_size for the primary qxl device, regardless of how qemu names it, (It's not good a good way, as original idea of "-global" is to set a global default for a driver property, but to specify vram for first qxl device, we have to use it). For other qxl devices, as they are represented by "-device", could specify it directly and seperately for each, and it overrides the default set by "-global" if specified. v1 - v2: * modify "virDomainVideoDefaultRAM" so that it returns 16M as the default vram_size for qxl device. * vram_size * 1024 (qemu accepts bytes for vram_size). * apply default vram_size for qxl device for which vram_size is not specified. * modify "graphics-spice" tests (more sensiable vram_size) * Add an argument of virDomainDefPtr type for qemuBuildVideoDevStr, to use virDomainVideoDefaultRAM in qemuBuildVideoDevStr). v2 - v3: * Modify default video memory size for qxl device from 16M to 24M * Update codes to be consistent with changes on qemu_capabilities.*
-
- 03 3月, 2011 1 次提交
-
-
由 Eric Blake 提交于
* tests/xml2sexprdata/*.sexpr: Add backslash-newlines. * tests/sexpr2xmldata/*.sexpr: Likewise. * tests/qemuxml2argvdata/qemuxml2argv-disk-aio.args: Likewise.
-
- 26 2月, 2011 1 次提交
-
-
由 Michal Novotny 提交于
this is the patch to add support for multiple serial ports to the libvirt Xen driver. It support both old style (serial = "pty") and new style (serial = [ "/dev/ttyS0", "/dev/ttyS1" ]) definition and tests for xml2sexpr, sexpr2xml and xmconfig have been added as well. Written and tested on RHEL-5 Xen dom0 and working as designed but the Xen version have to have patch for RHBZ #614004 but this patch is for upstream version of libvirt. Also, this patch is addressing issue described in RHBZ #670789. Signed-off-by: NMichal Novotny <minovotn@redhat.com>
-
- 25 2月, 2011 1 次提交
-
-
由 Daniel P. Berrange 提交于
When executed from cron, commandtest would fail to correctly identify daemon processes. Set session ID and process group IDs at startup to ensure we have a consistent environment to run in. * tests/commandtest.c: Call setsid() and setpgid()
-
- 24 2月, 2011 4 次提交
-
-
由 Daniel P. Berrange 提交于
Remove the <stdbool.h> header from all source files / headers and just put it into internal.h * src/internal.h: Add <stdbool.h>
-
由 Jiri Denemark 提交于
This is done for two reasons: - we are getting very close to 64 flags which is the maximum we can use with unsigned long long - by using LL constants in enum we already violates C99 constraint that enum values have to fit into int
-
由 Jiri Denemark 提交于
Three new functions (qemuCapsSet, qemuCapsClear, and qemuCapsGet) were introduced replacing direct bit operations.
-
由 Jiri Denemark 提交于
The new names comply more with the fact that they are all members of enum qemuCapsFlags.
-
- 22 2月, 2011 5 次提交
-
-
由 Markus Groß 提交于
-
由 Markus Groß 提交于
-
由 Markus Groß 提交于
-
由 Markus Groß 提交于
-
由 Markus Groß 提交于
-
- 18 2月, 2011 2 次提交
-
-
由 Laine Stump 提交于
This fixes https://bugzilla.redhat.com/show_bug.cgi?id=609463 The problem was that, since a bridge always acquires the MAC address of the connected interface with the numerically lowest MAC, as guests are started and stopped, it was possible for the MAC address to change over time, and this change in the network was being detected by Windows 7 (it sees the MAC of the default route change), so on each reboot it would bring up a dialog box asking about this "new network". The solution is to create a dummy tap interface with a MAC guaranteed to be lower than any guest interface's MAC, and attach that tap to the bridge as soon as it's created. Since all guest MAC addresses start with 0xFE, we can just generate a MAC with the standard "0x52, 0x54, 0" prefix, and it's guaranteed to always win (physical interfaces are never connected to these bridges, so we don't need to worry about competing numerically with them). Note that the dummy tap is never set to IFF_UP state - that's not necessary in order for the bridge to take its MAC, and not setting it to UP eliminates the clutter of having an (eg) "virbr0-nic" displayed in the output of the ifconfig command. I chose to not auto-generate the MAC address in the network XML parser, as there are likely to be consumers of that API that don't need or want to have a MAC address associated with the bridge. Instead, in bridge_driver.c when the network is being defined, if there is no MAC, one is generated. To account for virtual network configs that already exist when upgrading from an older version of libvirt, I've added a %post script to the specfile that searches for all network definitions in both the config directory (/etc/libvirt/qemu/networks) and the state directory (/var/lib/libvirt/network) that are missing a mac address, generates a random address, and adds it to the config (and a matching address to the state file, if there is one). docs/formatnetwork.html.in: document <mac address.../> docs/schemas/network.rng: add nac address to schema libvirt.spec.in: %post script to update existing networks src/conf/network_conf.[ch]: parse and format <mac address.../> src/libvirt_private.syms: export a couple private symbols we need src/network/bridge_driver.c: auto-generate mac address when needed, create dummy interface if mac address is present. tests/networkxml2xmlin/isolated-network.xml tests/networkxml2xmlin/routed-network.xml tests/networkxml2xmlout/isolated-network.xml tests/networkxml2xmlout/routed-network.xml: add mac address to some tests
-
由 Laine Stump 提交于
This is in response to: https://bugzilla.redhat.com/show_bug.cgi?id=629662 Explanation qemu's virtio-net-pci driver allows setting the algorithm used for tx packets to either "bh" or "timer". This is done by adding ",tx=bh" or ",tx=timer" to the "-device virtio-net-pci" commandline option. 'bh' stands for 'bottom half'; when this is set, packet tx is all done in an iothread in the bottom half of the driver. (In libvirt, this option is called the more descriptive "iothread".) 'timer' means that tx work is done in qemu, and if there is more tx data than can be sent at the present time, a timer is set before qemu moves on to do other things; when the timer fires, another attempt is made to send more data. (libvirt retains the name "timer" for this option.) The resulting difference, according to the qemu developer who added the option is: bh makes tx more asynchronous and reduces latency, but potentially causes more processor bandwidth contention since the cpu doing the tx isn't necessarily the cpu where the guest generated the packets. Solution This patch provides a libvirt domain xml knob to change the option on the qemu commandline, by adding a new attribute "txmode" to the <driver> element that can be placed inside any <interface> element in a domain definition. It's use would be something like this: <interface ...> ... <model type='virtio'/> <driver txmode='iothread'/> ... </interface> I chose to put this setting as an attribute to <driver> rather than as a sub-element to <tune> because it is specific to the virtio-net driver, not something that is generally usable by all network drivers. (note that this is the same placement as the "driver name=..." attribute used to choose kernel vs. userland backend for the virtio-net driver.) Actually adding the tx=xxx option to the qemu commandline is only done if the version of qemu being used advertises it in the output of qemu -device virtio-net-pci,? If a particular txmode is requested in the XML, and the option isn't listed in that help output, an UNSUPPORTED_CONFIG error is logged, and the domain fails to start.
-
- 16 2月, 2011 1 次提交
-
-
由 Jiri Denemark 提交于
Since we fake host CPU we should also fake host arch instead of taking the real architecture tests are running on.
-
- 11 2月, 2011 1 次提交
-
-
由 Wen Congyang 提交于
QEMUD_CMD_FLAG_PCI_MULTIBUS should be set in the function qemuCapsExtractVersionInfo() The flag QEMUD_CMD_FLAG_PCI_MULTIBUS is used in the function qemuBuildDeviceAddressStr(). All callers get qemuCmdFlags by the function qemuCapsExtractVersionInfo() except that testCompareXMLToArgvFiles() in qemuxml2argvtest.c. So we should set QEMUD_CMD_FLAG_PCI_MULTIBUS in the function qemuCapsExtractVersionInfo() instead of qemuBuildCommandLine() because the function qemuBuildCommandLine() does not be called when we attach a pci device. tests: set QEMUD_CMD_FLAG_PCI_MULTIBUS in testCompareXMLToArgvFiles() set QEMUD_CMD_FLAG_PCI_MULTIBUS before calling qemuBuildCommandLine() as the flags is not set by qemuCapsExtractVersionInfo(). Signed-off-by: NWen Congyang <wency@cn.fujitsu.com>
-
- 09 2月, 2011 1 次提交
-
-
由 Gui Jianfeng 提交于
Implement blkio tunable XML configuration and parsing. Reviewed-by: N"Nikunj A. Dadhania" <nikunj@linux.vnet.ibm.com> Signed-off-by: NGui Jianfeng <guijianfeng@cn.fujitsu.com>
-