1. 22 7月, 2011 1 次提交
    • D
      Add a test case for certificate validation · bd789dff
      Daniel P. Berrange 提交于
      This test case checks certification validation rules for
      
       - Basic constraints
       - Key purpose
       - Key usage
       - Start/expiry times
      
      It checks initial context creation sanity checks, and live
      session validation
      bd789dff
  2. 02 7月, 2011 1 次提交
  3. 24 6月, 2011 2 次提交
    • D
      Introduce a generic object for using network sockets · 58b5b14e
      Daniel P. Berrange 提交于
      Introduces a simple wrapper around the raw POSIX sockets APIs
      and name resolution APIs. Allows for easy creation of client
      and server sockets with correct usage of name resolution APIs
      for protocol agnostic socket setup.
      
      It can listen for UNIX and TCP stream sockets.
      
      It can connect to UNIX, TCP streams directly, or indirectly
      to UNIX sockets via an SSH tunnel or external command
      
      * src/Makefile.am: Add to libvirt-net-rpc.la
      * src/rpc/virnetsocket.c, src/rpc/virnetsocket.h: Generic
        sockets APIs
      * tests/Makefile.am: Add socket test
      * tests/virnetsockettest.c: New test case
      * tests/testutils.c: Avoid overriding LIBVIRT_DEBUG settings
      * tests/ssh.c: Dumb helper program for SSH tunnelling tests
      58b5b14e
    • D
      Provide a simple object for encoding/decoding RPC messages · ceacc1dd
      Daniel P. Berrange 提交于
      This provides a new struct that contains a buffer for the RPC
      message header+payload, as well as a decoded copy of the message
      header. There is an API for applying a XDR encoding & decoding
      of the message headers and payloads. There are also APIs for
      maintaining a simple FIFO queue of message instances.
      
      Expected usage scenarios are:
      
      To send a message
      
         msg = virNetMessageNew()
      
         ...fill in msg->header fields..
         virNetMessageEncodeHeader(msg)
         ...loook at msg->header fields to determine payload filter
         virNetMessageEncodePayload(msg, xdrfilter, data)
         ...send msg->bufferLength worth of data from buffer
      
      To receive a message
      
         msg = virNetMessageNew()
         ...read VIR_NET_MESSAGE_LEN_MAX of data into buffer
         virNetMessageDecodeLength(msg)
         ...read msg->bufferLength-msg->bufferOffset of data into buffer
         virNetMessageDecodeHeader(msg)
         ...look at msg->header fields to determine payload filter
         virNetMessageDecodePayload(msg, xdrfilter, data)
         ...run payload processor
      
      * src/Makefile.am: Add to libvirt-net-rpc.la
      * src/rpc/virnetmessage.c, src/rpc/virnetmessage.h: Internal
        message handling API.
      * testutils.c, testutils.h: Helper for printing binary differences
      * virnetmessagetest.c: Validate all XDR encoding/decoding
      ceacc1dd
  4. 03 12月, 2010 1 次提交
    • D
      Introduce new APIs for spawning processes · f16ad06f
      Daniel P. Berrange 提交于
      This introduces a new set of APIs in src/util/command.h
      to use for invoking commands. This is intended to replace
      all current usage of virRun and virExec variants, with a
      more flexible and less error prone API.
      
      * src/util/command.c: New file.
      * src/util/command.h: New header.
      * src/Makefile.am (UTIL_SOURCES): Build it.
      * src/libvirt_private.syms: Export symbols internally.
      * tests/commandtest.c: New test.
      * tests/Makefile.am (check_PROGRAMS): Run it.
      * tests/commandhelper.c: Auxiliary program.
      * tests/commanddata/test2.log - test15.log: New expected outputs.
      * cfg.mk (useless_free_options): Add virCommandFree.
      (msg_gen_function): Add virCommandError.
      * po/POTFILES.in: New translation.
      * .x-sc_avoid_write: Add exemption.
      * tests/.gitignore: Ignore new built file.
      f16ad06f
  5. 26 10月, 2010 1 次提交
  6. 10 9月, 2010 1 次提交
    • C
      buf: Fix possible infinite loop in EscapeString, VSnprintf · 18af6f4e
      Cole Robinson 提交于
      The current code will go into an infinite loop if the printf generated
      string is >= 1000, AND exactly 1 character smaller than the amount of free
      space in the buffer. When this happens, we are dropped into the loop body,
      but nothing will actually change, because count == (buf->size - buf->use - 1),
      and virBufferGrow returns unchanged if count < (buf->size - buf->use)
      
      Fix this by removing the '- 1' bit from 'size'. The *nprintf functions handle
      the NULL byte for us anyways, so we shouldn't need to manually accommodate
      for it.
      
      Here's a bug where we are actually hitting this issue:
      https://bugzilla.redhat.com/show_bug.cgi?id=602772
      
      v2: Eric's improvements: while -> if (), remove extra va_list variable,
          make sure we report buffer error if snprintf fails
      
      v3: Add tests/virbuftest which reproduces the infinite loop before this
          patch, works correctly after
      18af6f4e
  7. 30 7月, 2010 1 次提交
    • E
      build: restore operation of bit-rotted 'make cov' · e7064aa6
      Eric Blake 提交于
      './autobuild.sh' with lcov installed discovered that our
      coverage support has been bit-rotting for a while.  This
      restores it back to a successful state, although I have
      not yet spent any time looking through the resulting files to
      look for low-hanging fruit in the unit test coverage front.
      
      * configure.ac: Clear COMPILER_FLAGS at right place.
      * Makefile.am (cov): Newer genhtml no longer likes plain -s.
      * m4/compiler-flags.m4 (gl_COMPILER_FLAGS): Don't AC_SUBST
      COMPILER_FLAGS; it is a shell variable for use in configure only.
      * src/Makefile.am (AM_CFLAGS, AM_LDFLAGS): New variables, to make
      it easier to provide global flag additions.  Use throughout, to
      uniformly apply coverage flags.
      * .gitignore: Globally ignore gcov output.
      * daemon/.gitignore: Simplify.
      * src/.gitignore: Likewise.
      * tests/.gitignore: Likewise.
      e7064aa6
  8. 31 3月, 2010 1 次提交
  9. 16 10月, 2009 3 次提交
  10. 23 9月, 2009 1 次提交
    • M
      ESX add tests for the VMX to/from domain XML mapping · af4c893e
      Matthias Bolte 提交于
      * tests/.gitignore: ignore new test binaries
      * tests/Makefile.am: add new tests
      * tests/esxutilstest.c: test esxVMX_IndexToDiskName()
      * tests/vmx2xmldata/*: config files for the VMX to domain XML test
      * tests/vmx2xmltest.c: test the VMX to domain XML mapping
      * tests/xml2vmxdata/*: config files for the domain XML to VMX test
      * tests/xml2vmxtest.c: test the domain XML to VMX mapping
      af4c893e
  11. 16 7月, 2009 1 次提交
    • D
      netcf XML validation and input and output tests · 788c3151
      Daniel Veillard 提交于
      * tests/interfaceschematest: test all XML data against the interface
        schemas
      * tests/interfacexml2xmltest.c: parse and reserialize all XML data
        and check the output is identical
      * tests/Makefile.am: hook up the tests
      * tests/.gitignore: add ignore test
      788c3151
  12. 16 6月, 2009 1 次提交
  13. 21 5月, 2009 1 次提交
  14. 19 5月, 2009 1 次提交
  15. 13 5月, 2009 1 次提交
  16. 03 4月, 2009 1 次提交
  17. 24 2月, 2009 1 次提交
    • M
      Add nodedevxml2xml test · da61daa2
      Mark McLoughlin 提交于
      Add a test to check node device XML parsing by first parsing
      the XML, then re-formatting as XML and finally comparing the
      resulting XML to the original XML.
      da61daa2
  18. 07 1月, 2009 1 次提交
    • J
      update from gnulib; use its time_r module for localtime_r on mingw · 6c996bfc
      Jim Meyering 提交于
      * bootstrap (modules): Add time_r.
      * gnulib/m4/time_h.m4: New file.
      * gnulib/m4/time_r.m4: New file.
      * gnulib/lib/time_r.c: New file.
      * gnulib/tests/test-time.c: New file.
      * gnulib/lib/time.in.h: New file.
      * gnulib/lib/Makefile.am: Update.
      * gnulib/lib/fseeko.c: Likewise.
      * gnulib/lib/lstat.c: Likewise.
      * gnulib/lib/netdb.in.h: Likewise.
      * gnulib/lib/stdint.in.h: Likewise.
      * gnulib/lib/stdlib.in.h: Likewise.
      * gnulib/lib/sys_select.in.h: Likewise.
      * gnulib/lib/sys_stat.in.h: Likewise.
      * gnulib/lib/sys_time.in.h: Likewise.
      * gnulib/lib/unistd.in.h: Likewise.
      * gnulib/lib/wchar.in.h: Likewise.
      * gnulib/m4/codeset.m4: Likewise.
      * gnulib/m4/errno_h.m4: Likewise.
      * gnulib/m4/extensions.m4: Likewise.
      * gnulib/m4/getaddrinfo.m4: Likewise.
      * gnulib/m4/gettext.m4: Likewise.
      * gnulib/m4/glibc2.m4: Likewise.
      * gnulib/m4/glibc21.m4: Likewise.
      * gnulib/m4/gnulib-cache.m4: Likewise.
      * gnulib/m4/gnulib-comp.m4: Likewise.
      * gnulib/m4/iconv.m4: Likewise.
      * gnulib/m4/include_next.m4: Likewise.
      * gnulib/m4/intdiv0.m4: Likewise.
      * gnulib/m4/intlmacosx.m4: Likewise.
      * gnulib/m4/intmax.m4: Likewise.
      * gnulib/m4/inttypes-pri.m4: Likewise.
      * gnulib/m4/inttypes_h.m4: Likewise.
      * gnulib/m4/lcmessage.m4: Likewise.
      * gnulib/m4/lib-link.m4: Likewise.
      * gnulib/m4/lstat.m4: Likewise.
      * gnulib/m4/netdb_h.m4: Likewise.
      * gnulib/m4/nls.m4: Likewise.
      * gnulib/m4/po.m4: Likewise.
      * gnulib/m4/printf-posix.m4: Likewise.
      * gnulib/m4/printf.m4: Likewise.
      * gnulib/m4/progtest.m4: Likewise.
      * gnulib/m4/size_max.m4: Likewise.
      * gnulib/m4/sockets.m4: Likewise.
      * gnulib/m4/stdint.m4: Likewise.
      * gnulib/m4/stdint_h.m4: Likewise.
      * gnulib/m4/sys_ioctl_h.m4: Likewise.
      * gnulib/m4/threadlib.m4: Likewise.
      * gnulib/m4/uintmax_t.m4: Likewise.
      * gnulib/m4/visibility.m4: Likewise.
      * gnulib/m4/wchar.m4: Likewise.
      * gnulib/m4/wchar_t.m4: Likewise.
      * gnulib/m4/wint_t.m4: Likewise.
      * gnulib/m4/xsize.m4: Likewise.
      * gnulib/tests/Makefile.am: Likewise.
      * gnulib/tests/sockets.h: Likewise.
      * gnulib/tests/.cvsignore: Likewise.
      * gnulib/tests/.gitignore: Likewise.
      * tests/.gitignore: Likewise.
      * docs/examples/.gitignore: Likewise.
      * gnulib/lib/.cvsignore: Likewise.
      * gnulib/lib/.gitignore: Likewise.
      
      remove files associated with obsolete strpbrk module
      * gnulib/lib/strpbrk.c: Remove file.
      * gnulib/m4/strpbrk.m4: Remove file.
      6c996bfc
  19. 29 10月, 2008 1 次提交
  20. 17 10月, 2008 1 次提交
    • J
      generate .gitignore files from .cvsignore ones · 164fbbd6
      Jim Meyering 提交于
      * Makefile.maint (sync-vcs-ignore-files): New target.
      Prompted by a patch from James Morris.
      http://thread.gmane.org/gmane.comp.emulators.libvirt/8619/focus=8773
      Add all (now-generated) .gitignore files.
      * .gitignore: New file.
      * build-aux/.gitignore: New file.
      * docs/.gitignore: New file.
      * docs/devhelp/.gitignore: New file.
      * docs/examples/.gitignore: New file.
      * docs/examples/python/.gitignore: New file.
      * gnulib/lib/.gitignore: New file.
      * gnulib/lib/arpa/.gitignore: New file.
      * gnulib/lib/netinet/.gitignore: New file.
      * gnulib/lib/sys/.gitignore: New file.
      * gnulib/tests/.gitignore: New file.
      * include/.gitignore: New file.
      * include/libvirt/.gitignore: New file.
      * po/.gitignore: New file.
      * proxy/.gitignore: New file.
      * python/.gitignore: New file.
      * python/tests/.gitignore: New file.
      * qemud/.gitignore: New file.
      * src/.gitignore: New file.
      * tests/.gitignore: New file.
      * tests/confdata/.gitignore: New file.
      * tests/sexpr2xmldata/.gitignore: New file.
      * tests/virshdata/.gitignore: New file.
      * tests/xencapsdata/.gitignore: New file.
      * tests/xmconfigdata/.gitignore: New file.
      * tests/xml2sexprdata/.gitignore: New file.
      164fbbd6
  21. 23 5月, 2008 1 次提交
  22. 30 1月, 2008 1 次提交
  23. 26 7月, 2007 1 次提交
  24. 19 7月, 2007 1 次提交
  25. 18 4月, 2007 1 次提交
  26. 24 2月, 2007 1 次提交
  27. 20 1月, 2007 1 次提交
  28. 17 11月, 2006 1 次提交
  29. 04 9月, 2006 1 次提交
  30. 25 8月, 2006 1 次提交
  31. 24 8月, 2006 1 次提交
  32. 06 7月, 2006 1 次提交