1. 26 11月, 2015 1 次提交
    • D
      util: add APIs for reading/writing from/to rotating files · 910e65d9
      Daniel P. Berrange 提交于
      Add virRotatingFileReader and virRotatingFileWriter objects
      which allow reading & writing from/to files with automation
      rotation to N backup files when a size limit is reached. This
      is useful for guest logging when a guaranteed finite size
      limit is required. Use of external tools like logrotate is
      inadequate since it leaves the possibility for guest to DOS
      the host in between invokations of logrotate.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      910e65d9
  2. 12 11月, 2015 1 次提交
  3. 11 9月, 2015 1 次提交
    • M
      tests: Don't use testutils in mock libraries · cce83f13
      Martin Kletzander 提交于
      Mock libraries are not built with testutils.c, but there's one which
      uses VIR_TEST_DEBUG.  But because that debug should be an error, if we
      change it, then it will not only be more semantically correct, but mingw
      compiler will be happier as well.
      
      It also follows suit with all other mock libraries.
      
      For few other things, used in this file, need libvirt.la to be added
      into LIBADD for mingw as well.
      Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
      cce83f13
  4. 03 8月, 2015 1 次提交
  5. 18 6月, 2015 2 次提交
  6. 17 6月, 2015 1 次提交
  7. 16 6月, 2015 1 次提交
  8. 12 6月, 2015 1 次提交
  9. 11 6月, 2015 1 次提交
    • D
      rpc: add testing of RPC JSON (de)serialization · d1f6efb1
      Daniel P. Berrange 提交于
      The virNetServer class has the ability to serialize its state
      to a JSON file, and then re-load that data after an in-place
      execve() call to re-connect to active file handles. This data
      format is critical ABI that must have compatibility across
      releases, so it should be tested...
      d1f6efb1
  10. 28 4月, 2015 1 次提交
  11. 27 4月, 2015 2 次提交
  12. 21 4月, 2015 2 次提交
    • R
      vircapstest: fix build without LXC, QEMU or XEN · a7c1eb14
      Roman Bogorodskiy 提交于
      When building without lxc support enabled, build fails with:
      
      CLD     vircapstest
      vircapstest.o: In function `test_virCapsDomainDataLookupLXC':
      vircapstest.c:(.text+0x9ef): undefined reference to `testLXCCapsInit'
      
      Fix that by hiding LXC tests under appropriate #ifdef. Same applies
      for QEMU and XEN.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      a7c1eb14
    • C
      caps: Add virCapabilitiesDomainDataLookup · a6936523
      Cole Robinson 提交于
      This is a helper function to look up all capabilities data for all
      the OS bits that are relevant to <domain>. This is
      
      - os type
      - arch
      - domain type
      - emulator
      - machine type
      
      This will be used to replace several functions in later commits.
      a6936523
  13. 15 4月, 2015 2 次提交
  14. 27 3月, 2015 1 次提交
  15. 18 3月, 2015 1 次提交
  16. 11 3月, 2015 1 次提交
    • P
      qemu: monitor: Implement HMP version for listing all block device stats · f6563bc3
      Peter Krempa 提交于
      Add a different version of parser for "info blockstats" that basically
      parses the same information as the existing copy of the function.
      
      This will allow us to remove the single device version
      qemuMonitorGetBlockStatsInfo in the future.
      
      The new implementation uses few new helpers so it should be more
      understandable and provides a test case to verify that it works.
      f6563bc3
  17. 31 1月, 2015 1 次提交
    • P
      qemu: command: Add helper to format -object strings from JSON representation · 331b2583
      Peter Krempa 提交于
      Unlike -device, qemu uses a JSON object to add backend "objects" via the
      monitor rather than the string that would be passed on the commandline.
      
      To be able to reuse code parts that configure backends for various
      devices, this patch adds a helper that will allow generating the command
      line representations from the JSON property object.
      331b2583
  18. 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
  19. 14 1月, 2015 1 次提交
  20. 13 1月, 2015 1 次提交
  21. 04 1月, 2015 1 次提交
  22. 24 11月, 2014 1 次提交
  23. 06 11月, 2014 1 次提交
    • E
      Iface: disallow network tuning in session mode globally · 9a8fc3ef
      Erik Skultety 提交于
      Patch 43b67f2e disallowed network tuning only with qemu driver, however
      this patch moved the check for root privileges into
      virNetDevBandwidthSet function, so the call should now
      fail in all possible cases. A mock function was created so that the test
      suite doesn't fail because of unsufficient privileges.
      9a8fc3ef
  24. 25 10月, 2014 1 次提交
    • J
      tests: Add SELINUX_LIBS to fix viridentitytest linker bug · f2a2d0e9
      Julio Faracco 提交于
      In a clean build system (Ubuntu 14.04), the viridentitytest failed to compile.
      Even if all the SELINUX libraries and depedencies are installed. See the error
      message below:
      
      [...]
        CC       viridentitytest.o
        CCLD     viridentitytest
      /usr/bin/ld: viridentitytest.o: undefined reference to symbol
                                                             'security_disable'
      //lib/x86_64-linux-gnu/libselinux.so.1: error adding symbols: DSO missing
                                                                 from command line
      collect2: error: ld returned 1 exit status
      make: *** [viridentitytest] Error 1
      
      Simply adding the variable SELINUX_LIBS in viridentitytest rules of
      Makefile.am to include SELINUX libraries into viridentitytest solved that
      compilation issue.
      Signed-off-by: NJulio Faracco <jcfaracco@gmail.com>
      Signed-off-by: NEric Blake <eblake@redhat.com>
      f2a2d0e9
  25. 07 10月, 2014 1 次提交
    • L
      qemu: qemuMonitorQueryRxFilter - retrieve guest netdev rx-filter · ab989962
      Laine Stump 提交于
      This function can be called at any time to get the current status of a
      guest's network device rx-filter. In particular it is useful to call
      after libvirt recieves a NIC_RX_FILTER_CHANGED event - this event only
      tells you that something has changed in the rx-filter, the details are
      retrieved with the query-rx-filter monitor command (only available in
      the json monitor). The command sent to the qemu monitor looks like this:
      
        {"execute":"query-rx-filter", "arguments": {"name":"net2"} }'
      
      and the results will look something like this:
      
      {
          "return": [
              {
                  "promiscuous": false,
                  "name": "net2",
                  "main-mac": "52:54:00:98:2d:e3",
                  "unicast": "normal",
                  "vlan": "normal",
                  "vlan-table": [
                      42,
                      0
                  ],
                  "unicast-table": [
      
                  ],
                  "multicast": "normal",
                  "multicast-overflow": false,
                  "unicast-overflow": false,
                  "multicast-table": [
                      "33:33:ff:98:2d:e3",
                      "01:80:c2:00:00:21",
                      "01:00:5e:00:00:fb",
                      "33:33:ff:98:2d:e2",
                      "01:00:5e:00:00:01",
                      "33:33:00:00:00:01"
                  ],
                  "broadcast-allowed": false
              }
          ],
          "id": "libvirt-14"
      }
      
      This is all parsed from JSON into a virNetDevRxFilter object for
      easier consumption. (unicast-table is usually empty, but is also an
      array of mac addresses similar to multicast-table).
      
      (NB: LIBNL_CFLAGS was added to tests/Makefile.am because virnetdev.h
      now includes util/virnetlink.h, which includes netlink/msg.h when
      appropriate. Without LIBNL_CFLAGS, gcc can't find that file (if
      libnl/netlink isn't available, LIBNL_CFLAGS will be empty and
      virnetlink.h won't try to include netlink/msg.h anyway).)
      ab989962
  26. 24 9月, 2014 1 次提交
  27. 20 8月, 2014 1 次提交
    • R
      bhyve: add volumes support · 6c2e7d0b
      Roman Bogorodskiy 提交于
      Update bhyveBuildDiskArgStr to support volumes:
      
       - Make virBhyveProcessBuildBhyveCmd and
         virBhyveProcessBuildLoadCmd take virConnectPtr as the
         first argument instead of bhyveConnPtr as virConnectPtr is
         needed for virStorageTranslateDiskSourcePool,
       - Add virStorageTranslateDiskSourcePool call to
         virBhyveProcessBuildBhyveCmd and
         virBhyveProcessBuildLoadCmd,
       - Allow disks of type VIR_STORAGE_TYPE_VOLUME
      6c2e7d0b
  28. 22 7月, 2014 2 次提交
    • M
      tests: Remove stale scsihostdata dir · 692016f7
      Michal Privoznik 提交于
      In the fbd91d49 commit, new scsihostdata dir is added to EXTRA_DIST in
      the tests/Makefile.am. However, the directory itself is not created
      anywhere, nor in the commit.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      692016f7
    • J
      virutil: Introduce virReadSCSIUniqueId · fbd91d49
      John Ferlan 提交于
      Introduce a new function to read the current scsi_host entry and return
      the value found in the 'unique_id' file.
      
      Add a 'scsihosttest' test (similar to the fchosttest, but incorporating some
      of the concepts of the mocked pci test library) in order to read the
      unique_id file like would be found in the /sys/class/scsi_host tree.
      fbd91d49
  29. 03 7月, 2014 3 次提交
    • M
      tests: Avoid double linking some libraries · fb8bc6be
      Michal Privoznik 提交于
      The problem is, since 614581f3 domaincapstest is linked with
      $(LDADDS) by default. Then, since 94e3f23e the test may be
      conditionally linked with $(qemu_LDADDS) which already contains
      $(LDADDS). And some linkers doesn't cope with this nicely:
      
        CCLD     domaincapstest
      ../src/libvirt_probes.o:(.probes+0x0): multiple definition of `libvirt_event_poll_add_handle_semaphore'
      ../src/libvirt_probes.o:(.probes+0x0): first defined here
      ../src/libvirt_probes.o:(.probes+0x2): multiple definition of `libvirt_event_poll_update_handle_semaphore'
      ../src/libvirt_probes.o:(.probes+0x2): first defined here
      ../src/libvirt_probes.o:(.probes+0x4): multiple definition of `libvirt_event_poll_remove_handle_semaphore'
      ../src/libvirt_probes.o:(.probes+0x4): first defined here
      ../src/libvirt_probes.o:(.probes+0x6): multiple definition of `libvirt_event_poll_dispatch_handle_semaphore'
      ../src/libvirt_probes.o:(.probes+0x6): first defined here
      
      And so on.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      fb8bc6be
    • M
      qemu: Implement virConnectGetDomainCapabilities · 94e3f23e
      Michal Privoznik 提交于
      So far only information on disks and host devices are exposed in the
      capabilities XML. Well, at least something. Even a new test is
      introduced. The qemu capabilities are stolen from already existing
      qemucapabilities test. There's one tricky point though. Functions that
      checks host's KVM and VFIO capabilities, are impossible to mock
      currently. So in the test, we are setting the capabilities by hand.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      94e3f23e
    • M
      Introduce domain_capabilities · 614581f3
      Michal Privoznik 提交于
      This new module holds and formats capabilities for emulator. If you
      are about to create a new domain, you may want to know what is the
      host or hypervisor capable of. To make sure we don't regress on the
      XML, the formatting is not something left for each driver to
      implement, rather there's general format function.
      
      The domain capabilities is a lockable object (even though the locking
      is not necessary yet) which uses reference counter.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      614581f3
  30. 23 6月, 2014 2 次提交
  31. 10 6月, 2014 1 次提交
    • Y
      Add vbox_snapshot_conf struct · 4dc5d8f1
      Yohan BELLEGUIC 提交于
      This structure contains the data to be saved in the VirtualBox XML file
      and can be manipulated with severals exposed functions.
      The structure is created by vboxSnapshotLoadVboxFile taking the
      machine XML file.
      It also can rewrite the XML by using vboxSnapshotSaveVboxFile.
      4dc5d8f1
  32. 05 6月, 2014 1 次提交