1. 16 2月, 2015 3 次提交
    • J
      libqos/ahci: create libqos/ahci.c · 9a75b0a0
      John Snow 提交于
      With global state removed, code responsible for booting up,
      verifying, and initializing the AHCI HBA is extracted and
      inserted into libqos/ahci.c, which would allow for other
      qtests in the future to quickly grab a meaningfully initialized
      reference to an AHCI HBA.
      
      Even without other users, functionalizing and isolating the code
      assists future AHCI tests that exercise Q35 migration.
      
      For now, libqos/ahci.o will be PC-only, but can be expanded into
      something arch-agnostic in the future, if needed.
      Signed-off-by: NJohn Snow <jsnow@redhat.com>
      Reviewed-by: NPaolo Bonzini <pbonzini@redhat.com>
      Message-id: 1421698563-6977-16-git-send-email-jsnow@redhat.com
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      9a75b0a0
    • J
      libqos: add pc specific interface · 90e5add6
      John Snow 提交于
      Create an operations structure so that the libqos interface can be
      architecture agnostic, and create a pc-specific interface to functions
      like qtest_boot.
      
      Move the libqos object in the Makefile from being ahci-test only to
      being linked with all tests that utilize the libqos features.
      Signed-off-by: NJohn Snow <jsnow@redhat.com>
      Reviewed-by: NPaolo Bonzini <pbonzini@redhat.com>
      Message-id: 1421698563-6977-8-git-send-email-jsnow@redhat.com
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      90e5add6
    • J
      libqos: create libqos.c · dd0029c0
      John Snow 提交于
      The intent of this file is to serve as a misc. utilities file to be
      shared amongst tests that are utilizing libqos facilities.
      
      In a later patch, migration test helpers will be added to libqos.c that
      will allow simplified testing of migration cases where libqos is
      "Just Enough OS" for migrations testing.
      
      The addition of the AHCIQState structure will also allow us to eliminate
      global variables inside of qtests to manage allocators and test instances
      in a better, more functional way.
      
      libqos.c:
              - Add qtest_boot
              - Add qtest_shutdown
      
      libqos.h:
              - Create QOSState structure for allocator and QTestState.
      
      ahci-test.c:
              - Move qtest_boot and qtest_shutdown to libqos.c/h
              - Create AHCIQState to interface with new qtest_boot/shutdown prototypes
              - Modify tests slightly to use new types.
      
      For now, the new object file is only linked to ahci-test, because it still
      relies on pc architecture specific code in libqos. The next two patches will
      reorganize the code to be more general.
      Signed-off-by: NJohn Snow <jsnow@redhat.com>
      Reviewed-by: NPaolo Bonzini <pbonzini@redhat.com>
      Message-id: 1421698563-6977-4-git-send-email-jsnow@redhat.com
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      dd0029c0
  2. 07 2月, 2015 1 次提交
    • F
      block: add event when disk usage exceeds threshold · e2462113
      Francesco Romani 提交于
      Managing applications, like oVirt (http://www.ovirt.org), make extensive
      use of thin-provisioned disk images.
      To let the guest run smoothly and be not unnecessarily paused, oVirt sets
      a disk usage threshold (so called 'high water mark') based on the occupation
      of the device,  and automatically extends the image once the threshold
      is reached or exceeded.
      
      In order to detect the crossing of the threshold, oVirt has no choice but
      aggressively polling the QEMU monitor using the query-blockstats command.
      This lead to unnecessary system load, and is made even worse under scale:
      deployments with hundreds of VMs are no longer rare.
      
      To fix this, this patch adds:
      * A new monitor command `block-set-write-threshold', to set a mark for
        a given block device.
      * A new event `BLOCK_WRITE_THRESHOLD', to report if a block device
        usage exceeds the threshold.
      * A new `write_threshold' field into the `BlockDeviceInfo' structure,
        to report the configured threshold.
      
      This will allow the managing application to use smarter and more
      efficient monitoring, greatly reducing the need of polling.
      
      [Updated qemu-iotests 067 output to add the new 'write_threshold'
      property. --Stefan]
      [Changed g_assert_false() to !g_assert() to fix the build on older glib
      versions. --Kevin]
      Signed-off-by: NFrancesco Romani <fromani@redhat.com>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      Message-id: 1421068273-692-1-git-send-email-fromani@redhat.com
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      e2462113
  3. 06 2月, 2015 1 次提交
    • A
      migration: Append JSON description of migration stream · 8118f095
      Alexander Graf 提交于
      One of the annoyances of the current migration format is the fact that
      it's not self-describing. In fact, it's not properly describing at all.
      Some code randomly scattered throughout QEMU elaborates roughly how to
      read and write a stream of bytes.
      
      We discussed an idea during KVM Forum 2013 to add a JSON description of
      the migration protocol itself to the migration stream. This patch
      adds a section after the VM_END migration end marker that contains
      description data on what the device sections of the stream are composed of.
      
      This approach is backwards compatible with any QEMU version reading the
      stream, because QEMU just stops reading after the VM_END marker and ignores
      any data following it.
      
      With an additional external program this allows us to decipher the
      contents of any migration stream and hopefully make migration bugs easier
      to track down.
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      Signed-off-by: NAmit Shah <amit.shah@redhat.com>
      Signed-off-by: NJuan Quintela <quintela@redhat.com>
      8118f095
  4. 02 2月, 2015 1 次提交
  5. 13 1月, 2015 1 次提交
  6. 16 12月, 2014 2 次提交
  7. 15 10月, 2014 5 次提交
  8. 14 10月, 2014 2 次提交
  9. 05 10月, 2014 1 次提交
  10. 27 9月, 2014 2 次提交
  11. 22 9月, 2014 1 次提交
    • J
      ahci: Adding basic functionality qtest. · 1cd1031d
      John Snow 提交于
      Currently, there is no qtest to test the functionality of
      the AHCI functionality present within the Q35 machine type.
      
      This patch adds a skeleton for an AHCI test suite,
      and adds a simple sanity-check test case where we
      identify that the AHCI device is present, then
      disengage the virtual machine.
      Signed-off-by: NJohn Snow <jsnow@redhat.com>
      Message-id: 1408643079-30675-2-git-send-email-jsnow@redhat.com
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      1cd1031d
  12. 19 9月, 2014 1 次提交
    • M
      tests: disable global props test for old glib · 9d41401b
      Michael S. Tsirkin 提交于
      follow-up patch moves global property tests to subprocesses.
      Unfortunately with old glib this causes:
      
      tests/test-qdev-global-props.c: In function
      ‘test_static_prop’:
      tests/test-qdev-global-props.c:80:5: error: implicit
      declaration of function ‘g_test_trap_subprocess’
      [-Werror=implicit-function-declaration]
      tests/test-qdev-global-props.c:80:5: error: nested extern
      declaration of ‘g_test_trap_subprocess’ [-Werror=nested-externs]
      
      This function was only added in glib 2.38, and our
      minimum version is 2.12.
      
      To fix, disable the test for glib < 2.38.
      
      Apply before that patch to avoid breaking bisect.
      Reported-by: NPeter Maydell <peter.maydell@linaro.org>
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      9d41401b
  13. 08 9月, 2014 2 次提交
  14. 29 8月, 2014 3 次提交
  15. 09 8月, 2014 1 次提交
  16. 18 7月, 2014 1 次提交
  17. 16 7月, 2014 1 次提交
  18. 06 7月, 2014 1 次提交
  19. 23 6月, 2014 2 次提交
  20. 19 6月, 2014 2 次提交
  21. 02 6月, 2014 1 次提交
  22. 28 5月, 2014 2 次提交
    • L
      QemuOpt: add unit tests · 4ba6fabf
      Leandro Dorileo 提交于
      Cover basic aspects and API usage for QemuOpt. The current implementation
      covers the API's planned to be changed by Chunyan Liu in his QEMUOptionParameter
      replacement/cleanup job.
      
      Other APIs should be covered in future improvements.
      
      [Squashing in a small fix "QemuOpt: use qemu_find_opts_err() to avoid
      output on stderr in tests".
      
      qemu_find_opts() calls error_report() instead of propagating the Error
      object.  It is undesirable to clutter test case output with error
      messages from a passing test.
      
      Use qemu_find_opts_err() to avoid the output on stderr.
      --Stefan]
      Signed-off-by: NLeandro Dorileo <l@dorileo.org>
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      4ba6fabf
    • G
      tests: rename acpi-test to bios-tables-test · 501f28ca
      Gabriel L. Somlo 提交于
      The test harness for acpi (generating a boot disk, starting qemu,
      waiting for the BIOS to finish booting before examining guest
      memory, etc.) is perfectly suited for testing other bios tables
      beside acpi, such as e.g., smbios.
      
      This patch renames acpi-test to bios-tables-test to reflect that,
      and in preparation for adding smbios tests.
      Signed-off-by: NGabriel Somlo <somlo@cmu.edu>
      Reviewed-by: NMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      501f28ca
  23. 16 5月, 2014 1 次提交
  24. 09 5月, 2014 2 次提交