1. 10 5月, 2013 2 次提交
    • E
      tests: use portable shell code · 1d21b884
      Eric Blake 提交于
      'make check' fails since commit 470d5c46 on any system with dash
      as /bin/sh, because '<<<' is a bash extension.  For example:
      
      nwfilterschematest: 23: /home/eblake/libvirt/tests/schematestutils.sh: Syntax error: redirection unexpected
      
      Also, there is no need to spawn a grep process when shell globbing
      can do the same.
      
      * tests/schematestutils.sh: Replace bashism and subprocess with a
      faster and portable construct.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      1d21b884
    • D
      Disable some URI tests on older libxml2 · 7c5752dd
      Daniel P. Berrange 提交于
      Older versions of libxml2 could not correctly parse certain
      URIs. This causes test failures. There's nothing libvirt can
      do about this, so disable the problem tests on old libxml2
      versions
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      7c5752dd
  2. 09 5月, 2013 2 次提交
  3. 07 5月, 2013 2 次提交
    • D
      rpc: message related sizes enlarged · e914dcfd
      Daniel Hansel 提交于
      We have seen an issue on s390x platform where domain XMLs larger than 1MB
      were used. The define command was finished successfully. The dumpxml command
      was not successful (i.e. could not encode message payload).
      
      Enlarged message related sizes (e.g. maximum string size, message size, etc.)
      to handle larger system configurations used on s390x platform.
      
      To improve handling of the RPC message size the allocation during encode process
      is changed to a dynamic one (i.e. starting with 64kB initial size and increasing
      that size in steps up to 16MB if the payload data is larger).
      Signed-off-by: NDaniel Hansel <daniel.hansel@linux.vnet.ibm.com>
      Signed-off-by: NViktor Mihajlovski <mihajlov@linux.vnet.ibm.com>
      e914dcfd
    • E
      build: clean up stray files found by 'make distcheck' · c21c38d7
      Eric Blake 提交于
      'make distcheck' complained:
      
      ERROR: files left in build directory after distclean:
      ./python/libvirt.pyc
      ./tests/commandhelper.log
      
      Problems introduced in commits f0154959 and 25ea8e47 (both v1.0.3).
      
      * tests/commandtest.c (test21): Check (and clean) log file.
      * tests/commanddata/test21.log: New file.
      * python/Makefile.am (CLEANFILES): Clean up compiled python files.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      c21c38d7
  4. 03 5月, 2013 1 次提交
  5. 02 5月, 2013 1 次提交
    • M
      virutil: Move string related functions to virstring.c · 7c9a2d88
      Michal Privoznik 提交于
      The source code base needs to be adapted as well. Some files
      include virutil.h just for the string related functions (here,
      the include is substituted to match the new file), some include
      virutil.h without any need (here, the include is removed), and
      some require both.
      7c9a2d88
  6. 01 5月, 2013 1 次提交
    • V
      S390: Do not generate a default USB controller · 3a82f628
      Viktor Mihajlovski 提交于
      For s390 we don't want to have a default USB device generated even
      if QEMU is silently tolerating -usb on the command line. This may change
      in the future.
      Another reason to avoid the USB controller is that it implies a PCI
      bus which might cause a regression at some later point in time.
      The following change will set the USB controller model to 'none'
      unless a model or address has been specified, which can be the case
      if a legacy definition is loaded or the XML writer knows what
      she/he's doing.
      Requiring the user to explicitly disable USB on systems not supporting
      it seems cumbersome.
      Signed-off-by: NViktor Mihajlovski <mihajlov@linux.vnet.ibm.com>
      3a82f628
  7. 29 4月, 2013 1 次提交
  8. 27 4月, 2013 3 次提交
    • J
      qemu: don't always reserve PCI addresses for implicit controllers · 877bc089
      Ján Tomko 提交于
      In the past we automatically added a USB controller and assigned
      it a PCI address (0:0:1.2) even on machines without a PCI bus.
      This didn't break machines with no PCI bus  because the command
      line for it is just '-usb', with no mention of the PCI bus.
      
      The implicit IDE controller (reserved address 0:0:1.1) has
      no command line at all.
      
      Commit b33eb0dc removed the ability to reserve PCI addresses
      on machines without a PCI bus. This made them stop working,
      since there would always be the implicit USB controller.
      
      Skip the reservation of addresses for these controllers when
      there is no PCI bus, instead of failing.
      877bc089
    • L
      network: support <driver name='vfio'/> in network definitions · d64e114f
      Laine Stump 提交于
      I remembered to document this bit, but somehow forgot to implement it.
      
      This adds <driver name='kvm|vfio'/> as a subelement to the <forward>
      element of a network (this puts it parallel to the match between
      mode='hostdev' attribute in a network and type='hostdev' in an
      <interface>).
      
      Since it's already documented, only the parser, formatter, backend
      driver recognition (it just translates/moves the flag into the
      <interface> at the appropriate time), and a test case were needed.
      
      (I used a separate enum for the values both because the original is
      defined in domain_conf.h, which is unavailable from network_conf.h,
      and because in the future it's possible that we may want to support
      other non-hostdev oriented driver names in the network parser; this
      makes sure that one can be expanded without the other).
      d64e114f
    • J
      qemu: don't assign a PCI address to 'none' USB controller · a12475bd
      Ján Tomko 提交于
      Adjust the usb-none test, since it gives the memballoon a lower PCI slot now.
      Add a test for 'none' controller on s390, which doesn't have PCI buses.
      a12475bd
  9. 26 4月, 2013 5 次提交
    • D
      Do proper escaping of cgroup resource partitions · f3662737
      Daniel P. Berrange 提交于
      If a user cgroup name begins with "cgroup.", "_" or with any of
      the controllers from /proc/cgroups followed by a dot, then they
      need to be prefixed with a single underscore. eg if there is
      an object "cpu.service", then this would end up as "_cpu.service"
      in the cgroup filesystem tree, however, "waldo.service" would
      stay "waldo.service", at least as long as nobody comes up with
      a cgroup controller called "waldo".
      
      Since we require a '.XXXX' suffix on all partitions, there is
      no scope for clashing with the kernel 'tasks' and 'release_agent'
      files.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      f3662737
    • D
      Ensure all cgroup partitions have a suffix of ".partition" · 9ddfe7ee
      Daniel P. Berrange 提交于
      If the partition named passed in the XML does not already have
      a suffix, ensure it gets a '.partition' added to each component.
      The exceptions are /machine, /user and /system which do not need
      to have a suffix, since they are fixed partitions at the top
      level.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      9ddfe7ee
    • D
      Change VM cgroup suffix from '{lxc,qemu}.libvirt' to 'libvirt-{lxc,qemu}' · 824e86e7
      Daniel P. Berrange 提交于
      Recently we changed to create VM cgroups with the naming pattern
      $VMNAME.$DRIVER.libvirt. Following discussions with the systemd
      community it was decided that only having a single '.' in the
      names is preferrable. So this changes the naming scheme to be
      $VMNAME.libvirt-$DRIVER. eg for LXC 'mycontainer.libvirt-lxc' or
      for KVM 'myvm.libvirt-qemu'.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      824e86e7
    • S
      test: Add JSON test for query-tpm-types · 7e77f252
      Stefan Berger 提交于
      Add a test case for query-tpm-models QMP command.
      Signed-off-by: NStefan Berger <stefanb@linux.vnet.ibm.com>
      7e77f252
    • L
      qemu: use vfio-pci on commandline when appropriate · 731b0f36
      Laine Stump 提交于
      The device option for vfio-pci is nearly identical to that for
      pci-assign - only the configfd parameter isn't supported (or needed).
      
      Checking for presence of the bootindex parameter is done separately
      from constructing the commandline, similar to how it is done for
      pci-assign.
      
      This patch contains tests to check for proper commandline
      construction. It also includes tests for parser-formatter-parser
      roundtrips (xml2xml), because those tests use the same data files, and
      would have failed had they been included before now.
      
      qemu: xml/args tests for VFIO hostdev and <interface type='hostdev'/>
      
      These should be squashed in with the patch that adds commandline
      handling of vfio (they would fail at any earlier time).
      731b0f36
  10. 25 4月, 2013 7 次提交
  11. 24 4月, 2013 7 次提交
  12. 20 4月, 2013 1 次提交
    • E
      docs: fix usage of 'onto' · 1bf25ba2
      Eric Blake 提交于
      http://www.uhv.edu/ac/newsletters/writing/grammartip2009.07.01.htm
      (and several other sites) give hints that 'onto' is best used if
      you can also add 'up' just before it and still make sense. In many
      cases in the code base, we really want the two-word form, or even
      a simplification to just 'on' or 'to'.
      
      * docs/hacking.html.in: Use correct 'on to'.
      * python/libvirt-override.c: Likewise.
      * src/lxc/lxc_controller.c: Likewise.
      * src/util/virpci.c: Likewise.
      * daemon/THREADS.txt: Use simpler 'on'.
      * docs/formatdomain.html.in: Better usage.
      * docs/internals/rpc.html.in: Likewise.
      * src/conf/domain_event.c: Likewise.
      * src/rpc/virnetclient.c: Likewise.
      * tests/qemumonitortestutils.c: Likewise.
      * HACKING: Regenerate.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      1bf25ba2
  13. 19 4月, 2013 1 次提交
  14. 18 4月, 2013 1 次提交
  15. 17 4月, 2013 2 次提交
    • O
      qemu: Allow the disk wwn to have "0x" prefix · 09d2547f
      Osier Yang 提交于
      The recent qemu requires "0x" prefix for the disk wwn, this patch
      changes virValidateWWN to allow the prefix, and prepend "0x" if
      it's not specified. E.g.
      
      qemu-kvm: -device scsi-hd,bus=scsi0.0,channel=0,scsi-id=0,lun=0,\
      drive=drive-scsi0-0-0-0,id=scsi0-0-0-0,wwn=6000c60016ea71ad:
      Property 'scsi-hd.wwn' doesn't take value '6000c60016ea71ad'
      
      Though it's a qemu regression, but it's nice to allow the prefix,
      and doesn't hurt for us to always output "0x".
      09d2547f
    • O
      cleanup: Only include testutils.h once · 2beae9c2
      Osier Yang 提交于
      No reason to include it in both "if" and "else" branches.
      2beae9c2
  16. 16 4月, 2013 3 次提交
    • J
      Resolve valgrind error · c3ad5a36
      John Ferlan 提交于
      Commit id '1acfc171' resulted in the following valgrind failure:
      
      ==25317== 136 (24 direct, 112 indirect) bytes in 1 blocks are definitely lost in loss record 4 of 4
      ==25317==    at 0x4A06B6F: calloc (vg_replace_malloc.c:593)
      ==25317==    by 0x4C6F851: virAlloc (viralloc.c:124)
      ==25317==    by 0x4C71493: virBitmapNew (virbitmap.c:74)
      ==25317==    by 0x4C71B79: virBitmapNewData (virbitmap.c:434)
      ==25317==    by 0x402EF2: test8 (virbitmaptest.c:436)
      ==25317==    by 0x40499F: virtTestRun (testutils.c:157)
      ==25317==    by 0x402E8D: mymain (virbitmaptest.c:474)
      ==25317==    by 0x404FDA: virtTestMain (testutils.c:719)
      ==25317==    by 0x39D0821A04: (below main) (in /usr/lib64/libc-2.16.so)
      c3ad5a36
    • D
      Track symlinks for co-mounted cgroup controllers · 83336118
      Daniel P. Berrange 提交于
      If a cgroup controller is co-mounted with another, eg
      
         /sys/fs/cgroup/cpu,cpuacct
      
      Then it is a requirement that there exist symlinks at
      
         /sys/fs/cgroup/cpu
         /sys/fs/cgroup/cpuacct
      
      pointing to the real mount point. Add support to virCgroupPtr
      to detect and track these symlinks
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      83336118
    • D
      Remove non-functional code for setting up non-root cgroups · 767596bd
      Daniel P. Berrange 提交于
      The virCgroupNewDriver method had a 'bool privileged' param.
      If a false value was ever passed in, it would simply not
      work, since non-root users don't have any privileges to create
      new cgroups. Just delete this broken code entirely and make
      the QEMU driver skip cgroup setup in non-privileged mode
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      767596bd