1. 12 1月, 2020 1 次提交
  2. 12 3月, 2019 1 次提交
    • E
      ahci-test: Drop dependence on global_qtest · a189a937
      Eric Blake 提交于
      Managing parallel connections to two different monitors via
      the implicit global_qtest makes it hard to copy-and-paste code
      to tests that are not aware of the implicit state; the
      management of global_qtest is even harder to follow because
      it was masked behind set_context().
      
      Instead, explicitly pass QTestState* around (generally, by
      reusing the member already present in ahci->parent QOSState),
      and call explicit qtest_* functions on all places that
      interact with a monitor.
      
      We can assert that the conversion is correct by checking that
      global_qtest remains NULL throughout the test (a later patch
      that changes global_qtest to not be a public global variable
      will drop the assertions).
      Signed-off-by: NEric Blake <eblake@redhat.com>
      Acked-by: NJohn Snow <jsnow@redhat.com>
      [thuth: rebased patch to current master branch]
      Signed-off-by: NThomas Huth <thuth@redhat.com>
      a189a937
  3. 08 3月, 2019 1 次提交
  4. 07 3月, 2019 1 次提交
  5. 14 2月, 2018 2 次提交
    • E
      libqos: Use explicit QTestState for fw_cfg operations · 05e520f1
      Eric Blake 提交于
      Drop one more client of global_qtest by teaching all fw_cfg test
      functionality (invoked through alloc-pc) to pass in an explicit
      QTestState, adjusting all callers.  In particular, fw_cfg-test
      had to reorder things to create the test state prior to creating
      the fw_cfg (and drop a pointless strdup in the meantime), but that
      test now no longer depends on global_qtest.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      Reviewed-by: NJohn Snow <jsnow@redhat.com>
      Reviewed-by: NThomas Huth <thuth@redhat.com>
      [thuth: Fixed conflict wrt pc_alloc_init() in vhost-user-test.c]
      Signed-off-by: NThomas Huth <thuth@redhat.com>
      05e520f1
    • E
      libqos: Track QTestState with QPCIBus · e5d1730d
      Eric Blake 提交于
      When initializing a QPCIBus, track which QTestState the bus is
      associated with (so that a later patch can then explicitly use
      that test state for all communication on the bus, rather than
      blindly relying on global_qtest).  Update the initialization
      functions to take another parameter, and update all callers to
      pass in state (for now, most callers get away with passing the
      current global_qtest as the current state, although this required
      fixing the order of initialization to ensure qtest_start() is
      called before qpci_init*() in rtl8139-test, and provided an
      opportunity to pass in the allocator in e1000e-test).
      
      Touch up some allocations to use g_new0() rather than g_malloc()
      while in the area, and simplify some code (all implementations
      of QOSOps provide a .init_allocator() that never fails).
      Signed-off-by: NEric Blake <eblake@redhat.com>
      Reviewed-by: NJohn Snow <jsnow@redhat.com>
      Reviewed-by: NThomas Huth <thuth@redhat.com>
      [thuth: Removed hunk from vhost-user-test.c that is not required anymore,
       fixed conflict in qtest_vboot() and adjusted qpci_init_pc() in sdhci-test]
      Signed-off-by: NThomas Huth <thuth@redhat.com>
      e5d1730d
  6. 06 10月, 2016 2 次提交
  7. 12 7月, 2016 1 次提交
  8. 14 11月, 2015 1 次提交
  9. 18 9月, 2015 1 次提交
  10. 23 5月, 2015 1 次提交
    • J
      libqos: Add migration helpers · 085248ae
      John Snow 提交于
      libqos.c:
          -set_context for addressing which commands go where
          -migrate performs the actual migration
      
      malloc.c:
          - Structure of the allocator is adjusted slightly with
            a second-tier malloc to make swapping around the allocators
            easy when we "migrate" the lists from the source to the destination.
      Signed-off-by: NJohn Snow <jsnow@redhat.com>
      Reviewed-by: NKevin Wolf <kwolf@redhat.com>
      Message-id: 1430417242-11859-4-git-send-email-jsnow@redhat.com
      085248ae
  11. 29 4月, 2015 2 次提交
  12. 16 2月, 2015 3 次提交
    • 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: add qtest_vboot · f1518d11
      John Snow 提交于
      Add a va_list variant of the qtest_boot function.
      Signed-off-by: NJohn Snow <jsnow@redhat.com>
      Reviewed-by: NPaolo Bonzini <pbonzini@redhat.com>
      Message-id: 1421698563-6977-5-git-send-email-jsnow@redhat.com
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      f1518d11
    • 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