1. 12 6月, 2019 6 次提交
    • E
      backup: Add two new qemu capabilities · 6abda7a4
      Eric Blake 提交于
      Add two capabilities for testing features required for the upcoming
      virDomainBackupBegin: use block-dirty-bitmap-merge as the generic
      witness of bitmap support needed for checkpoints (since all of the
      bitmap management functionalities were finalized in the same qemu 4.0
      release), and the bitmap parameter to nbd-server-add for pull-mode
      backup support.  Even though both capabilities are likely to be
      present or absent together (that is, it is unlikely to encounter a
      qemu that backports only one of the two), it still makes sense to keep
      two capabilities as the two uses are orthogonal (full backups don't
      require checkpoints, push mode backups don't require NBD bitmap
      support, and checkpoints can be used for more than just incremental
      backups).
      
      Existing code is not affected by the new capabilities.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      Acked-by: NPeter Krempa <pkrempa@redhat.com>
      6abda7a4
    • E
      backup: Prepare for Unix sockets in QMP nbd-server-start · 73bf0a9c
      Eric Blake 提交于
      Migration always uses a TCP socket for NBD servers, because we don't
      support same-host migration. But upcoming pull-mode incremental backup
      needs to also support a Unix socket, for retrieving the backup from
      the same host. Support this by plumbing virStorageNetHostDef through
      the monitor calls, since that is a nice reusable struct that can track
      both TCP and Unix sockets.
      
      Update qemumonitorjsontest to verify both forms of the QMP command.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      Acked-by: NPeter Krempa <pkrempa@redhat.com>
      73bf0a9c
    • E
      qemumonitorjsontest: Simplify returns · 1ddc7e03
      Eric Blake 提交于
      Time to remove the cleanup labels rendered useless in the previous
      patch.  There are still plenty of other tests that could be further
      simplified, but I've already spent enough time in this file for now.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      1ddc7e03
    • E
      qemumonitorjsontest: Validate more commands against schema · 4b658bfe
      Eric Blake 提交于
      The DO_TEST() macro in qemumonitorjsontest.c was not passing the
      schema through, which meant that we were not validating any of those
      tests for correct usage according to the schema.
      
      In the process of mechanically altering tests to pass the schema
      through, use VIR_AUTOPTR on all of the affected test instances. The
      next patch will do some further cleanups that it exposes.
      
      Tested by using this hack, where the test mistakenly passed pre-patch,
      but correctly diagnosed the garbage post-patch:
      
      | diff --git i/src/qemu/qemu_monitor_json.c w/src/qemu/qemu_monitor_json.c
      | index 53a7de8b77..86d8450814 100644
      | --- i/src/qemu/qemu_monitor_json.c
      | +++ w/src/qemu/qemu_monitor_json.c
      | @@ -1532,7 +1532,8 @@ qemuMonitorJSONGetStatus(qemuMonitorPtr mon,
      |      if (reason)
      |          *reason = VIR_DOMAIN_PAUSED_UNKNOWN;
      |
      | -    if (!(cmd = qemuMonitorJSONMakeCommand("query-status", NULL)))
      | +    if (!(cmd = qemuMonitorJSONMakeCommand("query-status",
      | +                                           "s:garbage", "foo", NULL)))
      |          return -1;
      |
      |      if (qemuMonitorJSONCommand(mon, cmd, &reply) < 0)
      Suggested-by: NPeter Krempa <pkrempa@redhat.com>
      Signed-off-by: NEric Blake <eblake@redhat.com>
      Acked-by: NPeter Krempa <pkrempa@redhat.com>
      4b658bfe
    • E
      qemumonitorjsontest: Use VIR_AUTOPTR support · 09083437
      Eric Blake 提交于
      Simplify the GEN_TEST_FUNC() and target of the DO_TEST_SIMPLE() macros
      by using autoptr support.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      Acked-by: NPeter Krempa <pkrempa@redhat.com>
      09083437
    • E
      qemumonitortestutils: Add VIR_AUTOPTR support · 2ea60b6f
      Eric Blake 提交于
      Upcoming tests are going to use VIR_AUTOPTR to simplify test cleanup.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      Acked-by: NPeter Krempa <pkrempa@redhat.com>
      2ea60b6f
  2. 10 6月, 2019 15 次提交
  3. 07 6月, 2019 7 次提交
  4. 06 6月, 2019 5 次提交
  5. 05 6月, 2019 2 次提交
  6. 04 6月, 2019 5 次提交