1. 19 4月, 2017 13 次提交
    • D
      Add travis build configuration · 84490f20
      Daniel P. Berrange 提交于
      This travis configuration tests libvirt builds on 5 platforms that we don't
      exercise in the CentOS CI system.
      
        - Ubuntu Trusty with GCC
        - Ubuntu Trusty with CLang
        - Ubuntu Precise with GCC
        - Ubuntu Precise with CLang
        - OS-X with CLang
      
      NB, syntax-check fails on OS-X with errors like:
      
         /bin/sh: /usr/bin/grep: Argument list too long
      
      Presumably their grep impl isn't as good as the GNU one, so this test
      config skips syntax-check on OS-X for now.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      84490f20
    • D
      Ignore SASL deprecation warnings on OS-X · f7d7825d
      Daniel P. Berrange 提交于
      Apple have annotated all SASL functions as deprecated for
      unknown reasons. Since they still work, lets just ignore
      the warnings. If Apple finally delete the SASL functions
      our configure check should already catch that
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      f7d7825d
    • D
      Fix detection of required RBD version · 354191c5
      Daniel P. Berrange 提交于
      If building libvirt against Ubuntu precise, the librbd.h is lacking
      many functions that libvirt expects. We have no version check, so
      we were enabling RBD even though it cannot compile. This configure
      check uses existance of 'rbd_get_features' as an identifier for the
      min required version.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      354191c5
    • D
      Prevent test failures with ebtables/iptables/ip6tables are missing · 6f37cb80
      Daniel P. Berrange 提交于
      When running tests in a restricted container (as opposed to a full
      OS install), we can't assume ebtables/iptbles/ip6tables are going
      to be installed. We must check this and mark the tests as skipped.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      6f37cb80
    • D
      annotate all mocked functions with noinline · 728cacc8
      Daniel P. Berrange 提交于
      CLang's optimizer is more aggressive at inlining functions than
      gcc and so will often inline functions that our tests want to
      mock-override. This causes the test to fail in bizarre ways.
      
      We don't want to disable inlining completely, but we must at
      least prevent inlining of mocked functions. Fortunately there
      is a 'noinline' attribute that lets us control this per function.
      
      A syntax check rule is added that parses tests/*mock.c to extract
      the list of functions that are mocked (restricted to names starting
      with 'vir' prefix). It then checks that src/*.h header file to
      ensure it has a 'ATTRIBUTE_NOINLINE' annotation. This should prevent
      use from bit-rotting in future.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      728cacc8
    • J
      spec: Avoid RPM verification errors on nwfilter XMLs · 1d3963db
      Jiri Denemark 提交于
      /etc/libvirt/nwfilter/*.xml files are installed with no UUID, which
      means libvirtd will automatically alter all of them once it starts. Thus
      RPM verification will always fail on them. Let's use a trick similar to
      the default network XML and store nwfilter XMLs in /usr/share. They will
      be copied into /etc in %post. Additionally the /etc files are marked as
      %ghost so that they are uninstalled if the RPM package is removed.
      
      Note that the %post script overwrites existing files with new ones on
      upgrade, which is what has always been happening.
      
      https://bugzilla.redhat.com/show_bug.cgi?id=1431581
      https://bugzilla.redhat.com/show_bug.cgi?id=1378774Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
      1d3963db
    • J
      network: Use consistent function name prefixes for virnetworkobj · bd13b26d
      John Ferlan 提交于
      Use "virNetworkObj" as a prefix for any external API in virnetworkobj.
      
      Also a couple of functions were local to virnetworkobj.c, so remove their
      external defs in virnetworkobj.h.
      bd13b26d
    • J
      network: Rename virNetworkObjAssignDef to virNetworkObjUpdateAssignDef · 4726020b
      John Ferlan 提交于
      Rename the API to be a better description of what it does. Besides, a
      subsequent patch will rename virNetworkAssignDef to virNetworkObjAssignDef
      so rather than make that patch confusing we'll take the intermittent step
      in this patch.
      4726020b
    • J
      network: Alter coding style of network conf function prototypes · 609dac1b
      John Ferlan 提交于
      In an effort to be consistent with the source module, alter the function
      prototypes to follow the similar style of source with the "type" on one
      line followed by the function name and arguments on subsequent lines with
      with argument getting it's own line.
      609dac1b
    • J
      network: Adjust coding style for network conf sources · 0cf145b6
      John Ferlan 提交于
      Alter the format of the code to follow more recent style guidelines of
      two empty lines between functions, function decls with "[static] type"
      on one line followed by function name with arguments to functions each
      on one line.
      0cf145b6
    • J
      network: Introduce virnetworkobj · bddbda99
      John Ferlan 提交于
      Move all the virNetworkObj related API/data structures into their own
      modules virnetworkobj.{c,h} from the network_conf.{c,h}
      
      Purely code motion at this point plus adjustments to cleanly build
      bddbda99
    • D
      hyperv: recognize array property as distinct type. · bb9fca7b
      Dawid Zamirski 提交于
      When hyperv code generator for WMI classes identifies common
      properties, it needs to take into account array type as a distinct
      type, i.e string != string[]. This is the case where v1 of the
      Msvm_VirtualSystemSettingData has Notes property as string whereas v2
      uses Notes[], therefore they have to be treated as different fields and
      cannot be placed in the "common" struct.
      bb9fca7b
    • J
      xenconfig: avoid double free on OOM testing · b2c12f57
      Jim Fehlig 提交于
      Fix xlconfig channel tests when OOM testing is enabled.
      
      TEST: xlconfigtest
      32) Xen XL-2-XML Format channel-unix                                  ... OK
          Test OOM for nalloc=55 ................................................*** Error in `/home/jfehlig/virt/upstream/libvirt/tests/.libs/xlconfigtest': double free or corruption (fasttop): 0x0000000000679550 ***
      ...
      (gdb) bt
      #0  0x00007ffff36875af in raise () from /lib64/libc.so.6
      #1  0x00007ffff36889aa in abort () from /lib64/libc.so.6
      #2  0x00007ffff36c5150 in __libc_message () from /lib64/libc.so.6
      #3  0x00007ffff36cb4f6 in malloc_printerr () from /lib64/libc.so.6
      #4  0x00007ffff36cbcee in _int_free () from /lib64/libc.so.6
      #5  0x00007ffff782babf in virFree (ptrptr=0x7fffffffdca8) at util/viralloc.c:582
      #6  0x000000000042f2f3 in xenParseXLChannel (conf=0x677350, def=0x6815b0) at xenconfig/xen_xl.c:788
      #7  0x000000000042f44e in xenParseXL (conf=0x677350, caps=0x6832b0, xmlopt=0x67f6e0) at xenconfig/xen_xl.c:828
      #8  0x00000000004105a3 in testCompareFormatXML (
          xlcfg=0x6811e0 "/home/jfehlig/virt/upstream/libvirt/tests/xlconfigdata/test-channel-unix.cfg",
          xml=0x681110 "/home/jfehlig/virt/upstream/libvirt/tests/xlconfigdata/test-channel-unix.xml", replaceVars=false)
          at xlconfigtest.c:152
      
      When a channel is successfully parsed and its path and name fields
      assigned from local variables, set the local variables to NULL to
      prevent a double free on error.
      Signed-off-by: NJim Fehlig <jfehlig@suse.com>
      b2c12f57
  2. 18 4月, 2017 7 次提交
  3. 14 4月, 2017 4 次提交
    • S
      pci: recognize/report GEN4 (PCIe 4.0) card 16GT/s Link speed · 8e09663f
      Shivaprasad G Bhat 提交于
      Without this added enum value, nodedev-dumpxml of a GEN4 (PCIe 4.0)
      card will fail (due to the unrecognized link speed), and since
      nodedev-detach and nodedev-reattach internally do a dumpxml+parse,
      they will also fail. With this patch, all those operations succeed.
      Signed-off-by: NShivaprasad G Bhat <sbhat@linux.vnet.ibm.com>
      8e09663f
    • A
      Drop autobuild.sh · 3bf3711a
      Andrea Bolognani 提交于
      The Test-AutoBuild project, that this script is supposed to
      be used with, hasn't seen any activity in ~6 years; libvirt's
      own CI is running on Jenkins with a completely independent
      setup that doesn't use the script at all.
      3bf3711a
    • W
      xenFormatXLDomainDisks: avoid double free on OOM testing · 2c1a31a3
      Wim ten Have 提交于
      Fix xlconfigtest runs build for --enable-test-oom on
              Xen XL-2-XML Parse  new-disk
      
          #0  0x00007ffff3bd791f in raise () from /lib64/libc.so.6
          #1  0x00007ffff3bd951a in abort () from /lib64/libc.so.6
          #2  0x00007ffff3c1b200 in __libc_message () from /lib64/libc.so.6
          #3  0x00007ffff3c2488a in _int_free () from /lib64/libc.so.6
          #4  0x00007ffff3c282bc in free () from /lib64/libc.so.6
          #5  0x00007ffff7864fcb in virFree (ptrptr=ptrptr@entry=0x7fffffffd868) at util/viralloc.c:582
          #6  0x00007ffff78776e5 in virConfFreeValue (val=<optimized out>) at util/virconf.c:178
      ==> #7  0x0000000000425759 in xenFormatXLDomainDisks (def=0x7fffffffd8c0, def=0x7fffffffd8c0, conf=0x658220)
              at xenconfig/xen_xl.c:1159
          #8  xenFormatXL (def=def@entry=0x66ec20, conn=conn@entry=0x668cf0) at xenconfig/xen_xl.c:1558
          #9  0x000000000040ea1d in testCompareParseXML (replaceVars=<optimized out>,
              xml=0x65f5e0 "/home/wtenhave/WORK/libvirt/history/libvirt/tests/xlconfigdata/test-fullvirt-ovmf.xml",
              xlcfg=0x65f6b0 "/home/wtenhave/WORK/libvirt/history/libvirt/tests/xlconfigdata/test-fullvirt-ovmf.cfg")
              at xlconfigtest.c:105
          #10 testCompareHelper (data=<optimized out>) at xlconfigtest.c:205
          #11 0x000000000041079a in virTestRun (title=title@entry=0x431cf0 "Xen XL-2-XML Parse  fullvirt-ovmf",
              body=body@entry=0x40e720 <testCompareHelper>, data=data@entry=0x7fffffffda50) at testutils.c:247
          #12 0x000000000040ebc2 in mymain () at xlconfigtest.c:256
          #13 0x0000000000411070 in virTestMain (argc=1, argv=0x7fffffffdc08, func=0x40f2c0 <mymain>) at testutils.c:992
          #14 0x00007ffff3bc2401 in __libc_start_main () from /lib64/libc.so.6
          #15 0x000000000040e5da in _start ()
      
      symmetry seems missing its sibbling coded functionality
      demonstrated under functions;
              xenFormatXLUSBController()
              xenFormatXLUSB()
              xenFormatXLDomainChannels()
              xenFormatXMDisks
      Signed-off-by: NWim ten Have <wim.ten.have@oracle.com>
      2c1a31a3
    • W
      virConfSaveValue: protect against a NULL pointer reference · ae5d7582
      Wim ten Have 提交于
      Fix xlconfigtest runs build for --enable-test-oom on
              Xen XL-2-XML Parse  channel-pty
      
      Program received signal SIGSEGV, Segmentation fault.
      
          #0  0x00007ffff3c2b373 in __strchr_sse2 () from /lib64/libc.so.6
      ==> #1  0x00007ffff7875701 in virConfSaveValue (buf=buf@entry=0x7fffffffd8a0, val=val@entry=0x674750) at util/virconf.c:290
          #2  0x00007ffff7875668 in virConfSaveValue (buf=buf@entry=0x7fffffffd8a0, val=<optimized out>) at util/virconf.c:306
          #3  0x00007ffff78757ef in virConfSaveEntry (buf=buf@entry=0x7fffffffd8a0, cur=cur@entry=0x674780) at util/virconf.c:338
          #4  0x00007ffff78783eb in virConfWriteMem (memory=0x665570 "", len=len@entry=0x7fffffffd910, conf=conf@entry=0x65b940)
              at util/virconf.c:1543
          #5  0x000000000040eccb in testCompareParseXML (replaceVars=<optimized out>, xml=<optimized out>,
              xlcfg=0x662c00 "/home/wtenhave/WORK/libvirt/OOMtesting/libvirt-devel/tests/xlconfigdata/test-channel-pty.cfg")
              at xlconfigtest.c:108
          #6  testCompareHelper (data=<optimized out>) at xlconfigtest.c:205
          #7  0x0000000000410b3a in virTestRun (title=title@entry=0x432cc0 "Xen XL-2-XML Parse  channel-pty",
              body=body@entry=0x40e9b0 <testCompareHelper>, data=data@entry=0x7fffffffd9f0) at testutils.c:247
          #8  0x000000000040f322 in mymain () at xlconfigtest.c:278
          #9  0x0000000000411410 in virTestMain (argc=1, argv=0x7fffffffdba8, func=0x40f660 <mymain>) at testutils.c:992
          #10 0x00007ffff3bc0401 in __libc_start_main () from /lib64/libc.so.6
          #11 0x000000000040e86a in _start ()
      
          (gdb) frame 1
          #1  0x00007ffff7875701 in virConfSaveValue (buf=buf@entry=0x7fffffffd8a0, val=val@entry=0x674750) at util/virconf.c:290
          290                 if (strchr(val->str, '\n') != NULL) {
          (gdb) print *val
          $1 = {type = VIR_CONF_STRING, next = 0x0, l = 0, str = 0x0, list = 0x0}
      Signed-off-by: NWim ten Have <wim.ten.have@oracle.com>
      ae5d7582
  4. 13 4月, 2017 16 次提交