You need to sign in or sign up before continuing.
  1. 28 7月, 2012 1 次提交
  2. 23 7月, 2012 2 次提交
  3. 17 7月, 2012 7 次提交
  4. 09 7月, 2012 3 次提交
  5. 28 6月, 2012 1 次提交
    • A
      qtest: fix infinite loop when QEMU aborts abruptly · 039380a8
      Anthony Liguori 提交于
      From Markus:
      
      Makes "make check" hang:
      
          QTEST_QEMU_BINARY=x86_64-softmmu/qemu-system-x86_64 gtester -k --verbose -m=quick tests/crash-test tests/rtc-test
          TEST: tests/crash-test... (pid=972)
          qemu-system-x86_64: Device needs media, but drive is empty
      [Nothing happens, wait a while, then hit ^C]
          make: *** [check-qtest-x86_64] Interrupt
      
      This was due to the fact that we weren't checked for errors when
      reading from the QMP socket.  This patch adds appropriate error
      checking.
      Reported-by: NMarkus Armbruster <armbru@redhat.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      039380a8
  6. 22 6月, 2012 2 次提交
  7. 15 6月, 2012 7 次提交
  8. 12 6月, 2012 1 次提交
    • M
      rewrite iov_send_recv() and move it to iov.c · 25e5e4c7
      Michael Tokarev 提交于
      Make it much more understandable, add a missing
      iov_cnt argument (number of iovs in the iov), and
      add comments to it.
      
      The new implementation has been extensively tested
      by splitting a large buffer into many small
      randomly-sized chunks, sending it over socket to
      another, slow process and verifying the receiving
      data is the same.
      
      Also add a unit test for iov_send_recv(), sending/
      receiving data between two processes over a socketpair
      using random vectors and random sizes.
      Signed-off-by: NMichael Tokarev <mjt@tls.msk.ru>
      25e5e4c7
  9. 09 6月, 2012 1 次提交
  10. 08 6月, 2012 4 次提交
    • M
    • M
      qapi: String visitor, use %f representation for floats · 173bbb75
      Michael Roth 提交于
      Currently string-output-visitor formats floats as %g, which is nice in
      that trailing 0's are automatically truncated, but otherwise this causes
      some issues:
      
       - it uses 6 significant figures instead of 6 decimal places, which
         means something like 155777.5 (which even has an exact floating point
         representation) will be rounded to 155778 when converted to a string.
      
       - output will be presented in scientific notation when the normalized
         form requires a 10^x multiplier. Not a huge deal, but arguably less
         readable for command-line arguments.
      
       - due to using scientific notation for numbers requiring more than 6
         significant figures, instead of hard-defined decimal places, it
         fails a lot of the test-visitor-serialization unit tests for floats.
      
      Instead, let's just use %f, which is what the QJSON and the QMP visitors
      use.
      Signed-off-by: NMichael Roth <mdroth@linux.vnet.ibm.com>
      Signed-off-by: NAndreas Färber <afaerber@suse.de>
      173bbb75
    • 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
  11. 07 6月, 2012 1 次提交
  12. 26 5月, 2012 2 次提交
    • P
      fdc-test: introduced qtest no_media_on_start and cmos qtest for floppy · 7cd33161
      Pavel Hrdina 提交于
      As default a guest has always one floppy drive so 0x10 byte in CMOS
      has to have 0x40 value. Higher 4 bits means that the first floppy drive
      is 1.44 Mb 3"5 drive and lower 4 bits means the second drive is not present.
      
      After the guest starts DSKCHG bit in DIR register should be set. If there
      is no media in drive, this bit should be set all the time.
      
      Because we start the guest without media in drive, we have to swap
      'eject' and 'change' in 'test_media_change'.
      Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      7cd33161
    • S
      qemu-iotests: mark 035 qcow2-only · b84762e2
      Stefan Hajnoczi 提交于
      The 035 parallel aio write test relies on knowledge of qcow2 metadata
      layout to stress parallel L2 table accesses.  This only works for qcow2
      unless we add additional calculations for qed or other formats.
      
      Mark this test as qcow2-only.
      
      Note that the test is strictly speaking non-deterministic although the
      output produced is reliable with qcow2.  This is because the aio_write
      command returns before the aio write request has completed.  Completions
      can occur at any time afterwards and cause a message to be printed.
      Therefore the exact output of this test is not deterministic but we seem
      to get away with it for qcow2 (maybe due to coroutine and main loop
      scheduling).
      Signed-off-by: NStefan Hajnoczi <stefanha@linux.vnet.ibm.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      b84762e2
  13. 22 5月, 2012 1 次提交
  14. 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
  15. 14 5月, 2012 1 次提交
    • J
      fix some common typos · a31f0531
      Jim Meyering 提交于
      These were identified using: http://github.com/lyda/misspell-check
      and run like this to create a bourne shell script using GNU sed's
      -i option:
      
      git ls-files|grep -vF .bin | misspellings -f - |grep -v '^ERROR:' |perl \
      -pe 's/^(.*?)\[(\d+)\]: (\w+) -> "(.*?)"$/sed -i '\''${2}s!$3!$4!'\'' $1/'
      
      Manually eliding the FP, "rela->real" and resolving "addres" to
      address (not "adders") we get this:
      
        sed -i '450s!thru!through!' Changelog
        sed -i '260s!neccessary!necessary!' coroutine-sigaltstack.c
        sed -i '54s!miniscule!minuscule!' disas.c
        sed -i '1094s!thru!through!' hw/usb/hcd-ehci.c
        sed -i '1095s!thru!through!' hw/usb/hcd-ehci.c
        sed -i '21s!unecessary!unnecessary!' qapi-schema-guest.json
        sed -i '307s!explictly!explicitly!' qemu-ga.c
        sed -i '490s!preceeding!preceding!' qga/commands-posix.c
        sed -i '792s!addres!address!' qga/commands-posix.c
        sed -i '6s!beeing!being!' tests/tcg/test-mmap.c
      
      Also, manually fix "arithmentic", spotted by Peter Maydell:
      
        sed -i 's!arithmentic!arithmetic!' coroutine-sigaltstack.c
      Signed-off-by: NJim Meyering <meyering@redhat.com>
      Reviewed-by: NPeter Maydell <peter.maydell@linaro.org>
      a31f0531
  16. 10 5月, 2012 5 次提交