1. 16 5月, 2016 2 次提交
  2. 14 5月, 2016 9 次提交
    • M
      tests: Introduce check-file-access.pl · 4b3a46ca
      Michal Privoznik 提交于
      This script will check output generated by virtestmock against a
      white list. All non matching records found are printed out. So
      far, the white list is rather sparse at the moment.
      This test should be ran only after all other tests finished, and
      should cleanup the temporary file before their execution. Because
      I'm unable to reflect these requirements in Makefile.am
      correctly, I've introduced new target 'check-access' under which
      this test is available.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      4b3a46ca
    • M
      virtestmock: Print invalid file accesses into a file · 6326865e
      Michal Privoznik 提交于
      All the accesses to files outside our build or source directories
      are now identified and appended into a file for later processing.
      The location of the file that contains all the records can be
      controlled via VIR_TEST_FILE_ACCESS env variable and defaults to
      abs_builddir "/test_file_access.txt".
      
      The script that will process the access file is to be added in
      next commit.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      6326865e
    • M
      tests: Introduce global mock library · 47d2dc83
      Michal Privoznik 提交于
      The intent is that this library is going to be called every time
      to check if we are not touching anything outside srcdir or
      builddir.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      47d2dc83
    • M
      virmock.h: Introduce VIR_MOCK_CALL_STAT · 86d1705a
      Michal Privoznik 提交于
      There is some magic going on when it comes to stat() or lstat().
      Basically, stat() can either be a regular function, an inline
      function that calls __xstat(_STAT_VER, ...) or a macro that does
      the same as the inline func. Don't ask why is that, just read the
      documentation in sys/stat.h and make sure you have a bucket next
      to you. Anyway, currently there will not be both stat and __xstat
      symbols at the same time, as one of them gets overwritten to the
      other one during compilation. But this is not true anymore once
      we start chaining our mocking libraries. Therefore we need a
      wrapper that calls desired function from glibc.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      86d1705a
    • M
      securityselinuxhelper: Adapt to virmock.h · a1ffedc6
      Michal Privoznik 提交于
      Instead of introducing our own wrapper for dlsym()
      we can use the one provided by virmock.h.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      a1ffedc6
    • M
      nssmock: Adapt to virmock.h · ca88c0e7
      Michal Privoznik 提交于
      Instead of introducing our own wrapper for dlsym()
      we can use the one provided by virmock.h.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      ca88c0e7
    • M
      vircgroupmock: Adapt to virmock.h · d16b7a88
      Michal Privoznik 提交于
      Instead of introducing our own wrapper for dlsym()
      we can use the one provided by virmock.h.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      d16b7a88
    • M
      virpcimock: Adapt to virmock.h · 57c484db
      Michal Privoznik 提交于
      Instead of introducing our own wrapper for dlsym()
      we can use the one provided by virmock.h.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      57c484db
    • J
      xlconfigtests: use qemu-xen in all test data files · b90c4b5f
      Jim Fehlig 提交于
      Some of the test configuration files in tests/xlconfigdata
      use the old qemu-dm as the emulator. Many of the configuration
      features tested (spice, rbd, multi-usb) are not even usable with
      the old qemu. Change these files to use the new qemu-xen (also
      known as qemu upstream) emulator.
      
      Note: This change fixes xlconfigtest failures when the old
      qemu is actually installed on the system. During device post
      parse, the libxl driver attempts to invoke the emulator to
      determine if it is the old or new qemu so it can properly set
      video RAM defaults. With the old qemu installed, the default
      video RAM was set differently than the expected value.
      Changing all the test data files to use qemu-xen ensures
      predictable results wrt default video RAM size.
      Signed-off-by: NJim Fehlig <jfehlig@suse.com>
      b90c4b5f
  3. 12 5月, 2016 1 次提交
  4. 11 5月, 2016 1 次提交
    • L
      conf: log error when incorrect PCI root controller is added to domain · e5aecc2f
      Laine Stump 提交于
      libvirt may automatically add a pci-root or pcie-root controller to a
      domain, depending on the arch/machinetype, and it hopefully always
      makes the right decision about which to add (since in all cases these
      controllers are an implicit part of the virtual machine).
      
      But it's always possible that someone will create a config that
      explicitly supplies the wrong type of PCI controller for the selected
      machinetype. In the past that would lead to an error later when
      libvirt was trying to assign addresses to other devices, for example:
      
        XML error: PCI bus is not compatible with the device at
        0000:00:02.0. Device requires a PCI Express slot, which is not
        provided by bus 0000:00
      
      (that's the error message that appears if you replace the pcie-root
      controller in a Q35 domain with a pci-root controller).
      
      This patch adds a check at the same place that the implicit
      controllers are added (to ensure that the same logic is used to check
      which type of pci root is correct). If a pci controller with index='0'
      is already present, we verify that it is of the model that we would
      have otherwise added automatically; if not, an error is logged:
      
        The PCI controller with index='0' must be " model='pcie-root' for
        this machine type, " but model='pci-root' was found instead.
      
      Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1004602
      e5aecc2f
  5. 10 5月, 2016 5 次提交
  6. 06 5月, 2016 11 次提交
  7. 05 5月, 2016 4 次提交
  8. 04 5月, 2016 3 次提交
    • J
      qemu: Add 'iothread' to command line for supported controller · d0b58459
      John Ferlan 提交于
      https://bugzilla.redhat.com/show_bug.cgi?id=1286709
      
      Now that we have all the pieces in place, we can add the 'iothread=#' to
      the command line for the (two) controllers that support it (virtio-scsi-pci
      and virtio-scsi-ccw). Add the tests as well...
      d0b58459
    • J
      conf: Add support for virtio-scsi iothreads · e0d0e530
      John Ferlan 提交于
      Add the ability to add an 'iothread' to the controller which will be how
      virtio-scsi-pci and virtio-scsi-ccw iothreads have been implemented in qemu.
      
      Describe the new functionality and add tests to parse/validate that the
      new attribute can be added.
      e0d0e530
    • J
      qemu: Add capability for virtio-scsi iothreads · e2faa976
      John Ferlan 提交于
      An iothread for virtio-scsi is a property of the controller. Add a lookup
      of the 'virtio-scsi-pci' and 'virtio-scsi-ccw' device properties and parse
      the output.  For both, support for the iothread was added in qemu 2.4
      while support for virtio-scsi in general was added in qemu 1.4.
      
      Modify the various mock capabilities replies (by hand) to reflect the
      when virtio-scsi was supported and then specifically when the iothread
      property was added. For versions prior to 1.4, use the no device error
      return for virtio-scsi. For versions 1.4 to before 2.4, add some data
      for virtio-scsi-pci even though it isn't complete we're not looking for
      anything specific there anyway. For 2.4 to 2.6, add a more complete reply.
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      e2faa976
  9. 03 5月, 2016 4 次提交
    • E
      virnetsocket: Provide socket address format in a more standard form · 9b45c9f0
      Erik Skultety 提交于
      Our socket address format is in a rather non-standard format and that is
      because sasl library requires the IP address and service to be delimited by a
      semicolon. The string form is a completely internal matter, however once the
      admin interfaces to retrieve client identity information are merged, we should
      return the socket address string in a common format, e.g. format defined by
      URI rfc-3986, i.e. the IP address and service are delimited by a colon and
      in case of an IPv6 address, square brackets are added:
      
      Examples:
          127.0.0.1:1234
          [::1]:1234
      
      This patch changes our default format to the one described above, while adding
      separate methods to request the non-standard SASL format using semicolon as a
      delimiter.
      Signed-off-by: NErik Skultety <eskultet@redhat.com>
      9b45c9f0
    • C
      qemu: support configuring usb3 controller port count · 600977e2
      Cole Robinson 提交于
      This adds a ports= attribute to usb controller XML, like
      
        <controller type='usb' model='nec-xhci' ports='8'/>
      
      This maps to:
      
        qemu -device nec-usb-xhci,p2=8,p3=8
      
      Meaning, 8 ports that support both usb2 and usb3 devices. Gerd
      suggested to just expose them as one knob.
      
      https://bugzilla.redhat.com/show_bug.cgi?id=1271408
      600977e2
    • C
      qemu: caps: introduce QEMU_CAPS_NEC_USB_XHCI_PORTS · 48e12de5
      Cole Robinson 提交于
      Reports whether we support -device nec-usb-xhci,p3=XXX value,
      which has been available since qemu 1.3.0
      48e12de5
    • E
      rpc: virnetserverclient: Introduce new attribute conn_time to client · a32135b3
      Erik Skultety 提交于
      Besides ID, libvirt should provide several parameters to help the user
      distinguish two clients from each other. One of them is the connection
      timestamp. This patch also adds a testcase for proper JSON formatting of the
      new attribute too (proper formatting of older clients that did not support
      this attribute yet is included in the existing tests) - in order to
      testGenerateJSON to work, a mock of time_t time(time_t *timer) needed to be
      created.
      Signed-off-by: NErik Skultety <eskultet@redhat.com>
      a32135b3