1. 19 3月, 2018 1 次提交
  2. 14 3月, 2018 3 次提交
  3. 10 2月, 2018 1 次提交
  4. 26 1月, 2018 1 次提交
  5. 19 12月, 2017 1 次提交
  6. 12 10月, 2017 2 次提交
  7. 06 9月, 2017 1 次提交
  8. 05 9月, 2017 1 次提交
    • S
      iotests.py: add FilePath context manager · f4844ac0
      Stefan Hajnoczi 提交于
      The scratch/ (TEST_DIR) directory is not automatically cleaned up after
      test execution.  It is the responsibility of tests to remove any files
      they create.
      
      A nice way of doing this is to declare files at the beginning of the
      test and automatically remove them with a context manager:
      
        with iotests.FilePath('test.img') as img_path:
            qemu_img(...)
            qemu_io(...)
        # img_path is guaranteed to be deleted here
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      Message-id: 20170824072202.26818-3-stefanha@redhat.com
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      f4844ac0
  9. 23 8月, 2017 1 次提交
  10. 24 7月, 2017 1 次提交
    • K
      qemu-iotests: Avoid unnecessary sleeps · 2c93c5cb
      Kevin Wolf 提交于
      Test cases 030, 041 and 055 used to sleep for a second after calling
      block-job-pause to make sure that the block job had time to actually
      get into paused state. We can instead poll its status and use that one
      second only as a timeout.
      
      The tests also slept a second for checking that the block jobs don't
      make progress while being paused. Half a second is more than enough for
      this.
      
      These changes reduce the total time for the three tests by 25 seconds on
      my laptop (from 155 seconds to 130).
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      2c93c5cb
  11. 07 4月, 2017 1 次提交
  12. 31 10月, 2016 1 次提交
  13. 28 10月, 2016 3 次提交
  14. 23 9月, 2016 1 次提交
  15. 06 9月, 2016 2 次提交
  16. 27 7月, 2016 1 次提交
    • D
      iotest: fix python based IO tests · 4c44b4a4
      Daniel P. Berrange 提交于
      The previous commit refactoring iotests.py:
      
        commit 66613974
        Author: Daniel P. Berrange <berrange@redhat.com>
        Date:   Wed Jul 20 14:23:10 2016 +0100
      
          scripts: refactor the VM class in iotests for reuse
      
      was not properly tested and included a number of broken
      bits.
      
       - The 'event_match' method was not moved into qemu.py
       - The 'self._args' list parameter in QEMUMachine needs
         to be copied otherwise modifications will affect the
         global 'qemu_opts' variable in iotests.py
       - The QEMUQtestMachine class methods had inverted
         parameter order for the super() calls
       - The QEMUQtestMachine class forgot to add
         '-machine accel=qtest'
       - The QEMUQtestMachine class constructor needs to set
         a default 'name' value before using it as it may
         be None
       - The QEMUQtestMachine class constructor needs to use
         named parameters when calling the super constructor
         as it is leaving out some positional parameters.
       - The 'qemu_prog' variable should be a string not a
         list in iotests.py
       - The VM classs constructor needs to use named
         parameters when calling the super constructor
         as it is leaving out some positional parameters.
       - The path to the socket-scm-helper needs to be
         passed into the QEMUMachine class
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      Message-id: 1469549767-27249-1-git-send-email-berrange@redhat.com
      Signed-off-by: NMax Reitz <mreitz@redhat.com>
      4c44b4a4
  17. 22 7月, 2016 1 次提交
  18. 12 5月, 2016 1 次提交
    • S
      qemu-iotests: iotests: fail hard if not run via "check" · 5a8fabf3
      Sascha Silbe 提交于
      Running an iotests-based Python test directly might appear to work,
      but may fail in subtle ways and is insecure:
      
      - It creates files with predictable file names in a world-writable
        location (/var/tmp).
      
      - Tests expect the environment to be set up by check. E.g. 041 and 055
        may take the wrong code paths if QEMU_DEFAULT_MACHINE is not
        set. This can lead to false negatives.
      
      Instead fail hard and tell the user we want to be run via "check".
      
      The actual environment expected by the tests is currently only defined
      by the implementation of "check". We use two of the environment
      variables set by "check" as indication of whether we're being run via
      "check". Anyone writing their own test runner (replacing "check") will
      need to replicate the full environment (in a broader sense, not just
      environment variables) provided by "check" anyway, including setting
      the two environment variables we check. Whereas a regular developer
      just trying to invoke the tests usually won't have both of these
      defined in their environment so we can catch their mistake and give
      out useful advice.
      Signed-off-by: NSascha Silbe <silbe@linux.vnet.ibm.com>
      Reviewed-by: NBo Tu <tubo@linux.vnet.ibm.com>
      Message-id: 1461094442-16014-1-git-send-email-silbe@linux.vnet.ibm.com
      Signed-off-by: NMax Reitz <mreitz@redhat.com>
      5a8fabf3
  19. 20 4月, 2016 1 次提交
  20. 15 4月, 2016 1 次提交
  21. 13 4月, 2016 3 次提交
    • S
      qemu-iotests: iotests.py: get rid of __all__ · 3ef3dcef
      Sascha Silbe 提交于
      The __all__ list contained a typo for as long as the iotests module
      existed. That typo prevented "from iotests import *" (which is the
      only case where iotests.__all__ is used at all) from ever working.
      
      The names used by iotests are highly prone to name collisions, so
      importing them all unconditionally is a bad idea anyway. Since __all__
      is not adding any value, let's just get rid of it.
      
      Fixes: f345cfd0 ("qemu-iotests: add iotests Python module")
      Signed-off-by: NSascha Silbe <silbe@linux.vnet.ibm.com>
      Reviewed-by: NBo Tu <tubo@linux.vnet.ibm.com>
      Message-id: 1459848109-29756-8-git-send-email-silbe@linux.vnet.ibm.com
      Reviewed-by: NMax Reitz <mreitz@redhat.com>
      Signed-off-by: NMax Reitz <mreitz@redhat.com>
      3ef3dcef
    • S
      qemu-iotests: 148: properly skip test if quorum support is missing · 3f647b51
      Sascha Silbe 提交于
      qemu-iotests test case 148 already had some code for skipping the test
      if quorum support is missing, but it didn't work in all
      cases. TestQuorumEvents.setUp() gets run before the actual test class
      (which contains the skipping code) and tries to start qemu with a drive
      using the quorum driver. For some reason this works fine when using
      qcow2, but fails for raw.
      
      As the entire test case requires quorum, just check for availability
      before even starting the test suite. Introduce a verify_quorum()
      function in iotests.py for this purpose so future test cases can make
      use of it.
      Signed-off-by: NSascha Silbe <silbe@linux.vnet.ibm.com>
      Reviewed-by: NBo Tu <tubo@linux.vnet.ibm.com>
      Message-id: 1459848109-29756-5-git-send-email-silbe@linux.vnet.ibm.com
      Reviewed-by: NMax Reitz <mreitz@redhat.com>
      Signed-off-by: NMax Reitz <mreitz@redhat.com>
      3f647b51
    • S
      qemu-iotests: iotests.VM: remove qtest socket on error · c1c71e49
      Sascha Silbe 提交于
      On error, VM.launch() cleaned up the monitor unix socket, but left the
      qtest unix socket behind. This caused the remaining sub-tests to fail
      with EADDRINUSE:
      
      +======================================================================
      +ERROR: testQuorum (__main__.TestFifoQuorumEvents)
      +----------------------------------------------------------------------
      +Traceback (most recent call last):
      +  File "148", line 63, in setUp
      +    self.vm.launch()
      +  File "/home6/silbe/qemu/tests/qemu-iotests/iotests.py", line 247, in launch
      +    self._qmp.accept()
      +  File "/home6/silbe/qemu/tests/qemu-iotests/../../scripts/qmp/qmp.py", line 141, in accept
      +    return self.__negotiate_capabilities()
      +  File "/home6/silbe/qemu/tests/qemu-iotests/../../scripts/qmp/qmp.py", line 57, in __negotiate_capabilities
      +    raise QMPConnectError
      +QMPConnectError
      +
      +======================================================================
      +ERROR: testQuorum (__main__.TestQuorumEvents)
      +----------------------------------------------------------------------
      +Traceback (most recent call last):
      +  File "148", line 63, in setUp
      +    self.vm.launch()
      +  File "/home6/silbe/qemu/tests/qemu-iotests/iotests.py", line 244, in launch
      +    self._qtest = qtest.QEMUQtestProtocol(self._qtest_path, server=True)
      +  File "/home6/silbe/qemu/tests/qemu-iotests/../../scripts/qtest.py", line 33, in __init__
      +    self._sock.bind(self._address)
      +  File "/usr/lib64/python2.7/socket.py", line 224, in meth
      +    return getattr(self._sock,name)(*args)
      +error: [Errno 98] Address already in use
      
      Fix this by cleaning up both the monitor socket and the qtest socket iff
      they exist.
      Signed-off-by: NSascha Silbe <silbe@linux.vnet.ibm.com>
      Reviewed-by: NBo Tu <tubo@linux.vnet.ibm.com>
      Message-id: 1459848109-29756-4-git-send-email-silbe@linux.vnet.ibm.com
      Reviewed-by: NMax Reitz <mreitz@redhat.com>
      Signed-off-by: NMax Reitz <mreitz@redhat.com>
      c1c71e49
  22. 30 3月, 2016 3 次提交
  23. 18 12月, 2015 2 次提交
    • K
      qemu-iotests: Remove cache mode test without medium · fc17c259
      Kevin Wolf 提交于
      Specifying the cache mode for a driver without a medium is not a useful
      thing to do: As long as there is no medium, the cache mode doesn't make
      a difference, and once the 'change' command is used to insert a medium,
      it ignores the old cache mode and makes the new medium use
      cache=writethrough.
      
      Later patches will make it an error to specify the cache mode for an
      empty drive. Remove the corresponding test case.
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      Reviewed-by: NMax Reitz <mreitz@redhat.com>
      fc17c259
    • K
      blockdev: Set 'format' indicates non-empty drive · 39c4ae94
      Kevin Wolf 提交于
      Creating an empty drive while specifying 'format' doesn't make sense.
      The specified format driver would simply be ignored.
      
      Make a set 'format' option an indication that a non-empty drive should
      be created. This makes 'format' consistent with 'driver' and allows
      using it with a block driver that doesn't need any other options (like
      null-co/null-aio).
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      Reviewed-by: NMax Reitz <mreitz@redhat.com>
      39c4ae94
  24. 03 12月, 2015 1 次提交
  25. 05 9月, 2015 4 次提交
  26. 02 7月, 2015 1 次提交