1. 16 5月, 2018 3 次提交
  2. 15 5月, 2018 4 次提交
  3. 14 5月, 2018 5 次提交
  4. 13 5月, 2018 1 次提交
  5. 11 5月, 2018 5 次提交
  6. 08 5月, 2018 1 次提交
  7. 07 5月, 2018 20 次提交
    • P
      tests: qemublock: Test handling of block devices · 55111f35
      Peter Krempa 提交于
      Make sure that 'host_device' is generated for type='block'.
      Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
      Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
      55111f35
    • P
      tests: qemublock: Test handling of all cache modes · ca916d77
      Peter Krempa 提交于
      The test cases would correspond to the following -drive command lines:
      
      dir-fat-cache.xml:
      -drive file=fat:/var/somefiles,if=none,id=drive-dummy,readonly=on,cache=directsync
      -device virtio-blk-pci,scsi=off,drive=drive-dummy,id=dummy,write-cache=off
      
      file-backing_basic-cache-directsync.xml:
      -drive file=/var/lib/libvirt/images/a,format=qcow2,if=none,id=drive-dummy,cache=directsync
      -device virtio-blk-pci,scsi=off,drive=drive-dummy,id=dummy,write-cache=off
      
      file-backing_basic-cache-none.xml:
      -drive file=/var/lib/libvirt/images/a,format=qcow2,if=none,id=drive-dummy,cache=none
      -device virtio-blk-pci,scsi=off,drive=drive-dummy,id=dummy,write-cache=on
      
      file-backing_basic-cache-unsafe.xml:
      -drive file=/var/lib/libvirt/images/a,format=qcow2,if=none,id=drive-dummy,cache=unsafe
      -device virtio-blk-pci,scsi=off,drive=drive-dummy,id=dummy,write-cache=on
      
      file-backing_basic-cache-writeback.xml:
      -drive file=/var/lib/libvirt/images/a,format=qcow2,if=none,id=drive-dummy,cache=writeback
      -device virtio-blk-pci,scsi=off,drive=drive-dummy,id=dummy,write-cache=on
      
      file-backing_basic-cache-writethrough.xml:
      -drive file=/var/lib/libvirt/images/a,format=qcow2,if=none,id=drive-dummy,cache=writethrough
      -device virtio-blk-pci,scsi=off,drive=drive-dummy,id=dummy,write-cache=off
      
      network-qcow2-backing-chain-cache-unsafe.xml:
      -drive file=rbd:rbdpool/rbdimg:id=testuser-rbd:auth_supported=cephx\;none:
              mon_host=host1.example.com\;host2.example.com,
              file.password-secret=node-a-s-secalias,format=qcow2,
              if=none,id=drive-dummy,cache=directsync
      -device virtio-blk-pci,scsi=off,drive=drive-dummy,id=dummy,write-cache=off
      Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
      Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
      ca916d77
    • P
      tests: qemublock: Test handling of 'unmap' and 'detect-zeroes' options · 24db3d99
      Peter Krempa 提交于
      The test cases would correspond to the following -drive command lines:
      
      file-backing_basic-detect.xml:
      -drive file=/var/lib/libvirt/images/a,format=qcow,if=none,id=drive-dummy,detect-zeroes=on
      -device virtio-blk-pci,scsi=off,drive=drive-dummy,id=dummy
      
      file-backing_basic-unmap-detect.xml:
      -drive file=/var/lib/libvirt/images/a,format=qcow,if=none,id=drive-dummy,discard=unmap,detect-zeroes=unmap
      -device virtio-blk-pci,scsi=off,drive=drive-dummy,id=dummy
      
      file-backing_basic-unmap-ignore.xml:
      -drive file=/var/lib/libvirt/images/a,format=qcow,if=none,id=drive-dummy,discard=ignore,detect-zeroes=on
      -device virtio-blk-pci,scsi=off,drive=drive-dummy,id=dummy
      
      file-backing_basic-unmap.xml:
      -drive file=/var/lib/libvirt/images/a,format=qcow,if=none,id=drive-dummy,discard=unmap
      -device virtio-blk-pci,scsi=off,drive=drive-dummy,id=dummy
      Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
      Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
      24db3d99
    • P
      tests: qemublock: Add test combining authentication and encryption · 18458e8f
      Peter Krempa 提交于
      iscsi and rbd support authentication of the connection. Combine it with
      encryption of qcow2.
      
      The top level disk image would generate the following '-drive' cmdline:
      
      -drive file=rbd:rbdpool/rbdimg:id=testuser-rbd:auth_supported=cephx\;none:
                  mon_host=host1.example.com\;host2.example.com,
                  file.password-secret=node-a-s-secalias,encrypt.format=luks,
                  encrypt.key-secret=node-b-f-encalias,format=qcow2,
                  if=none,id=drive-dummy
      -device virtio-blk-pci,scsi=off,drive=drive-dummy,id=dummy
      Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
      Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
      18458e8f
    • P
      tests: qemublock: basic qcow2 tests · 2c71edcf
      Peter Krempa 提交于
      Add tests for backing chain handling, including a very long chain which
      is fully specified in the XML and an unterminated chain.
      
      The top level disk image would generate the following '-drive':
      
      file-qcow2-backing-chain-encryption.xml:
      -drive file=/var/lib/libvirt/images/a,encrypt.format=luks,
          encrypt.key-secret=node-b-f-encalias,format=qcow2,if=none,id=drive-dummy
      -device virtio-blk-pci,scsi=off,drive=drive-dummy,id=dummy
      
      file-qcow2-backing-chain-noopts.xml:
      -drive file=/var/lib/libvirt/images/rhel7.3.1507297895,format=qcow2,if=none,id=drive-dummy
      -device virtio-blk-pci,scsi=off,drive=drive-dummy,id=dummy
      
      file-qcow2-backing-chain-unterminated.xml:
      -drive file=/var/lib/libvirt/images/rhel7.3.1507297895,format=qcow2,if=none,id=drive-dummy
      -device virtio-blk-pci,scsi=off,drive=drive-dummy,id=dummy
      Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
      Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
      2c71edcf
    • P
      tests: qemublock: Add test for raw luks disk format · 23a7f948
      Peter Krempa 提交于
      Apart from adding test data add a function which sets up fake secrets
      for the test.
      
      The top level disk image would generate the following '-drive' cmdline:
      
      -drive file=/path/luks.img,key-secret=test1-encalias,format=luks,if=none,id=drive-dummy
      -device virtio-blk-pci,scsi=off,drive=drive-dummy,id=dummy
      Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
      Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
      23a7f948
    • P
      tests: qemublock: Add test cases for 'aio' options of 'file' storage · ac71f4e6
      Peter Krempa 提交于
      Test that the 'aio' option is applied correctly for the 'file' protocol
      backend and across the backing chain.
      
      The top level disk image would generate the following '-drive' cmdline:
      
      file-backing_basic-aio_threads:
      -drive file=/var/lib/libvirt/images/a,format=qcow,if=none,id=drive-dummy,aio=threads
      -device virtio-blk-pci,scsi=off,drive=drive-dummy,id=dummy
      
      file-raw-aio_native:
      -drive file=/path/to/i.img,format=raw,if=none,id=drive-dummy,cache=none,aio=native
      -device virtio-blk-pci,scsi=off,drive=drive-dummy,id=dummy,write-cache=on
      Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
      Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
      ac71f4e6
    • P
      tests: qemublock: Add test-case for the 'vvfat' driver in qemu · 7e441e2e
      Peter Krempa 提交于
      Test mapping of the 'FAT' disk format to 'vvfat' in qemu.
      
      The top level disk image would generate the following '-drive' cmdline:
      
      dir-fat-readonly.xml:
      -drive file=fat:/var/somefiles,if=none,id=drive-dummy,readonly=on
      -device virtio-blk-pci,scsi=off,drive=drive-dummy,id=dummy
      
      dir-fat-floppy.xml
      -drive file=fat:floppy:/var/somefiles,if=none,id=drive-dummy,readonly=on
      Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
      Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
      7e441e2e
    • P
      tests: qemublock: Add tests for basic backing chain formats · b54af513
      Peter Krempa 提交于
      Formats supporting backing chain such as qed, vmdk, don't have any other
      parameters than the backing store and 'qcow' has only encryption params
      which will be tested extra. Add this test case so they are covered since
      any further test cases will mainly care about 'qcow2' and 'raw'.
      
      The top level disk image would generate the following '-drive' cmdline:
      
      -drive file=/var/lib/libvirt/images/a,format=qed,if=none,id=drive-dummy
      -device virtio-blk-pci,scsi=off,drive=drive-dummy,id=dummy
      Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
      Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
      b54af513
    • P
      tests: qemublock: Add tests for all other format without special options · c4f0e16f
      Peter Krempa 提交于
      Similarly to the 'raw' case add tests for bochs, cloop, dmg, ploop, vdi
      vhd, and vpc. Covering all supported non-backing formats.
      
      Note that the JSON name for 'ploop' maps to 'parallels' and 'vhd' maps
      to 'vhdx'.
      
      Files added here would result in the followint configs:
      
      file-bochs-noopts.xml:
      -drive file=/path/to/i.img,format=bochs,if=none,id=drive-dummy
      -device virtio-blk-pci,scsi=off,drive=drive-dummy,id=dummy
      
      file-cloop-noopts.xml:
      -drive file=/path/to/i.img,format=cloop,if=none,id=drive-dummy
      -device virtio-blk-pci,scsi=off,drive=drive-dummy,id=dummy
      
      file-dmg-noopts.xml:
      -drive file=/path/to/i.img,format=dmg,if=none,id=drive-dummy
      -device virtio-blk-pci,scsi=off,drive=drive-dummy,id=dummy
      
      file-ploop-noopts.xml:
      -drive file=/path/to/i.img,format=ploop,if=none,id=drive-dummy
      -device virtio-blk-pci,scsi=off,drive=drive-dummy,id=dummy
      
      file-vdi-noopts.xml:
      -drive file=/path/to/i.img,format=vdi,if=none,id=drive-dummy
      -device virtio-blk-pci,scsi=off,drive=drive-dummy,id=dummy
      
      file-vhd-noopts.xml:
      -drive file=/path/to/i.img,format=vhd,if=none,id=drive-dummy
      -device virtio-blk-pci,scsi=off,drive=drive-dummy,id=dummy
      
      file-vpc-noopts.xml:
      -drive file=/path/to/i.img,format=vpc,if=none,id=drive-dummy
      -device virtio-blk-pci,scsi=off,drive=drive-dummy,id=dummy
      Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
      Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
      c4f0e16f
    • P
      tests: qemublock: Add basic 'raw' file test · 5ce01b15
      Peter Krempa 提交于
      Test the JSON props generator with a very simple 'raw' image with no
      other options. The node-names for the image are 31 bytes long so that we
      validate our node name detector.
      
      The top level disk image would generate the following '-drive' cmdline:
      
      -drive file=/var/lib/libvirt/images/i.img,format=raw,if=none,id=drive-dummy
      -device virtio-blk-pci,scsi=off,drive=drive-dummy,id=dummy
      Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
      Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
      5ce01b15
    • P
      tests: qemublock: Add testing of blockdev JSON property generator · 8f60653d
      Peter Krempa 提交于
      Add a test infrastructure that will allow testing the JSON object
      generator used for generating data to use with blockdev-add.
      
      The resulting disk including the backing chain is validated to conform
      to the QAPI schema and the expected output files.
      
      The first test cases make sure that libvirt will not allow nodenames
      exceeding 31 chars.
      Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
      Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
      8f60653d
    • P
      tests: Makefile: Sanitize entry for qemublocktest · 5eb34251
      Peter Krempa 提交于
      Remove gnulib from _LDADD and move LDADDS to replace it. Also reformat
      the _SOURCES so that they can be easily extended.
      Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
      Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
      5eb34251
    • P
      tests: qemublock: Rename variables in anticipation of new tests · 21498975
      Peter Krempa 提交于
      New tests will add new data structures so rename the 'data' structure.
      Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
      Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
      21498975
    • P
      qemu: block: Propagate 'legacy' parameter when formatting disk backing · d94aa38f
      Peter Krempa 提交于
      The gluster protocol in qemu uses two styles, one of which is legacy and
      not covered by the QAPI schema.
      
      To allow using of the new style in the blockdev-add code, add a
      parameter for qemuBlockStorageSourceGetBackendProps which will switch
      between the two modes.
      Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
      Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
      d94aa38f
    • P
      qemu: domain: Format storage source node names into private data · 38fd7aec
      Peter Krempa 提交于
      Save and restore node names if we know them or when we will be
      generating them in the status XML.
      Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
      Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
      38fd7aec
    • J
      Deprecate QEMU_CAPS_NO_KVM_PIT · 941c8b0d
      Ján Tomko 提交于
      The -no-kvm-pit-reinjection option has been deprecated since
      its introduction in QEMU 1.3. See commit <1569fa14>.
      
      Drop the capability since all the QEMUs we support allow tuning
      the kvm-pit properties via -global.
      
      Also add the QEMU_CAPS_KVM_PIT_TICK_POLICY to the clock-catchup
      tests, since expecting it to succeed with QEMU that does not
      have kvm-pit makes no sense.
      Signed-off-by: NJán Tomko <jtomko@redhat.com>
      Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
      941c8b0d
    • J
      storage: remove qemu-img help scraping · e5261d8f
      Ján Tomko 提交于
      We have been checking whether qemu-img supports the -o compat
      option by scraping the -help output.
      
      Since we require QEMU 1.5.0 now and this option was introduced in 1.1,
      assume we support it and ditch the help parsing code along with the
      extra qemu-img invocation.
      Signed-off-by: NJán Tomko <jtomko@redhat.com>
      Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
      e5261d8f
    • J
      tests: assume FMT_COMPAT for qemu-img tests · 74abb43a
      Ján Tomko 提交于
      No point in testing outdated command lines.
      Signed-off-by: NJán Tomko <jtomko@redhat.com>
      Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
      74abb43a
    • J
      tests: delete most qemu-img test cases assuming FMT_OPTIONS · 3590ebdf
      Ján Tomko 提交于
      We have two leftover "capabilites" for qemu-img:
      QEMU_IMG_BACKING_FORMAT_OPTIONS
      QEMU_IMG_BACKING_FORMAT_OPTIONS_COMPAT
      
      The former says we are able to specify the backing format via -o
      (which has been the case for a long time now) and the second one
      says we can use -o compat to specify the qcow2 version.
      
      Since we require QEMU 1.5.0, we can always assume -o compat,
      which was introduced in QEMU 1.1.
      
      Drop the test cases using FMT_OPTIONS which have a FMT_COMPAT
      counterpart to prepare for deprecating FMT_OPTIONS (and these flags)
      completely.
      Signed-off-by: NJán Tomko <jtomko@redhat.com>
      Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
      3590ebdf
  8. 04 5月, 2018 1 次提交