1. 17 4月, 2015 1 次提交
  2. 02 4月, 2015 1 次提交
    • J
      Fix xlconfigtest with older libxl · b84c5729
      Ján Tomko 提交于
      Commit cd5dc303 added this test, but it fails if
      LIBXL_HAVE_BUILDINFO_USBDEVICE_LIST is not defined:
      
      6) Xen XM-2-XML Format fullvirt-multiusb
      ... libvirt:  error : unsupported configuration: multiple USB
      devices not supported
      FAILED
      b84c5729
  3. 14 3月, 2015 1 次提交
  4. 21 1月, 2015 1 次提交
    • J
      tests: fix xlconfigtest build failure · e274d588
      Jim Fehlig 提交于
      When libvirt is configured --without-xen, building the xlconfigtest
      fails with
      
        CCLD   xlconfigtest
        /usr/lib/gcc/x86_64-linux-gnu/4.7/../../../x86_64-linux-gnu/crt1.o
        In function `_start': (.text+0x20): undefined reference to `main'
        collect2: error: ld returned 1 exit status
      
      Introduced in commit 4ed5fb91 by too much copy and paste from
      xmconfigtest.
      e274d588
  5. 14 1月, 2015 2 次提交
    • K
      tests: Tests for the xen-xl parser · 4ed5fb91
      Kiarie Kahurani 提交于
      Add disk and spice config tests for the xen_xl config parser
      Signed-off-by: NKiarie Kahurani <davidkiarie4@gmail.com>
      Signed-off-by: NJim Fehlig <jfehlig@suse.com>
      4ed5fb91
    • 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
  6. 05 1月, 2015 1 次提交
    • C
      Add tests to xmconfigtest · 262d913f
      Chunyan Liu 提交于
      Add tests to testing HVM default features (pae, acpi, apic)
      conversion from xm config to libvirt xml. If no pae|acpi|apic
      specified in xm config, after conversion, libvirt xml should
      by default include:
       <features>
         <pae/>
         <apic/>
         <acpi/>
       </features>
      Signed-off-by: NChunyan Liu <cyliu@suse.com>
      262d913f
  7. 19 8月, 2014 1 次提交
  8. 25 3月, 2014 1 次提交
  9. 18 3月, 2014 1 次提交
  10. 11 1月, 2014 1 次提交
  11. 08 10月, 2013 1 次提交
  12. 10 7月, 2013 1 次提交
  13. 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
  14. 05 4月, 2013 3 次提交
    • P
      virCaps: get rid of defaultConsoleTargetType callback · 482e5f15
      Peter Krempa 提交于
      This patch refactors various places to allow removing of the
      defaultConsoleTargetType callback from the virCaps structure.
      
      A new console character device target type is introduced -
      VIR_DOMAIN_CHR_CONSOLE_TARGET_TYPE_NONE - to mark that no type was
      specified in the XML. This type is at the end converted to the standard
      VIR_DOMAIN_CHR_CONSOLE_TARGET_TYPE_SERIAL. Other types that are
      different from this default have to be processed separately in the
      device post parse callback.
      482e5f15
    • P
      conf callback: Rearrange function parameters · ad0d10b2
      Peter Krempa 提交于
      Move the xmlopt and caps arguments to the end of the argument list.
      ad0d10b2
    • P
      maint: Rename xmlconf to xmlopt and virDomainXMLConfig to virDomainXMLOption · e84b1931
      Peter Krempa 提交于
      This patch is the result of running:
      
      for i in $(git ls-files | grep -v html | grep -v \.po$ ); do
        sed -i -e "s/virDomainXMLConf/virDomainXMLOption/g" -e "s/xmlconf/xmlopt/g" $i
      done
      
      and a few manual tweaks.
      e84b1931
  15. 13 3月, 2013 1 次提交
    • P
      virCaps: conf: start splitting out irrelevat data · 27cf98e2
      Peter Krempa 提交于
      The virCaps structure gathered a ton of irrelevant data over time that.
      The original reason is that it was propagated to the XML parser
      functions.
      
      This patch aims to create a new data structure virDomainXMLConf that
      will contain immutable data that are used by the XML parser. This will
      allow two things we need:
      
      1) Get rid of the stuff from virCaps
      
      2) Allow us to add callbacks to check and add driver specific stuff
      after domain XML is parsed.
      
      This first attempt removes pointers to private data allocation functions
      to this new structure and update all callers and function that require
      them.
      27cf98e2
  16. 08 2月, 2013 1 次提交
  17. 21 12月, 2012 1 次提交
  18. 21 9月, 2012 1 次提交
  19. 07 8月, 2012 1 次提交
    • D
      Convert public datatypes to inherit from virObject · 46ec5f85
      Daniel P. Berrange 提交于
      This converts the following public API datatypes to use the
      virObject infrastructure:
      
        virConnectPtr
        virDomainPtr
        virDomainSnapshotPtr
        virInterfacePtr
        virNetworkPtr
        virNodeDevicePtr
        virNWFilterPtr
        virSecretPtr
        virStreamPtr
        virStorageVolPtr
        virStoragePoolPtr
      
      The code is significantly simplified, since the mutex in the
      virConnectPtr object now only needs to be held when accessing
      the per-connection virError object instance. All other operations
      are completely lock free.
      
      * src/datatypes.c, src/datatypes.h, src/libvirt.c: Convert
        public datatypes to use virObject
      * src/conf/domain_event.c, src/phyp/phyp_driver.c,
        src/qemu/qemu_command.c, src/qemu/qemu_migration.c,
        src/qemu/qemu_process.c, src/storage/storage_driver.c,
        src/vbox/vbox_tmpl.c, src/xen/xend_internal.c,
        tests/qemuxml2argvtest.c, tests/qemuxmlnstest.c,
        tests/sexpr2xmltest.c, tests/xmconfigtest.c: Convert
        to use virObjectUnref/virObjectRef
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      46ec5f85
  20. 23 7月, 2012 1 次提交
    • O
      Desert the FSF address in copyright · f9ce7dad
      Osier Yang 提交于
      Per the FSF address could be changed from time to time, and GNU
      recommends the following now: (http://www.gnu.org/licenses/gpl-howto.html)
      
        You should have received a copy of the GNU General Public License
        along with Foobar.  If not, see <http://www.gnu.org/licenses/>.
      
      This patch removes the explicit FSF address, and uses above instead
      (of course, with inserting 'Lesser' before 'General').
      
      Except a bunch of files for security driver, all others are changed
      automatically, the copyright for securify files are not complete,
      that's why to do it manually:
      
        src/security/security_selinux.h
        src/security/security_driver.h
        src/security/security_selinux.c
        src/security/security_apparmor.h
        src/security/security_apparmor.c
        src/security/security_driver.c
      f9ce7dad
  21. 27 3月, 2012 1 次提交
    • M
      Cleanup for a return statement in source files · 9943276f
      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_'
      9943276f
  22. 04 2月, 2012 1 次提交
    • 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
  23. 12 7月, 2011 1 次提交
    • M
      Add domain type checking · aa14709a
      Matthias Bolte 提交于
      The drivers were accepting domain configs without checking if those
      were actually meant for them. For example the LXC driver happily
      accepts configs with type QEMU.
      
      Add a check for the expected domain types to the virDomainDefParse*
      functions.
      aa14709a
  24. 11 5月, 2011 1 次提交
    • P
      xen: parse and generate hpet item in sxpr · e547e44c
      Paolo Bonzini 提交于
      Recent versions of Xen disable the virtual HPET by default.  This is
      usually more precise because tick policies are not implemented for
      the HPET in Xen.  However, there may be several reasons to control
      the HPET manually: 1) to test the emulation; 2) because distros may
      provide the knob while leaving the default to "enabled" for compatibility
      reasons.
      
      This patch provides support for the hpet item in both sexpr and xm
      formats, and translates it to a <timer> element.
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      e547e44c
  25. 03 5月, 2011 1 次提交
    • E
      tests: avoid compiler warning · 0620e83d
      Eric Blake 提交于
      ../../tests/xmconfigtest.c: In function 'testCompareParseXML':
      ../../tests/xmconfigtest.c:49:19: error: 'conn' may be used uninitialized in this function [-Wuninitialized]
      
      * tests/xmconfigtest.c (testCompareParseXML): Initialize variable.
      0620e83d
  26. 01 5月, 2011 1 次提交
    • M
      tests: Lower stack usage below 4096 bytes · 9ba4eb3c
      Matthias Bolte 提交于
      Make virtTestLoadFile allocate the buffer to read the file into.
      
      Fix logic error in virtTestLoadFile, stop reading on the first empty line.
      
      Use virFileReadLimFD in virtTestCaptureProgramOutput to avoid manual
      buffer handling.
      9ba4eb3c
  27. 30 4月, 2011 1 次提交
    • E
      tests: simplify common setup · 20986e58
      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.
      20986e58
  28. 26 2月, 2011 1 次提交
    • M
      Add support for multiple serial ports into the Xen driver · 3ee7cf6c
      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>
      3ee7cf6c
  29. 22 2月, 2011 3 次提交
  30. 20 10月, 2010 1 次提交
    • E
      vcpu: improve vcpu support in xen command line · 0fab10e5
      Eric Blake 提交于
      This patch series focuses on xendConfigVersion 2 (xm_internal) and 3
      (xend_internal), but leaves out changes for xenapi drivers.
      
      See this link for more details about vcpu_avail for xm usage.
      http://lists.xensource.com/archives/html/xen-devel/2009-11/msg01061.html
      
      This relies on the fact that def->maxvcpus can be at most 32 with xen.
      
      * src/xen/xend_internal.c (xenDaemonParseSxpr)
      (sexpr_to_xend_domain_info, xenDaemonFormatSxpr): Use vcpu_avail
      when current vcpus is less than maximum.
      * src/xen/xm_internal.c (xenXMDomainConfigParse)
      (xenXMDomainConfigFormat): Likewise.
      * tests/xml2sexprdata/xml2sexpr-pv-vcpus.sexpr: New file.
      * tests/sexpr2xmldata/sexpr2xml-pv-vcpus.sexpr: Likewise.
      * tests/sexpr2xmldata/sexpr2xml-pv-vcpus.xml: Likewise.
      * tests/xmconfigdata/test-paravirt-vcpu.cfg: Likewise.
      * tests/xmconfigdata/test-paravirt-vcpu.xml: Likewise.
      * tests/xml2sexprtest.c (mymain): New test.
      * tests/sexpr2xmltest.c (mymain): Likewise.
      * tests/xmconfigtest.c (mymain): Likewise.
      0fab10e5
  31. 24 8月, 2010 1 次提交
    • J
      xen tests: Fix PV-VFB tests with RHEL-5 API · bb6543aa
      Jiri Denemark 提交于
      RHEL-5 Xen doesn't support the old style vnc configuration. In sexpr, we
      can't really check it with rhel5-api turned on. However, for XM
      configuration files it's sufficient to use cfg version 1 instead of 2.
      bb6543aa
  32. 18 3月, 2010 1 次提交
    • E
      maint: make Red Hat copyright notices consistent · 0a336335
      Eric Blake 提交于
      Spell out 'Red Hat, Inc.':
       git grep -i 'Copyright.*Red Hat' | grep -v Inc
      
      Include (C) consistently:
       git grep -i 'Copyright [^(].*Red Hat'
      
      * src/lxc/lxc_container.c: Update copyright formatting.
      * src/node_device/node_device_udev.c: Likewise.
      * src/node_device/node_device_udev.h: Likewise.
      * src/xen/xend_internal.h: Likewise.
      * src/xen/xm_internal.c: Likewise.
      * src/xen/xm_internal.h: Likewise.
      * tests/xmconfigtest.c: Likewise.
      * tests/object-locking.ml: Likewise.
      * tools/virt-pki-validate.in: Likewise.
      * tools/virt-xml-validate.in: Likewise.
      0a336335
  33. 10 2月, 2010 1 次提交
  34. 05 12月, 2009 1 次提交
  35. 21 9月, 2009 1 次提交
    • D
      Move xen driver code into src/xen/ directory · f7a107f7
      Daniel P. Berrange 提交于
      * src/Makefile.am, src/proxy_internal.c, src/proxy_internal.h
        src/sexpr.c, src/sexpr.h, src/xen_unified.c, src/xen_unified.h,
        src/xen_internal.c, src/xen_internal.h, src/xen_inotify.c,
        src/xen_inotify.h, src/xend_internal.c, src/xend_internal.h,
        src/xm_internal.c, src/xm_internal.h, src/xs_internal.c,
        src/xs_internal.h: Move to src/xen/ directory
      * proxy/Makefile.am, proxy/libvirt_proxy.c, src/Makefile.am,
        src/libvirt.c, tests/sexpr2xmltest.c, tests/statstest.c,
        tests/xencapstest.c, tests/xmconfigtest.c, tests/xml2sexprtest.c:
        Adapt to changed xen location
      * src/stats_linux.h, src/stats_linux.c: Remove xen specific block
        stats APIs
      * src/qemu_driver.c, src/uml_driver.c: Add missing sys/un.h include
        uncovered after change to stats_linux.h
      * src/xen/block_stats.h, src/xen/block_stats.c: Add xen specific
        block stats APIs
      f7a107f7