1. 01 4月, 2014 25 次提交
  2. 14 3月, 2014 4 次提交
    • S
      qemu-iotests: remove 085 and 087 from 'quick' group · 46dea416
      Stefan Hajnoczi 提交于
      The 'quick' group in qemu-iotests are not allowed to run QEMU since we
      don't know which targets are available.  In other words, they may only
      use qemu-img, qemu-io, and qemu-nbd.
      
      Drop 085 and 087 from the 'quick' group since they run QEMU.  This
      makes "make check-block" pass again.
      Reported-by: NMarkus Armbruster <armbru@redhat.com>
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      46dea416
    • S
      qemu-iotests: add 083 NBD client disconnect tests · dc668ded
      Stefan Hajnoczi 提交于
      This new test case uses nbd-fault-injector.py to simulate broken TCP
      connections at each stage in the NBD protocol.  This way we can exercise
      block/nbd-client.c's socket error handling code paths.
      
      In particular, this serves as a regression test to make sure
      nbd-client.c doesn't cause an infinite loop by leaving its
      nbd_receive_reply() fd handler registered after the connection has been
      closed.  This bug was fixed in an earlier patch.
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      dc668ded
    • S
      tests: add nbd-fault-injector.py utility · 1e8ece0d
      Stefan Hajnoczi 提交于
      The nbd-fault-injector.py script is a special kind of NBD server.  It
      throws away all writes and produces zeroes for reads.  Given a list of
      fault injection rules, it can simulate NBD protocol errors and is useful
      for testing NBD client error handling code paths.
      
      See the patch for documentation.  This scripts is modelled after Kevin
      Wolf <kwolf@redhat.com>'s blkdebug block driver.
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      1e8ece0d
    • M
      blockdev: Refuse to open encrypted image unless paused · c3adb58f
      Markus Armbruster 提交于
      Opening an encrypted image takes an additional step: setting the key.
      Between open and the key set, the image must not be used.
      
      We have some protection against accidental use in place: you can't
      unpause a guest while we're missing keys.  You can, however, hot-plug
      block devices lacking keys into a running guest just fine, or insert
      media lacking keys.  In the latter case, notifying the guest of the
      insert is delayed until the key is set, which may suffice to protect
      at least some guests in common usage.
      
      This patch makes the protection apply in more cases, in a rather
      heavy-handed way: it doesn't let you open encrypted images unless
      we're in a paused state.
      
      It doesn't extend the protection to users other than the guest (block
      jobs?).  Use of runstate_check() from block.c is disgusting.  Best I
      can do right now.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      Reviewed-by: NPaolo Bonzini <pbonzini@redhat.com>
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      c3adb58f
  3. 13 3月, 2014 1 次提交
  4. 07 3月, 2014 3 次提交
    • J
      block: qemu-iotests 085 - live snapshots tests · 4089f7c6
      Jeff Cody 提交于
      This adds tests for live snapshots, both through the single
      snapshot command, and the transaction group snapshot command.
      
      The snapshots are done through the QMP interface, using the
      following commands for snapshots:
      
      Single snapshot:
      { 'execute': 'blockdev-snapshot-sync', 'arguments':
                   { 'device': 'virtio0', 'snapshot-file':'...',
                     'format': 'qcow2' } }"
      
      Group snapshot:
      { 'execute': 'transaction', 'arguments':
                    {'actions': [
                        { 'type': 'blockdev-snapshot-sync', 'data' :
                          { 'device': 'virtio0', 'snapshot-file': '...' } },
                        { 'type': 'blockdev-snapshot-sync', 'data' :
                          { 'device': 'virtio1', 'snapshot-file': '...' } } ]
                   } }
      Signed-off-by: NJeff Cody <jcody@redhat.com>
      Reviewed-by: NBenoit Canet <benoit@irqsave.net>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      4089f7c6
    • K
      block: Fix error path segfault in bdrv_open() · eb909c7f
      Kevin Wolf 提交于
      Using an invalid option for a block device that is opened with
      BDRV_O_PROTOCOL led to drv = NULL, and when trying to include the driver
      name in the error message, qemu dereferenced it:
      
          $ x86_64-softmmu/qemu-system-x86_64 -drive file=/tmp/test.qcow2,file.foo=bar
          Segmentation fault (core dumped)
      
      With this patch applied, the expected error message is printed:
      
          $ x86_64-softmmu/qemu-system-x86_64 -drive file=/tmp/test.qcow2,file.foo=bar
          qemu-system-x86_64: -drive file=/tmp/test.qcow2,file.foo=bar: could
          not open disk image /tmp/test.qcow2: Block protocol 'file' doesn't
          support the option 'foo'
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      Reviewed-by: NBenoit Canet <benoit@irqsave.net>
      eb909c7f
    • K
      qemu-iotests: Test a few blockdev-add error cases · c75203c8
      Kevin Wolf 提交于
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      Reviewed-by: NBenoit Canet <benoit@irqsave.net>
      c75203c8
  5. 05 3月, 2014 1 次提交
  6. 01 3月, 2014 4 次提交
  7. 22 2月, 2014 2 次提交