1. 19 3月, 2016 2 次提交
  2. 18 3月, 2016 1 次提交
    • M
      tests: Set PATH in each test · 363b401f
      Michal Privoznik 提交于
      Currently we spawn couple of binaries in our test suite.
      Moreover, we provide some spoofed versions of system binaries
      hoping that those will be executed instead of the system ones.
      For instance, for testing SSH socket we have written our own ssh
      binary for producing predictable results. We certainly don't want
      to execute the system ssh binary.
      However, in order to prefer our binaries over system ones, we
      need to set PATH environment variable. But this is done only at
      the Makefile level. So if anybody runs a test by hand that
      expects our spoofed binary, the test ends up executing real
      system binaries. This is not good. In fact, it's terribly wrong.
      The fix lies in a small trick - putting our build directory at
      the beginning of the PATH environment variable in each test.
      Hopefully, since every test has this VIRT_TEST_MAIN* wrapper, we
      can fix this at a single place.
      Moreover, while this removes setting PATH for our tests written
      in bash, it's safe as we are not calling anything ours that would
      require PATH change there.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      363b401f
  3. 12 2月, 2016 3 次提交
  4. 11 2月, 2016 3 次提交
    • A
      tests: Link mock libraries against gnulib and gnulib only · 1ed0bdd8
      Andrea Bolognani 提交于
      Mock libraries should not be linked against libvirt, but some of
      them did - fix that.
      
      On the other hand, not linking against gnulib can cause build
      failures on mingw, so define a new $(MOCKLIBS_LIBS) variable and
      use it everywhere.
      1ed0bdd8
    • A
      Revert "tests: Don't link mock libraries against libvirt and gnulib" · 51c70705
      Andrea Bolognani 提交于
      This reverts commit 6aa90452.
      
      Turns out that not linking against libvirt and gnulib is okay for
      regular Linux (and FreeBSD) builds, but makes mingw very unhappy.
      
        .../virnetserverclientmock_la-virnetserverclientmock.o:
          In function `virNetSocketGetSELinuxContext':
          .../virnetserverclientmock.c:61: undefined reference to `rpl_strdup'
        .../libvirportallocatormock_la-virportallocatortest.o:
          In function `init_syms':
          .../virportallocatortest.c:61: undefined reference to `virFileClose'
      51c70705
    • A
      tests: Don't link mock libraries against libvirt and gnulib · 6aa90452
      Andrea Bolognani 提交于
      Mock libraries are used with LD_PRELOAD from test binaries that
      are already linked against those libraries, so they will be able
      to resolve the symbols anyway.
      6aa90452
  5. 06 2月, 2016 1 次提交
    • C
      tests: qemuargv2xml: separate from qemuxml2argv data · e117bf64
      Cole Robinson 提交于
      Most of the qemuargv2xml tests are parsing old style qemu command
      lines (with -disk, -serial, etc), and it gets its input from
      qemuxml2argv output.
      
      But since we've raise the minimum supported qemu version to 0.12.0,
      which supports -device, once that changes propagates through libvirt
      the vast majority of qemuxml2argv output is _not_ going to be using
      old style qemu options.
      
      In preparation for this, switch qemuargv2xml to use its own copies
      of input and output, so it's not tied to qemuxml2argv results.
      
      This is just a straight copy of the current tests.
      e117bf64
  6. 09 1月, 2016 1 次提交
  7. 09 12月, 2015 1 次提交
  8. 27 11月, 2015 1 次提交
    • M
      virtlogd: Fix build without DBus · baa3b463
      Martin Kletzander 提交于
      The rule for virrotatingfiletest was defined in DBUS-only block even
      though the test does not use DBus at all.  Also DBUS_CFLAGS and
      DBUS_LIBS are removed from the rules.  The original error was:
      
      /usr/lib/gcc/x86_64-pc-linux-gnu/5.2.0/../../../../lib64/Scrt1.o: In
      function `_start':
      (.text+0x20): undefined reference to `main'
      Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
      baa3b463
  9. 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
  10. 12 11月, 2015 1 次提交
  11. 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
  12. 03 8月, 2015 1 次提交
  13. 18 6月, 2015 2 次提交
  14. 17 6月, 2015 1 次提交
  15. 16 6月, 2015 1 次提交
  16. 12 6月, 2015 1 次提交
  17. 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
  18. 28 4月, 2015 1 次提交
  19. 27 4月, 2015 2 次提交
  20. 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
  21. 15 4月, 2015 2 次提交
  22. 27 3月, 2015 1 次提交
  23. 18 3月, 2015 1 次提交
  24. 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
  25. 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
  26. 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
  27. 14 1月, 2015 1 次提交
  28. 13 1月, 2015 1 次提交
  29. 04 1月, 2015 1 次提交
  30. 24 11月, 2014 1 次提交
  31. 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