1. 13 3月, 2017 1 次提交
  2. 11 11月, 2016 1 次提交
  3. 12 5月, 2016 3 次提交
    • D
      block: enable testing of LUKS driver with block I/O tests · 4e9b25fb
      Daniel P. Berrange 提交于
      This adds support for testing the LUKS driver with the block
      I/O test framework.
      
         cd tests/qemu-io-tests
         ./check -luks
      
      A handful of test cases are modified to work with luks
      
       - 004 - whitelist luks format
       - 012 - use TEST_IMG_FILE instead of TEST_IMG for file ops
       - 048 - use TEST_IMG_FILE instead of TEST_IMG for file ops.
               don't assume extended image contents is all zeros,
               explicitly initialize with zeros
               Make file size smaller to avoid having to decrypt
               1 GB of data.
       - 052 - don't assume initial image contents is all zeros,
               explicitly initialize with zeros
       - 100 - don't assume initial image contents is all zeros,
               explicitly initialize with zeros
      
      With this patch applied, the results are as follows:
      
        Passed: 001 002 003 004 005 008 009 010 011 012 021 032 043
                047 048 049 052 087 100 134 143
        Failed: 033 120 140 145
       Skipped: 007 013 014 015 017 018 019 020 022 023 024 025 026
                027 028 029 030 031 034 035 036 037 038 039 040 041
                042 043 044 045 046 047 049 050 051 053 054 055 056
                057 058 059 060 061 062 063 064 065 066 067 068 069
                070 071 072 073 074 075 076 077 078 079 080 081 082
                083 084 085 086 087 088 089 090 091 092 093 094 095
                096 097 098 099 101 102 103 104 105 107 108 109 110
                111 112 113 114 115 116 117 118 119 121 122 123 124
                128 129 130 131 132 133 134 135 136 137 138 139 141
                142 144 146 148 150 152
      
      The reasons for the failed tests are:
      
       - 033 - needs adapting to use image opts syntax with blkdebug
               and test image in order to correctly set align property
       - 120 - needs adapting to use correct -drive syntax for luks
       - 140 - needs adapting to use correct -drive syntax for luks
       - 145 - needs adapting to use correct -drive syntax for luks
      
      The vast majority of skipped tests are exercising code that is
      qcow2 specific, though a couple could probably be usefully
      enabled for luks too.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      Message-id: 1462896689-18450-4-git-send-email-berrange@redhat.com
      Signed-off-by: NMax Reitz <mreitz@redhat.com>
      4e9b25fb
    • D
      block: add support for encryption secrets in block I/O tests · b7e875b2
      Daniel P. Berrange 提交于
      The LUKS block driver tests will require the ability to specify
      encryption secrets with block devices. This requires using the
      --object argument to qemu-img/qemu-io to create a 'secret'
      object.
      
      When the IMGKEYSECRET env variable is set, it provides the
      password to be associated with a secret called 'keysec0'
      
      The _qemu_img_wrapper function isn't modified as that needs
      to cope with differing syntax for subcommands, so can't be
      made to use the image opts syntax unconditionally.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      Message-id: 1462896689-18450-3-git-send-email-berrange@redhat.com
      Signed-off-by: NMax Reitz <mreitz@redhat.com>
      b7e875b2
    • D
      block: add support for --image-opts in block I/O tests · 076003f5
      Daniel P. Berrange 提交于
      Currently all block tests use the traditional syntax for images
      just specifying a filename. To support the LUKS driver without
      resorting to JSON, the tests need to be able to use the new
      --image-opts argument to qemu-img and qemu-io.
      
      This introduces a new env variable IMGOPTSSYNTAX. If this is
      set to 'true', then qemu-img/qemu-io should use --image-opts.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      Message-id: 1462896689-18450-2-git-send-email-berrange@redhat.com
      Signed-off-by: NMax Reitz <mreitz@redhat.com>
      076003f5
  4. 30 3月, 2016 1 次提交
    • D
      block: an interoperability test for luks vs dm-crypt/cryptsetup · 6278ae03
      Daniel P. Berrange 提交于
      It is important that the QEMU luks implementation retains 100%
      compatibility with the reference implementation provided by
      the combination of the linux kernel dm-crypt module and cryptsetup
      userspace tools.
      
      There is a matrix of tests to be performed with different sets
      of encryption settings. For each matrix entry, two tests will
      be performed. One will create a LUKS image with the cryptsetup
      tool and then do I/O with both cryptsetup & qemu-io. The other
      will create the image with qemu-img and then again do I/O with
      both cryptsetup and qemu-io.
      
      The new I/O test 149 performs interoperability testing between
      QEMU and the reference implementation. Such testing inherantly
      requires elevated privileges, so to this this the user must have
      configured passwordless sudo access. The test will automatically
      skip if sudo is not available.
      
      The test has to be run explicitly thus:
      
          cd tests/qemu-iotests
          ./check -luks 149
      Reviewed-by: NEric Blake <eblake@redhat.com>
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      6278ae03
  5. 11 11月, 2015 1 次提交
  6. 05 9月, 2015 1 次提交
    • B
      qemu-iotests: disable default qemu devices for cross-platform compatibility · 2711fd33
      Bo Tu 提交于
      This patch fixes an io test suite issue that was introduced with the
      commit c88930a6 'qemu-char: Permit only
      a single "stdio" character device'. The option supresses the creation of
      default devices such as the floopy and cdrom. Output files for test case
      067, 071, 081 and 087 need to be updated to accommodate this change.
      Use virtio-blk instead of virtio-blk-pci as the device driver for test
      case 067. For virtio-blk-pci is the same with virtio-blk as device
      driver but other platform such as s390 may not recognize the virtio-blk-pci.
      
      The default devices differ across machines. As the qemu output often
      contains these devices (or events for them, like opening a CD tray on
      reset), the reference output currently is rather machine-specific.
      
      All existing qemu tests explicitly configure the devices they're working
      with, so just pass -nodefaults to qemu by default to disable the default
      devices. Update the reference outputs accordingly.
      Reviewed-by: NMax Reitz <mreitz@redhat.com>
      Reviewed-by: NMichael Mueller <mimu@linux.vnet.ibm.com>
      Reviewed-by: NSascha Silbe <silbe@linux.vnet.ibm.com>
      Signed-off-by: NXiao Guang Chen <chenxg@linux.vnet.ibm.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      2711fd33
  7. 22 5月, 2015 1 次提交
    • F
      qemu-iotests: Make debugging python tests easier · aa4f592a
      Fam Zheng 提交于
      Adding "-d" option. The output goes to "tee" so it appears in your
      console. Also, raise the verbosity of unnitest runner.
      
      When testing a topic branch, it's possible that a bug introduced by a
      code change makes the python test case hang, with debug output, it is
      much easier to locate the problem.
      
      This can also be helpful if you want to watch the progress of a python
      test, it offers you a way to sense the speed of each test case method
      you're writing.
      
      Note: because there is no easy way to get *both* the verbose output and
      the output expected by ./check comparison, the case would always fail
      with an "output mismatch". The sole purpose of using this option is
      giving developers a quick way to debug when things go wrong.
      Signed-off-by: NFam Zheng <famz@redhat.com>
      Reviewed-by: NStefan Hajnoczi <stefanha@redhat.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      aa4f592a
  8. 10 12月, 2014 2 次提交
  9. 25 9月, 2014 1 次提交
  10. 22 9月, 2014 1 次提交
    • S
      block: delete cow block driver · 550830f9
      Stefan Hajnoczi 提交于
      This patch removes support for the cow file format.
      
      Normally we do not break backwards compatibility but in this case there
      is no impact and it is the most logical option.  Extraordinary claims
      require extraordinary evidence so I will show why removing the cow block
      driver is the right thing to do.
      
      The cow file format is the disk image format for Usermode Linux, a way
      of running a Linux system in userspace.  The performance of UML was
      never great and it was hacky, but it enjoyed some popularity before
      hardware virtualization support became mainstream.
      
      QEMU's block/cow.c is supposed to read this image file format.
      Unfortunately the file format was underspecified:
      
      1. Earlier Linux versions used the MAXPATHLEN constant for the backing
         filename field.  The value of MAXPATHLEN can change, so Linux
         switched to a 4096 literal but QEMU has a 1024 literal.
      
      2. Padding was not used on the header struct (both in the Linux kernel
         and in QEMU) so the struct layout varied across architectures.  In
         particular, i386 and x86_64 were different due to int64_t alignment
         differences.  Linux now uses __attribute__((packed)), QEMU does not.
      
      Therefore:
      
      1. QEMU cow images do not conform to the Linux cow image file format.
      
      2. cow images cannot be shared between different host architectures.
      
      This means QEMU cow images are useless and QEMU has not had bug reports
      from users actually hitting these issues.
      
      Let's get rid of this thing, it serves no purpose and no one will be
      affected.
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      Reviewed-by: NMarkus Armbruster <armbru@redhat.com>
      Message-id: 1410877464-20481-1-git-send-email-stefanha@redhat.com
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      550830f9
  11. 15 8月, 2014 1 次提交
  12. 28 6月, 2014 1 次提交
    • M
      iotests: Allow out-of-tree run · e8f8624d
      Max Reitz 提交于
      As out-of-tree builds are preferred for qemu, running the qemu-iotests
      in that out-of-tree build should be supported as well. To do so, a
      symbolic link has to be created pointing to the check script in the
      source directory. That script will check whether it has been run through
      a symlink, and if so, will assume it is run in the build tree. All
      output and temporary operations performed by iotests are then redirected
      here and, unless specified otherwise by the user, QEMU_PROG etc. will be
      set to paths appropriate for the build tree.
      
      Also, drop making every test case executable if it is not yet, as this
      would modify the source tree which is not desired for out-of-tree runs
      and should be fixed in the repository anyway.
      Signed-off-by: NMax Reitz <mreitz@redhat.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      e8f8624d
  13. 01 4月, 2014 3 次提交
  14. 09 2月, 2014 1 次提交
  15. 04 12月, 2013 3 次提交
  16. 07 11月, 2013 1 次提交
  17. 11 10月, 2013 1 次提交
    • J
      block: qemu-iotests for vhdx, read sample dynamic image · 89e91181
      Jeff Cody 提交于
      This adds the VHDX format to the qemu-iotests format, and adds
      a read test.  The test reads from an existing sample image, that
      was created with Hyper-V under Windwos Server 2012.
      
      The image file is a 1GB dynamic image, with 32MB blocks.
      
      The pattern 0xa5 exists from 0MB-33MB (past a block size boundary)
      
      The pattern 0x96 exists from 33MB-66MB (past another block boundary,
      and leaving a partial blank block)
      
      From 66MB-1024MB, all reads should return 0.
      
      Although 1GB dynamic image with 66MB of data, the bzip2'ed image
      file size is only 874 bytes.
      
      This also adds in the IMGFMT_GENERIC flag, so r/o images can be
      tested (e.g. ./check -vhdx) without failing tests that assume
      r/w support.
      Signed-off-by: NJeff Cody <jcody@redhat.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      89e91181
  18. 06 9月, 2013 1 次提交
  19. 15 4月, 2013 1 次提交
  20. 15 11月, 2012 1 次提交
  21. 17 7月, 2012 1 次提交
  22. 20 4月, 2012 1 次提交
  23. 23 2月, 2012 2 次提交
  24. 22 2月, 2012 4 次提交