1. 23 3月, 2012 6 次提交
  2. 15 3月, 2012 1 次提交
    • O
      qemu: Support numad · 0f8e7ae3
      Osier Yang 提交于
      numad is an user-level daemon that monitors NUMA topology and
      processes resource consumption to facilitate good NUMA resource
      alignment of applications/virtual machines to improve performance
      and minimize cost of remote memory latencies. It provides a
      pre-placement advisory interface, so significant processes can
      be pre-bound to nodes with sufficient available resources.
      
      More details: http://fedoraproject.org/wiki/Features/numad
      
      "numad -w ncpus:memory_amount" is the advisory interface numad
      provides currently.
      
      This patch add the support by introducing a new XML attribute
      for <vcpu>. e.g.
      
        <vcpu placement="auto">4</vcpu>
        <vcpu placement="static" cpuset="1-10^6">4</vcpu>
      
      The returned advisory nodeset from numad will be printed
      in domain's dumped XML. e.g.
        <vcpu placement="auto" cpuset="1-10^6">4</vcpu>
      
      If placement is "auto", the number of vcpus and the current
      memory amount specified in domain XML will be used for numad
      command line (numad uses MB for memory amount):
        numad -w $num_of_vcpus:$current_memory_amount / 1024
      
      The advisory nodeset returned from numad will be used to set
      domain process CPU affinity then. (e.g. qemuProcessInitCpuAffinity).
      
      If the user specifies both CPU affinity policy (e.g.
      (<vcpu cpuset="1-10,^7,^8">4</vcpu>) and placement == "auto"
      the specified CPU affinity will be overridden.
      
      Only QEMU/KVM drivers support it now.
      
      See docs update in patch for more details.
      0f8e7ae3
  3. 14 3月, 2012 1 次提交
  4. 12 3月, 2012 1 次提交
    • E
      qemu: support disk filenames with comma · 6e0ff1d4
      Eric Blake 提交于
      If there is a disk file with a comma in the name, QEmu expects a double
      comma instead of a single one (e.g., the file "virtual,disk.img" needs
      to be specified as "virtual,,disk.img" in QEmu's command line). This
      patch fixes libvirt to work with that feature. Fix RHBZ #801036.
      
      Based on an initial patch by Crístian Viana.
      
      * src/util/buf.h (virBufferEscape): Alter signature.
      * src/util/buf.c (virBufferEscape): Add parameter.
      (virBufferEscapeSexpr): Fix caller.
      * src/qemu/qemu_command.c (qemuBuildRBDString): Likewise.  Also
      escape commas in file names.
      (qemuBuildDriveStr): Escape commas in file names.
      * docs/schemas/basictypes.rng (absFilePath): Relax RNG to allow
      commas in input file names.
      * tests/qemuxml2argvdata/*-disk-drive-network-sheepdog.*: Update
      test.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      6e0ff1d4
  5. 09 3月, 2012 4 次提交
  6. 08 3月, 2012 5 次提交
    • E
      virsh: add option aliases · 1c56b9fe
      Eric Blake 提交于
      In the past, we have created some virsh options with less-than-stellar
      names.  For back-compat reasons, those names must continue to parse,
      but we don't want to document them in help output.  This introduces
      a new option type, an alias, which points to a canonical option name
      later in the option list.
      
      I'm actually quite impressed that our code has already been factored
      to do all option parsing through common entry points, such that I
      got this added in relatively few lines of code!
      
      * tools/virsh.c (VSH_OT_ALIAS): New option type.
      (opts_echo): Hook up an alias, for easy testing.
      (vshCmddefOptParse, vshCmddefHelp, vshCmddefGetOption): Allow for
      aliases.
      * tools/virsh.pod (NOTES): Document promise of back-compat.
      * tests/virshtest.c (mymain): Test new feature.
      1c56b9fe
    • E
      xml: allow scaled memory on input · 2e22f23b
      Eric Blake 提交于
      Output is still in kibibytes, but input can now be in different
      scales for ease of typing.
      
      * src/conf/domain_conf.c (virDomainParseMemory): New helper.
      (virDomainDefParseXML): Use it when parsing.
      * docs/schemas/domaincommon.rng: Expand XML; rename memoryKBElement
      to memoryElement and update callers.
      * docs/formatdomain.html.in (elementsMemoryAllocation): Document
      scaling.
      * tests/qemuxml2argvdata/qemuxml2argv-memtune.xml: Adjust test.
      * tests/qemuxml2xmltest.c: Likewise.
      * tests/qemuxml2xmloutdata/qemuxml2xmlout-memtune.xml: New file.
      2e22f23b
    • E
      xml: drop unenforced minimum memory limit from RNG · 1b1402b9
      Eric Blake 提交于
      The test domain allows <memory>0</memory>, but the RNG was stating
      that memory had to be at least 4096000 bytes.  Hypervisors should
      enforce their own limits, rather than complicating the RNG.
      
      Meanwhile, some copy and paste had introduced some fishy constructs
      in various unit tests.
      
      * docs/schemas/domaincommon.rng (memoryKB, memoryKBElement): Drop
      limit that isn't enforced in code.
      * src/conf/domain_conf.c (virDomainDefParseXML): Require current
      <= maximum.
      * tests/qemuxml2argvdata/*.xml: Fix offenders.
      1b1402b9
    • E
      storage: support more scaling suffixes · 2e148612
      Eric Blake 提交于
      Disk manufacturers are fond of quoting sizes in powers of 10,
      rather than powers of 2 (after all, 2.1 GB sounds larger than
      2.0 GiB, even though the exact opposite is true).  So, we might
      as well follow coreutils' lead in supporting three types of
      suffix: single letter ${u} (which we already had) and ${u}iB
      for the power of 2, and ${u}B for power of 10.
      
      Additionally, it is impossible to create a file with more than
      2**63 bytes, since off_t is signed (if you have enough storage
      to even create one 8EiB file, I'm jealous).  This now reports
      failure up front rather than down the road when the kernel
      finally refuses an impossible size.
      
      * docs/schemas/basictypes.rng (unit): Add suffixes.
      * src/conf/storage_conf.c (virStorageSize): Use new function.
      * docs/formatstorage.html.in: Document it.
      * tests/storagevolxml2xmlin/vol-file-backing.xml: Test it.
      * tests/storagevolxml2xmlin/vol-file.xml: Likewise.
      2e148612
    • E
      xml: output memory unit for clarity · 26545784
      Eric Blake 提交于
      Make it obvious to 'dumpxml' readers what unit we are using,
      since our default of KiB for memory (1024) differs from qemu's
      default of MiB; and differs from our use of bytes for storage.
      
      Tests were updated via:
      
      $ find tests/*data tests/*out -name '*.xml' | \
        xargs sed -i 's/<\(memory\|currentMemory\|hard_limit\|soft_limit\|min_guarantee\|swap_hard_limit\)>/<\1 unit='"'KiB'>/"
      $ find tests/*data tests/*out -name '*.xml' | \
        xargs sed -i 's/<\(capacity\|allocation\|available\)>/<\1 unit='"'bytes'>/"
      
      followed by a few fixes for the stragglers.
      
      Note that with this patch, the RNG for <memory> still forbids
      validation of anything except unit='KiB', since the code silently
      ignores the attribute; a later patch will expand <memory> to allow
      scaled input in the code and update the RNG to match.
      
      * docs/schemas/basictypes.rng (unit): Add 'bytes'.
      (scaledInteger): New define.
      * docs/schemas/storagevol.rng (sizing): Use it.
      * docs/schemas/storagepool.rng (sizing): Likewise.
      * docs/schemas/domaincommon.rng (memoryKBElement): New define; use
      for memory elements.
      * src/conf/storage_conf.c (virStoragePoolDefFormat)
      (virStorageVolDefFormat): Likewise.
      * src/conf/domain_conf.h (_virDomainDef): Document unit used
      internally.
      * src/conf/storage_conf.h (_virStoragePoolDef, _virStorageVolDef):
      Likewise.
      * tests/*data/*.xml: Update all tests.
      * tests/*out/*.xml: Likewise.
      * tests/define-dev-segfault: Likewise.
      * tests/openvzutilstest.c (testReadNetworkConf): Likewise.
      * tests/qemuargv2xmltest.c (blankProblemElements): Likewise.
      26545784
  7. 06 3月, 2012 2 次提交
    • L
      qemu: support type='hostdev' network devices at domain start · 8639a420
      Laine Stump 提交于
      This patch makes sure that each network device ("interface") of
      type='hostdev' appears on both the hostdevs list and the nets list of
      the virDomainDef, and it modifies the qemu driver startup code so that
      these devices will be presented to qemu on the commandline as hostdevs
      rather than as network devices.
      
      It does not add support for hotplug of these type of devices, or code
      to honor the <mac address> or <virtualport> given in the config (both
      of those will be done in separate patches).
      
      Once each device is placed on both lists, much of what this patch does
      is modify places in the code that traverse all the device lists so
      that these hybrid devices are only acted on once - either along with
      the other hostdevs, or along with the other network interfaces. (In
      many cases, only one of the lists is traversed / a specific operation
      is performed on only one type of device. In those instances, the code
      can remain unchanged.)
      
      There is one special case - when building the commandline, interfaces
      are allowed to proceed all the way through
      networkAllocateActualDevice() before deciding to skip the rest of
      netdev-specific processing - this is so that (once we have support for
      networks with pools of hostdev devices) we can get the actual device
      allocated, then rely on the loop processing all hostdevs to generate
      the correct commandline.
      
      (NB: <interface type='hostdev'> is only supported for PCI network
      devices that are SR-IOV Virtual Functions (VF). Standard PCI[e] and
      USB devices, and even the Physical Functions (PF) of SR-IOV devices
      can only be assigned to a guest using the more basic <hostdev> device
      entry. This limitation is mostly due to the fact that non-SR-IOV
      ethernet devices tend to lose mac address configuration whenever the
      card is reset, which happens when a card is assigned to a guest;
      SR-IOV VFs fortunately don't suffer the same problem.)
      8639a420
    • L
      conf: parse/format type='hostdev' network interfaces · 3b1c191f
      Laine Stump 提交于
      This is the new interface type that sets up an SR-IOV PCI network
      device to be assigned to the guest with PCI passthrough after
      initializing some network device-specific things from the config
      (e.g. MAC address, virtualport profile parameters). Here is an example
      of the syntax:
      
        <interface type='hostdev' managed='yes'>
          <source>
            <address type='pci' domain='0' bus='0' slot='4' function='3'/>
          </source>
          <mac address='00:11:22:33:44:55'/>
          <address type='pci' domain='0' bus='0' slot='7' function='0'/>
        </interface>
      
      This would assign the PCI card from bus 0 slot 4 function 3 on the
      host, to bus 0 slot 7 function 0 on the guest, but would first set the
      MAC address of the card to 00:11:22:33:44:55.
      
      NB: The parser and formatter don't care if the PCI card being
      specified is a standard single function network adapter, or a virtual
      function (VF) of an SR-IOV capable network adapter, but the upcoming
      code that implements the back end of this config will work *only* with
      SR-IOV VFs. This is because modifying the mac address of a standard
      network adapter prior to assigning it to a guest is pointless - part
      of the device reset that occurs during that process will reset the MAC
      address to the value programmed into the card's firmware.
      
      Although it's not supported by any of libvirt's hypervisor drivers,
      usb network hostdevs are also supported in the parser and formatter
      for completeness and consistency. <source> syntax is identical to that
      for plain <hostdev> devices, except that the <address> element should
      have "type='usb'" added if bus/device are specified:
      
        <interface type='hostdev'>
          <source>
            <address type='usb' bus='0' device='4'/>
          </source>
          <mac address='00:11:22:33:44:55'/>
        </interface>
      
      If the vendor/product form of usb specification is used, type='usb'
      is implied:
      
        <interface type='hostdev'>
          <source>
            <vendor id='0x0012'/>
            <product id='0x24dd'/>
          </source>
          <mac address='00:11:22:33:44:55'/>
        </interface>
      
      Again, the upcoming patch to fill in the backend of this functionality
      will log an error and fail with "Unsupported Config" if you actually
      try to assign a USB network adapter to a guest using <interface
      type='hostdev'> - just use a standard <hostdev> entry in that case
      (and also for single-port PCI adapters).
      3b1c191f
  8. 02 3月, 2012 1 次提交
    • E
      build: use correct type for pid and similar types · 3e2c3d8f
      Eric Blake 提交于
      No thanks to 64-bit windows, with 64-bit pid_t, we have to avoid
      constructs like 'int pid'.  Our API in libvirt-qemu cannot be
      changed without breaking ABI; but then again, libvirt-qemu can
      only be used on systems that support UNIX sockets, which rules
      out Windows (even if qemu could be compiled there) - so for all
      points on the call chain that interact with this API decision,
      we require a different variable name to make it clear that we
      audited the use for safety.
      
      Adding a syntax-check rule only solves half the battle; anywhere
      that uses printf on a pid_t still needs to be converted, but that
      will be a separate patch.
      
      * cfg.mk (sc_correct_id_types): New syntax check.
      * src/libvirt-qemu.c (virDomainQemuAttach): Document why we didn't
      use pid_t for pid, and validate for overflow.
      * include/libvirt/libvirt-qemu.h (virDomainQemuAttach): Tweak name
      for syntax check.
      * src/vmware/vmware_conf.c (vmwareExtractPid): Likewise.
      * src/driver.h (virDrvDomainQemuAttach): Likewise.
      * tools/virsh.c (cmdQemuAttach): Likewise.
      * src/remote/qemu_protocol.x (qemu_domain_attach_args): Likewise.
      * src/qemu_protocol-structs (qemu_domain_attach_args): Likewise.
      * src/util/cgroup.c (virCgroupPidCode, virCgroupKillInternal):
      Likewise.
      * src/qemu/qemu_command.c(qemuParseProcFileStrings): Likewise.
      (qemuParseCommandLinePid): Use pid_t for pid.
      * daemon/libvirtd.c (daemonForkIntoBackground): Likewise.
      * src/conf/domain_conf.h (_virDomainObj): Likewise.
      * src/probes.d (rpc_socket_new): Likewise.
      * src/qemu/qemu_command.h (qemuParseCommandLinePid): Likewise.
      * src/qemu/qemu_driver.c (qemudGetProcessInfo, qemuDomainAttach):
      Likewise.
      * src/qemu/qemu_process.c (qemuProcessAttach): Likewise.
      * src/qemu/qemu_process.h (qemuProcessAttach): Likewise.
      * src/uml/uml_driver.c (umlGetProcessInfo): Likewise.
      * src/util/virnetdev.h (virNetDevSetNamespace): Likewise.
      * src/util/virnetdev.c (virNetDevSetNamespace): Likewise.
      * tests/testutils.c (virtTestCaptureProgramOutput): Likewise.
      * src/conf/storage_conf.h (_virStoragePerms): Use mode_t, uid_t,
      and gid_t rather than int.
      * src/security/security_dac.c (virSecurityDACSetOwnership): Likewise.
      * src/conf/storage_conf.c (virStorageDefParsePerms): Avoid
      compiler warning.
      3e2c3d8f
  9. 29 2月, 2012 1 次提交
  10. 28 2月, 2012 4 次提交
    • O
      c4302486
    • O
      qemu: Build command line for the new address format · c56fe7f1
      Osier Yang 提交于
      For any disk controller model which is not "lsilogic", the command
      line will be like:
      
        -drive file=/dev/sda,if=none,id=drive-scsi0-0-3-0,format=raw \
        -device scsi-disk,bus=scsi0.0,channel=0,scsi-id=3,lun=0,i\
        drive=drive-scsi0-0-3-0,id=scsi0-0-3-0
      
      The relationship between the libvirt address attrs and the qdev
      properties are (controller model is not "lsilogic"; strings
      inside <> represent libvirt adress attrs):
        bus=scsi<controller>.0
        channel=<bus>
        scsi-id=<target>
        lun=<unit>
      
      * src/qemu/qemu_command.h: (New param "virDomainDefPtr def"
        for function qemuBuildDriveDevStr; new param "virDomainDefPtr
        vmdef" for function qemuAssignDeviceDiskAlias. Both for
        virDomainDiskFindControllerModel's use).
      
      * src/qemu/qemu_command.c:
        - New param "virDomainDefPtr def" for qemuAssignDeviceDiskAliasCustom.
          For virDomainDiskFindControllerModel's use, if the disk bus is "scsi"
          and the controller model is not "lsilogic", "target" is one part of
          the alias name.
        - According change on qemuAssignDeviceDiskAlias and qemuBuildDriveDevStr
      
      * src/qemu/qemu_hotplug.c:
        - Changes to be consistent with declarations of qemuAssignDeviceDiskAlias
          qemuBuildDriveDevStr, and qemuBuildControllerDevStr.
      
      * tests/qemuxml2argvdata/qemuxml2argv-pseries-vio-user-assigned.args,
        tests/qemuxml2argvdata/qemuxml2argv-pseries-vio.args: Update the
        generated command line.
      c56fe7f1
    • O
      conf: Introduce new attribute for device address format · 4288b22f
      Osier Yang 提交于
      * src/conf/domain_conf.h: Add new member "target" to struct
        _virDomainDeviceDriveAddress.
      
      * src/conf/domain_conf.c: Parse and format "target"
      
      * Lots of tests (.xml) in tests/domainsnapshotxml2xmlout,
        tests/qemuxml2argvdata, tests/qemuxml2xmloutdata, and
        tests/vmx2xmldata/ are modified for newly introduced
        attribute "target" for address of "drive" type.
      4288b22f
    • J
      qemu: unescape HMP commands before converting them to json · f27f616f
      Josh Durgin 提交于
      QMP commands don't need to be escaped since converting them to json
      also escapes special characters. When a QMP command fails, however,
      libvirt falls back to HMP commands. These fallback functions
      (qemuMonitorText*) do their own escaping, and pass the result directly
      to qemuMonitorHMPCommandWithFd. If the monitor is in json mode, these
      pre-escaped commands will be escaped again when converted to json,
      which can result in the wrong arguments being sent.
      
      For example, a filename test\file would be sent in json as
      test\\file.
      
      This prevented attaching an image file with a " or \ in its name in
      qemu 1.0.50, and also broke rbd attachment (which uses backslashes to
      escape some internal arguments.)
      Reported-by: NMasuko Tomoya <tomoya.masuko@gmail.com>
      Signed-off-by: NJosh Durgin <josh.durgin@dreamhost.com>
      Signed-off-by: NEric Blake <eblake@redhat.com>
      f27f616f
  11. 25 2月, 2012 1 次提交
    • D
      Workaround python header file insanity · 1d4c4d9d
      Daniel P. Berrange 提交于
      The /usr/include/python/pyconfig.h file pollutes the global
      namespace with a huge number of HAVE_XXX and WITH_XXX
      defines. These change what we detected in our own config.h
      In particular if you try to build without DTrace, python's
      headers turn it back on with predictable fail.
      
      THe hack to workaround this is to rename WITH_DTRACE to
      WITH_DTRACE_PROBES to avoid the namespace clash
      1d4c4d9d
  12. 24 2月, 2012 1 次提交
    • J
      vmx: Better Workstation vmx handling · f246cdb5
      Jean-Baptiste Rouault 提交于
      This patch adds support for vmx files with empty networkName
      values (which is the case for vmx generated by Workstation).
      It also adds support for vmx containing NATed network interfaces.
      
      Update test suite accordingly
      f246cdb5
  13. 13 2月, 2012 2 次提交
  14. 10 2月, 2012 2 次提交
    • O
      npiv: Auto-generate WWN if it's not specified · 7c90026d
      Osier Yang 提交于
      The auto-generated WWN comply with the new addressing schema of WWN:
      
      <quote>
      the first nibble is either hex 5 or 6 followed by a 3-byte vendor
      identifier and 36 bits for a vendor-specified serial number.
      </quote>
      
      We choose hex 5 for the first nibble. And for the 3-bytes vendor ID,
      we uses the OUI according to underlying hypervisor type, (invoking
      virConnectGetType to get the virt type). e.g. If virConnectGetType
      returns "QEMU", we use Qumranet's OUI (00:1A:4A), if returns
      ESX|VMWARE, we use VMWARE's OUI (00:05:69). Currently it only
      supports qemu|xen|libxl|xenapi|hyperv|esx|vmware drivers. The last
      36 bits are auto-generated.
      7c90026d
    • M
      domain: add implicit USB controller · 42043afc
      Marc-André Lureau 提交于
      Some tools, such as virt-manager, prefers having the default USB
      controller explicit in the XML document. This patch makes sure there
      is one. With this patch, it is now possible to switch from USB1 to
      USB2 from the release 0.9.1 of virt-manager.
      
      Fix tests to pass with this change.
      42043afc
  15. 08 2月, 2012 2 次提交
    • J
      security: Driver 'none' cannot create confined guests · afb96301
      Jiri Denemark 提交于
      In case the caller specifies that confined guests are required but the
      security driver turns out to be 'none', we should return an error since
      this driver clearly cannot meet that requirement.  As a result of this
      error, libvirtd fails to start when the host admin explicitly sets
      confined guests are required but there is no security driver available.
      
      Since security driver 'none' cannot create confined guests, we override
      default confined setting so that hypervisor drivers do not thing they
      should create confined guests.
      afb96301
    • J
      seclabel: Do not output relabel attribute for type 'none' · f6957617
      Jiri Denemark 提交于
      Security label type 'none' requires relabel to be set to 'no' so there's
      no reason to output this extra attribute.  Moreover, since relabel is
      internally stored in a negative from (norelabel), the default value for
      relabel would be 'yes' in case there is no <seclabel> element in domain
      configuration.  In case VIR_DOMAIN_SECLABEL_DEFAULT turns into
      VIR_DOMAIN_SECLABEL_NONE, we would incorrectly output relabel='yes' for
      seclabel type 'none'.
      f6957617
  16. 07 2月, 2012 1 次提交
    • E
      seclabel: make code and RNG match · c052d8a8
      Eric Blake 提交于
      Commit b170eb99 introduced a bug: domains that had an explicit
      <seclabel type='none'/> when started would not be reparsed if
      libvirtd restarted.  It turns out that our testsuite was not
      exercising this because it never tried anything but inactive
      parsing.  Additionally, the live XML for such a domain failed
      to re-validate.  Applying just the tests/ portion of this patch
      will expose the bugs that are fixed by the other two files.
      
      * docs/schemas/domaincommon.rng (seclabel): Allow relabel under
      type='none'.
      * src/conf/domain_conf.c (virSecurityLabelDefParseXML): Per RNG,
      presence of <seclabel> with no type implies dynamic.  Don't
      require sub-elements for type='none'.
      * tests/qemuxml2xmltest.c (mymain): Add test.
      * tests/qemuxml2argvtest.c (mymain): Likewise.
      * tests/qemuxml2argvdata/qemuxml2argv-seclabel-none.xml: Add file.
      * tests/qemuxml2argvdata/qemuxml2argv-seclabel-none.args: Add file.
      Reported by Ansis Atteka.
      c052d8a8
  17. 06 2月, 2012 1 次提交
  18. 04 2月, 2012 4 次提交
    • E
      maint: consolidate several .gitignore files · 8f00276c
      Eric Blake 提交于
      Unlike .cvsignore under CVS, git allows for ignoring nested
      names.  We weren't very consistent where new tests were
      being ignored (some in .gitignore, some in tests/.gitignore),
      and I found it easier to just consolidate everything.
      
      * .gitignore: Subsume entries from subdirectories.
      * daemon/.gitignore: Delete.
      * docs/.gitignore: Likewise.
      * docs/devhelp/.gitignore: Likewise.
      * docs/html/.gitignore: Likewise.
      * examples/dominfo/.gitignore: Likewise.
      * examples/domsuspend/.gitignore: Likewise.
      * examples/hellolibvirt/.gitignore: Likewise.
      * examples/openauth/.gitignore: Likewise.
      * examples/domain-events/events-c/.gitignore: Likewise.
      * include/libvirt/.gitignore: Likewise.
      * src/.gitignore: Likewise.
      * src/esx/.gitignore: Likewise.
      * tests/.gitignore: Likewise.
      * tools/.gitignore: Likewise.
      8f00276c
    • E
      build: expand rule to cover testsuite · 8fe454ce
      Eric Blake 提交于
      The bulk of this patch was done with:
      
      sed -i 's/\(\bfree *(/VIR_FREE(/g' tests/*.c
      
      followed by fixing the few compile errors that resulted.
      
      * cfg.mk (exclude_file_name_regexp--sc_prohibit_raw_allocation):
      Remove tests from exemption.
      * tests/testutils.h: Add common header.
      * tests/commandhelper.c: Fix offenders.
      * tests/cputest.c: Likewise.
      * tests/domainsnapshotxml2xmltest.c: Likewise.
      * tests/interfacexml2xmltest.c: Likewise.
      * tests/networkxml2argvtest.c: Likewise.
      * tests/networkxml2xmltest.c: Likewise.
      * tests/nodedevxml2xmltest.c: Likewise.
      * tests/nodeinfotest.c: Likewise.
      * tests/nwfilterxml2xmltest.c: Likewise.
      * tests/qemuargv2xmltest.c: Likewise.
      * tests/qemuxml2argvtest.c: Likewise.
      * tests/qemuxml2xmltest.c: Likewise.
      * tests/qemuxmlnstest.c: Likewise.
      * tests/qparamtest.c: Likewise.
      * tests/sexpr2xmltest.c: Likewise.
      * tests/storagepoolxml2xmltest.c: Likewise.
      * tests/storagevolxml2xmltest.c: Likewise.
      * tests/testutils.c: Likewise.
      * tests/virshtest.c: Likewise.
      * tests/xencapstest.c: Likewise.
      * tests/xmconfigtest.c: Likewise.
      * tests/xml2sexprtest.c: Likewise.
      8fe454ce
    • E
      build: clean up CPPFLAGS/INCLUDES usage · cb33ee1f
      Eric Blake 提交于
      Our syntax checker missed all-lower-case variables (this will
      be fixed by the next .gnulib update).  Additionally, anywhere
      that we mix in-tree files with generated files, automake recommends
      listing builddir prior to srcdir for VPATH builds.
      
      * src/Makefile.am (*_la_CFLAGS): Favor $(top_srcdir).
      (INCLUDES): Likewise, and follow automake recommendations on
      builddir before srcdir.
      * python/Makefile.am (INCLUDES): Swap directory order.
      * tests/Makefile.am (INCLUDES): Likewise.
      * tools/Makefile.am (INCLUDES): Likewise.
      * daemon/Makefile.am (INCLUDES): Likewise.
      (libvirtd.init, libvirtd.service): Favor $().
      * examples/hellolibvirt/Makefile.am (hellolibvirt_LDADD):
      Likewise.
      * examples/openauth/Makefile.am (openauth_LDADD): Likewise.
      * examples/dominfo/Makefile.am (INCLUDES): Drop dead include.
      * examples/domsuspend/Makefile.am (INCLUDES): Likewise.
      cb33ee1f
    • E
      command: allow merging stdout and stderr in string capture · c9ace552
      Eric Blake 提交于
      Sometimes, its easier to run children with 2>&1 in shell notation,
      and just deal with stdout and stderr interleaved.  This was already
      possible for fd handling; extend it to also work when doing string
      capture of a child process.
      
      * docs/internals/command.html.in: Document this.
      * src/util/command.c (virCommandSetErrorBuffer): Likewise.
      (virCommandRun, virExecWithHook): Implement it.
      * tests/commandtest.c (test14): Test it.
      * daemon/remote.c (remoteDispatchAuthPolkit): Use new command
      feature.
      c9ace552