1. 14 5月, 2016 2 次提交
  2. 10 5月, 2016 1 次提交
  3. 05 5月, 2016 2 次提交
    • J
      tests: Add qemucapsprobe helper · f943a28c
      Jiri Denemark 提交于
      Adding new *.replies files for qemucapabilitiestest or updating the
      files when libvirt adds an additional QMP command into the probing
      process is quite painful. The goal of the new qemucapsprobe command is
      to make this process as easy as
      
          tests/qemucapsprobe /path/to/qemu/binary >caps.replies
      Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
      f943a28c
    • J
      tests: Create a shared library with qemu driver · dd214b5f
      Jiri Denemark 提交于
      Currently all qemu driver tests are statically linked to qemu driver
      library, which makes it impossible to mock any API from the library.
      This patch creates a shared qemu driver library which can be used
      instead of the static one.
      
      NB we can't use libvirt_driver_qemu.so directly since it is linked with
      -module and it is supposed to be dlopened.
      Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
      dd214b5f
  4. 03 5月, 2016 1 次提交
    • 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
  5. 24 4月, 2016 1 次提交
    • C
      tests: remove 'reconnect' and 'statstest' · fa90464f
      Cole Robinson 提交于
      These old tests expect to run against a real xen connection via
      xend running on the host. Our intentions for the test suite are
      that it doesn't require interacting with any specific host resources,
      so these don't really belong here.
      fa90464f
  6. 22 4月, 2016 3 次提交
  7. 14 4月, 2016 1 次提交
  8. 20 3月, 2016 1 次提交
  9. 19 3月, 2016 3 次提交
    • M
      tests: Introduce nsslinktest · 5bcd96f5
      Michal Privoznik 提交于
      The only purpose of this test is to catch possible linking
      problems with libnss_libvirt.so.2.
      One of the problems I faced was that the NSS plugin was unloaded
      immediately after it got loaded and the name resolution process
      continued with next configured option. Without any error. It was
      very hard to debug why until I created this simple test and found
      out immediately that there were some symbols missing. The reason
      why problem was not caught in nsstest is that in the test we want
      to use all the fancy stuff and therefore link it with libvirt.la.
      So even if there's a symbol missing in the NSS plugin it will be
      found in the libvirt.la.
      But even after I resolved the issue we still need this test
      because files the NSS plugin is built from are still live (mostly
      those under utils/ dir). So as they change new symbol might be
      required which would render the NSS plugin unusable.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      5bcd96f5
    • M
      nss: Introduce a test · 38e32d4a
      Michal Privoznik 提交于
      A small test to see how is the nss module working.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      38e32d4a
    • M
      nss: Implement _nss_libvirt_gethostbyname3_r · 7dbcb26f
      Michal Privoznik 提交于
      The implementation is pretty straightforward. Moreover, because
      of the nature of things, gethostbyname_r and gethostbyname2_r can
      be implemented at the same time too.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      7dbcb26f
  10. 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
  11. 12 2月, 2016 3 次提交
  12. 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
  13. 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
  14. 09 1月, 2016 1 次提交
  15. 09 12月, 2015 1 次提交
  16. 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
  17. 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
  18. 12 11月, 2015 1 次提交
  19. 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
  20. 03 8月, 2015 1 次提交
  21. 18 6月, 2015 2 次提交
  22. 17 6月, 2015 1 次提交
  23. 16 6月, 2015 1 次提交
  24. 12 6月, 2015 1 次提交
  25. 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
  26. 28 4月, 2015 1 次提交
  27. 27 4月, 2015 2 次提交
  28. 21 4月, 2015 1 次提交