1. 12 2月, 2017 2 次提交
  2. 28 10月, 2016 1 次提交
    • K
      qemu-iotests: Fix typo for NFS with IMGOPTSSYNTAX · e5b77eec
      Kevin Wolf 提交于
      Commit 076003f5 added configuration for NFS with IMGOPTSSYNTAX enabled,
      but it didn't use the right variable name: $TEST_DIR_OPTS doesn't exist.
      This fixes the mistake.
      
      However, this doesn't make anything work that was broken before: The
      only way to get IMGOPTSSYNTAX is with -luks, but the combination of
      -luks and -nfs doesn't get qemu-img create commands right (because
      qemu-img create doesn't support --image-opts yet), so even after this
      fix some more work would be required to make the tests pass.
      Reported-by: NTomáš Golembiovský <tgolembi@redhat.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      e5b77eec
  3. 21 9月, 2016 1 次提交
    • R
      qemu-img: add the 'dd' subcommand · 86ce1f6e
      Reda Sallahi 提交于
      This patch adds a basic dd subcommand analogous to dd(1) to qemu-img.
      
      For the start, this implements the bs, if, of and count options and requires
      both if and of to be specified (no stdin/stdout if not specified) and doesn't
      support tty, pipes, etc.
      
      The image format must be specified with -O for the output if the raw format
      is not the intended one.
      
      Two tests are added to test qemu-img dd.
      Signed-off-by: NReda Sallahi <fullmanet@gmail.com>
      Message-id: 20160810024312.14544-1-fullmanet@gmail.com
      Reviewed-by: NStefan Hajnoczi <stefanha@redhat.com>
      [mreitz: Moved test 158 to 170]
      Signed-off-by: NMax Reitz <mreitz@redhat.com>
      86ce1f6e
  4. 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
  5. 15 4月, 2016 1 次提交
  6. 11 11月, 2015 2 次提交
    • J
      qemu-iotests: fix -valgrind option for check · e6c17669
      Jeff Cody 提交于
      Commit 934659c4 switched the iotests to run qemu-io from a bash subshell,
      in order to catch segfaults.  This method is incompatible with the
      current valgrind_qemu_io() bash function.
      
      Move the valgrind usage into the exec subshell in _qemu_io_wrapper(),
      while making sure the original return value is passed back to the
      caller.
      
      Update test output for tests 039, 061, and 137 as it looks for the
      specific subshell command when the process is terminated.
      Reported-by: NKevin Wolf <kwolf@redhat.com>
      Signed-off-by: NJeff Cody <jcody@redhat.com>
      Message-id: 0066fd85d26ca641a1c25135ff2479b7985701cf.1446232490.git.jcody@redhat.com
      Reviewed-by: NMax Reitz <mreitz@redhat.com>
      Signed-off-by: NMax Reitz <mreitz@redhat.com>
      e6c17669
    • J
      qemu-iotests: fix cleanup of background processes · f6c8c2e0
      Jeff Cody 提交于
      Commit 934659c4 switched the iotests to run qemu and qemu-nbd from a bash
      subshell, in order to catch segfaults.  Unfortunately, this means the
      process PID cannot be captured via '$!'. We stopped killing qemu and
      qemu-nbd processes, leaving a lot of orphaned, running qemu processes
      after executing iotests.
      
      Since the process is using exec in the subshell, the PID is the
      same as the subshell PID.
      
      Track these PIDs for cleanup using pidfiles in the $TEST_DIR. Only
      track the qemu PID, however, if requested - not all usage requires
      killing the process.
      Reported-by: NJohn Snow <jsnow@redhat.com>
      Signed-off-by: NJeff Cody <jcody@redhat.com>
      Message-id: 9e4f958b3895b7259b98d845bb46f000ba362869.1446232490.git.jcody@redhat.com
      [mreitz@redhat.com: Replaced '! -z "..."' by '-n "..."']
      Signed-off-by: NMax Reitz <mreitz@redhat.com>
      f6c8c2e0
  7. 05 9月, 2015 1 次提交
    • M
      iotests: Do not suppress segfaults in bash tests · 934659c4
      Max Reitz 提交于
      Currently, if a qemu/qemu-io/qemu-img/qemu-nbd invocation receives a
      segmentation fault, that message is invisible in most cases since the
      output is generally filtered and bash suppresses the segmentation fault
      notice for any but the last element of a pipe.
      
      Most of the time, the test will then fail anyway because of missing
      output, but not necessarily (as happened with test 82 recently).
      
      Fix this by making the corresponding environment variables point to
      wrapper functions which execute the respective command in a subshell.
      
      Giving options to qemu/qemu-io/qemu-img and path names with spaces were
      broken for the Python tests; this patch "accidentally" fixes that.
      Signed-off-by: NMax Reitz <mreitz@redhat.com>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      934659c4
  8. 07 2月, 2015 1 次提交
  9. 13 1月, 2015 1 次提交
  10. 10 12月, 2014 2 次提交
  11. 20 8月, 2014 1 次提交
  12. 15 8月, 2014 1 次提交
  13. 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
  14. 29 4月, 2014 1 次提交
  15. 01 4月, 2014 1 次提交
  16. 01 3月, 2014 1 次提交
  17. 09 2月, 2014 1 次提交
  18. 22 1月, 2014 2 次提交
  19. 04 12月, 2013 2 次提交
  20. 07 11月, 2013 2 次提交
  21. 11 10月, 2013 2 次提交
    • 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
    • M
      qemu-iotests: Discard specific info in _img_info · 4c2e9465
      Max Reitz 提交于
      In _img_info, filter out additional information specific to the image
      format provided by qemu-img info, since tests designed for multiple
      image formats would produce different outputs for every image format
      otherwise.
      
      In a human-readable dump, that new information will always be last for
      each "image information block" (multiple blocks are emitted when
      inspecting the backing file chain). Every block is separated by an empty
      line. Therefore, in this case, everything starting with the line "Format
      specific information:" up to that empty line (or EOF, if it is the last
      block) has to be stripped.
      
      The JSON dump will always emit pretty JSON data. Therefore, the opening
      and closing braces of every object will be on lines which are indented
      by exactly the same amount, and all lines in between will have more
      indentation. Thus, in this case, everything starting with a line
      matching the regular expression /^ *"format-specific": {/ until /^ *},?/
      has to be stripped, where the number of spaces at the beginning of the
      respective lines is equal.
      Signed-off-by: NMax Reitz <mreitz@redhat.com>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      4c2e9465
  22. 27 9月, 2013 2 次提交
  23. 12 9月, 2013 1 次提交
    • M
      qemu-iotests: Adjustments due to error propagation · 2c78857b
      Max Reitz 提交于
      When opening/creating images, propagating errors instead of immediately
      emitting them on occurrence results in errors generally being printed on
      a single line rather than being split up into multiple ones. This in
      turn requires adjustments to some test results.
      
      Also, test 060 used a sed to filter out the test image directory and
      format by removing everything from the affected line after a certain
      keyword; this now also removes the error message itself, which can be
      fixed by using _filter_testdir and _filter_imgfmt.
      
      Finally, _make_test_img in common.rc did not filter out the test image
      directory etc. from stderr. This has been fixed through a redirection of
      stderr to stdout (which is already done in _check_test_img and
      _img_info).
      Signed-off-by: NMax Reitz <mreitz@redhat.com>
      2c78857b
  24. 06 9月, 2013 1 次提交
  25. 06 8月, 2013 1 次提交
  26. 24 5月, 2013 1 次提交
  27. 03 5月, 2013 2 次提交
  28. 15 4月, 2013 1 次提交
  29. 23 2月, 2013 1 次提交