1. 07 10月, 2015 1 次提交
  2. 22 9月, 2015 2 次提交
  3. 15 9月, 2015 1 次提交
  4. 24 4月, 2015 1 次提交
  5. 21 4月, 2015 1 次提交
    • C
      domain: conf: Drop expectedVirtTypes · 835cf84b
      Cole Robinson 提交于
      This needs to specified in way too many places for a simple validation
      check. The ostype/arch/virttype validation checks later in
      DomainDefParseXML should catch most of the cases that this was covering.
      835cf84b
  6. 02 4月, 2015 1 次提交
  7. 27 1月, 2015 1 次提交
  8. 15 1月, 2015 1 次提交
  9. 14 1月, 2015 1 次提交
    • D
      Give virDomainDef parser & formatter their own flags · 0ecd6851
      Daniel P. Berrange 提交于
      The virDomainDefParse* and virDomainDefFormat* methods both
      accept the VIR_DOMAIN_XML_* flags defined in the public API,
      along with a set of other VIR_DOMAIN_XML_INTERNAL_* flags
      defined in domain_conf.c.
      
      This is seriously confusing & error prone for a number of
      reasons:
      
       - VIR_DOMAIN_XML_SECURE, VIR_DOMAIN_XML_MIGRATABLE and
         VIR_DOMAIN_XML_UPDATE_CPU are only relevant for the
         formatting operation
       - Some of the VIR_DOMAIN_XML_INTERNAL_* flags only apply
         to parse or to format, but not both.
      
      This patch cleanly separates out the flags. There are two
      distint VIR_DOMAIN_DEF_PARSE_* and VIR_DOMAIN_DEF_FORMAT_*
      flags that are used by the corresponding methods. The
      VIR_DOMAIN_XML_* flags received via public API calls must
      be converted to the VIR_DOMAIN_DEF_FORMAT_* flags where
      needed.
      
      The various calls to virDomainDefParse which hardcoded the
      use of the VIR_DOMAIN_XML_INACTIVE flag change to use the
      VIR_DOMAIN_DEF_PARSE_INACTIVE flag.
      0ecd6851
  10. 26 3月, 2014 1 次提交
    • M
      qemuDomainAttachDeviceFlags: Parse device xml as inactive · 220c0031
      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>
      220c0031
  11. 25 3月, 2014 1 次提交
  12. 19 3月, 2014 1 次提交
    • N
      qemuhotplugtest: Fix mem-leaking testcases · 0ab0f7e3
      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>
      0ab0f7e3
  13. 10 12月, 2013 1 次提交
  14. 08 10月, 2013 1 次提交
  15. 01 10月, 2013 1 次提交
  16. 02 9月, 2013 1 次提交
  17. 26 8月, 2013 10 次提交
  18. 18 7月, 2013 2 次提交
  19. 16 7月, 2013 1 次提交
    • M
      qemuhotplugtest: Introduce test for chardev hotplug · 9e45b3df
      Michal Privoznik 提交于
      The test is currently testing just device update function. However,
      chardev hotplug is implemented just for device attach and detach. This
      fact means, the test needs to be rewritten (the majority of the code is
      still shared). Moreover, we are now able to pass VM among multiple test
      runs. So for instance, while we add a device in the first run, we can
      remove it in the second run.
      9e45b3df
  20. 25 6月, 2013 1 次提交