1. 08 6月, 2012 2 次提交
    • M
      qapi: Unit tests for visitor-based serialization · 2d496105
      Michael Roth 提交于
      Currently we test our visitors individually, and seperately for input
      vs. output. This is useful for validating internal representations
      against the native C types and vice-versa, and other visitor-specific
      testing, but it doesn't cover the potential use-case of using visitor
      pairs for serialization/deserialization very well, and makes it
      hard to easily extend the coverage for different C types / boundary
      conditions.
      
      To cover that we add a set of unit tests that takes a number of native C
      values, passes them into an output visitor, extracts the values with an
      input visitor, then compares the result to the original.
      
      Plugging in new visitors to the test harness only requires a user to
      implement the SerializeOps interface and add it to a list.
      Signed-off-by: NMichael Roth <mdroth@linux.vnet.ibm.com>
      Signed-off-by: NAndreas Färber <afaerber@suse.de>
      2d496105
    • M
      rewrite iov_* functions · 2278a69e
      Michael Tokarev 提交于
      This changes implementations of all iov_*
      functions, completing the previous step.
      
      All iov_* functions now ensure that this offset
      argument is within the iovec (using assertion),
      but lets to specify `bytes' value larger than
      actual length of the iovec - in this case they
      stops at the actual end of iovec.  It is also
      suggested to use convinient `-1' value as `bytes'
      to mean just this -- "up to the end".
      
      There's one very minor semantic change here: new
      requiriment is that `offset' points to inside of
      iovec.  This is checked just at the end of functions
      (assert()), it does not actually need to be enforced,
      but using any of these functions with offset pointing
      past the end of iovec is wrong anyway.
      
      Note: the new code in iov.c uses arithmetic with
      void pointers.  I thought this is not supported
      everywhere and is a GCC extension (indeed, the C
      standard does not define void arithmetic).  However,
      the original code already use void arith in
      iov_from_buf() function:
        (memcpy(..., buf + buf_off,...)
      which apparently works well so far (it is this
      way in qemu 1.0).  So I left it this way and used
      it in other places.
      
      While at it, add a unit-test file test-iov.c,
      to check various corner cases with iov_from_buf(),
      iov_to_buf() and iov_memset().
      Signed-off-by: NMichael Tokarev <mjt@tls.msk.ru>
      2278a69e
  2. 07 6月, 2012 1 次提交
  3. 22 5月, 2012 1 次提交
  4. 19 5月, 2012 1 次提交
    • S
      tests: Fix linker failure for fdc-test · fd4567d9
      Stefan Weil 提交于
      When QEMU was built with the simple trace backend, linking failed:
      
        LINK  tests/fdc-test
      oslib-posix.o: In function `trace_qemu_memalign':
      qemu/bin/debug/x86/./trace.h:31: undefined reference to `trace3'
      oslib-posix.o: In function `trace_qemu_vmalloc':
      qemu/bin/debug/x86/./trace.h:35: undefined reference to `trace2'
      oslib-posix.o: In function `trace_qemu_vfree':
      qemu/bin/debug/x86/./trace.h:39: undefined reference to `trace1'
      collect2: error: ld returned 1 exit status
      make: *** [tests/fdc-test] Fehler 1
      Signed-off-by: NStefan Weil <sw@weilnetz.de>
      Reviewed-by: NKevin Wolf <kwolf@redhat.com>
      Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
      fd4567d9
  5. 10 5月, 2012 2 次提交
  6. 21 4月, 2012 1 次提交
  7. 15 4月, 2012 1 次提交
  8. 31 3月, 2012 1 次提交
  9. 30 3月, 2012 3 次提交
  10. 27 3月, 2012 2 次提交
  11. 26 3月, 2012 2 次提交
  12. 12 3月, 2012 2 次提交
  13. 21 2月, 2012 1 次提交
  14. 19 1月, 2012 1 次提交
  15. 13 1月, 2012 3 次提交
  16. 09 12月, 2011 1 次提交
  17. 07 3月, 2011 1 次提交
  18. 15 1月, 2011 1 次提交
  19. 23 10月, 2010 3 次提交
  20. 08 1月, 2010 1 次提交
    • P
      Use vpath directive · 076d2471
      Paolo Bonzini 提交于
      The vpath directive has two advantages over the VPATH variable:
      1) it allows to skip searching of .o files; 2) the default semantics
      are to append to the vpath, so there is no confusion between "VPATH=xyz"
      and "VPATH+=xyz".
      
      Since "vpath %.c %.h PATH" is not valid, I'm introducing a wrapper
      macro to append one or more directories to the vpath.
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      076d2471
  21. 10 7月, 2009 1 次提交
  22. 22 9月, 2008 1 次提交
  23. 28 5月, 2008 1 次提交
  24. 02 3月, 2008 1 次提交
  25. 31 1月, 2008 1 次提交
  26. 14 11月, 2007 1 次提交
  27. 12 11月, 2007 1 次提交
  28. 08 10月, 2007 1 次提交
  29. 30 4月, 2007 1 次提交