1. 11 5月, 2018 6 次提交
  2. 10 5月, 2018 10 次提交
  3. 09 5月, 2018 2 次提交
  4. 08 5月, 2018 4 次提交
  5. 07 5月, 2018 18 次提交
    • P
      util: file: Fix usage of STRPREFIX in virFileIsCDROM · 74fad50d
      Peter Krempa 提交于
      STRPREFIX takes only two arguments, but the code it was adapted from
      used function with 3 arguments.
      Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
      74fad50d
    • 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
      qemu: domain: Tolerate NULL 'cfg' in qemuDomainPrepareDiskSourceChain · 30a77217
      Peter Krempa 提交于
      The function will be reused in the test code where we don't care much
      that the gluster debug level can't be populated from the qemu config.
      
      Set the level only when 'cfg' is passed.
      Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
      Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
      30a77217
    • P
      qemu: domain: Export qemuDomainDeviceDefValidateDisk · 1e81f198
      Peter Krempa 提交于
      It will be used in the qemublocktest.
      Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
      Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
      1e81f198
    • 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: Add support for creating 'format' layer for blockdev-add · e17193ac
      Peter Krempa 提交于
      When using blockdev-add and friends, libvirt will need to create also
      properties for the qcow2/raw/... format handler in qemu. This patch adds
      the infrastructure and implements all formats known to libvirt including
      all properties which are expressed at the format level in qemu.
      Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
      Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
      e17193ac