- 30 5月, 2018 1 次提交
-
-
由 Kevin Wolf 提交于
This adds a helper function that returns a list of QMP events that are already filtered through filter_qmp_event(). Signed-off-by: NKevin Wolf <kwolf@redhat.com> Reviewed-by: NMax Reitz <mreitz@redhat.com> Reviewed-by: NJeff Cody <jcody@redhat.com>
-
- 23 5月, 2018 2 次提交
-
-
由 Kevin Wolf 提交于
qmp_to_opts() used to be a method of QMPTestCase, but recently we started to add more Python test cases that don't make use of QMPTestCase. In order to make the method usable there, move it to VM. Signed-off-by: NKevin Wolf <kwolf@redhat.com> Reviewed-by: NMax Reitz <mreitz@redhat.com>
-
由 Kevin Wolf 提交于
This adds a QMP event that is emitted whenever a job transitions from one status to another. Signed-off-by: NKevin Wolf <kwolf@redhat.com> Reviewed-by: NEric Blake <eblake@redhat.com>
-
- 10 4月, 2018 3 次提交
-
-
Support "generic" formats like in bash tests with their _supported_fmt generic The test, supporting "generic" formats will run if IMGFMT_GENERIC = true, which is default, except for bochs and cloop. However, you can use verify_image_format(['generic', 'bochs']), which will run for all except cloop (for this moment). Also, add an assert (we don't want set both arguments) and remove duplication. Signed-off-by: NVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Signed-off-by: NKevin Wolf <kwolf@redhat.com>
-
Signed-off-by: NVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Signed-off-by: NKevin Wolf <kwolf@redhat.com>
-
由 Peter Xu 提交于
If there are more than one events, wait_until_completed() might return the 2nd event even if the 1st event is JOB_COMPLETED, since the for loop will continue to run even if completed is set to True. It never happened before, but it can be triggered when OOB is enabled due to the RESUME startup message. Fix that up. Signed-off-by: NPeter Xu <peterx@redhat.com> Message-Id: <20180408030542.17855-1-peterx@redhat.com> Reviewed-by: NFam Zheng <famz@redhat.com> Reviewed-by: NStefan Hajnoczi <stefanha@redhat.com> Signed-off-by: NEric Blake <eblake@redhat.com>
-
- 19 3月, 2018 1 次提交
-
-
由 John Snow 提交于
Split out the pause command into the actual pause and the wait. Not every usage presently needs to resubmit a pause request. The intent with the next commit will be to explicitly disallow redundant or meaningless pause/resume requests, so the tests need to become more judicious to reflect that. Signed-off-by: NJohn Snow <jsnow@redhat.com> Reviewed-by: NKevin Wolf <kwolf@redhat.com> Reviewed-by: NEric Blake <eblake@redhat.com> Signed-off-by: NKevin Wolf <kwolf@redhat.com>
-
- 14 3月, 2018 3 次提交
-
-
Test - start two vms (vm_a, vm_b) - in a - do writes from set A - do writes from set B - fix bitmap sha256 - clear bitmap - do writes from set A - start migration - than, in b - wait vm start (postcopy should start) - do writes from set B - check bitmap sha256 The test should verify postcopy migration and then merging with delta (changes in target, during postcopy process). Reduce supported cache modes to only 'none', because with cache on time from source.STOP to target.RESUME is unpredictable and we can fail with timout while waiting for target.RESUME. Signed-off-by: NVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Message-id: 20180313180320.339796-14-vsementsov@virtuozzo.com
-
Simple way to have auto generated filenames with auto cleanup. Like FilePath but without using 'with' statement and without additional indentation of the whole test. Signed-off-by: NVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Message-Id: <20180312152126.286890-8-vsementsov@virtuozzo.com> Reviewed-by: NEric Blake <eblake@redhat.com> [eblake: grammar tweak] Signed-off-by: NEric Blake <eblake@redhat.com>
-
Signed-off-by: NVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Reviewed-by: NEric Blake <eblake@redhat.com> Message-Id: <20180312152126.286890-7-vsementsov@virtuozzo.com> Signed-off-by: NEric Blake <eblake@redhat.com>
-
- 10 2月, 2018 1 次提交
-
-
Support default luks options in VM.add_drive and in new library function qemu_img_create. Use it in 205 iotests. Signed-off-by: NVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Message-Id: <20180206182507.21753-1-vsementsov@virtuozzo.com> Reviewed-by: NDaniel P. Berrange <berrange@redhat.com> Signed-off-by: NEric Blake <eblake@redhat.com>
-
- 26 1月, 2018 1 次提交
-
-
Implement QemuIoInteractive to test nbd-server-remove command when there are active connections. Signed-off-by: NVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Message-Id: <20180119135719.24745-5-vsementsov@virtuozzo.com> Signed-off-by: NEric Blake <eblake@redhat.com>
-
- 19 12月, 2017 1 次提交
-
-
由 Stefan Hajnoczi 提交于
The VM.add_object() method can be used to add IOThreads or memory backend objects. Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com> Reviewed-by: NEric Blake <eblake@redhat.com> Message-id: 20171207201320.19284-5-stefanha@redhat.com Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
-
- 12 10月, 2017 2 次提交
-
-
由 Eduardo Habkost 提交于
All scripts that use the QEMUMachine and QEMUQtestMachine classes (device-crash-test, tests/migration/*, iotests.py, basevm.py) already configure logging. The basicConfig() call inside QEMUMachine.__init__() is being kept just to make sure a script would still work if it didn't configure logging. Signed-off-by: NEduardo Habkost <ehabkost@redhat.com> Message-Id: <20171005172013.3098-4-ehabkost@redhat.com> Reviewed-by: NLukáš Doktor <ldoktor@redhat.com> Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
-
由 Eduardo Habkost 提交于
Set up Python logging module instead of relying on QEMUMachine._debug to enable debugging messages. Cc: Kevin Wolf <kwolf@redhat.com> Cc: Max Reitz <mreitz@redhat.com> Cc: qemu-block@nongnu.org Signed-off-by: NEduardo Habkost <ehabkost@redhat.com> Message-Id: <20170927130339.21444-3-ehabkost@redhat.com> Reviewed-by: NDaniel P. Berrange <berrange@redhat.com> Reviewed-by: NLukáš Doktor <ldoktor@redhat.com> Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
-
- 06 9月, 2017 1 次提交
-
-
由 Daniel P. Berrange 提交于
The 194 test has a lot of code that assumes a simple image file. Rewriting this to work with luks is possible, but non-trivial, so blacklist the luks format for now. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com> Message-Id: <20170901105434.3288-3-berrange@redhat.com> Reviewed-by: NEric Blake <eblake@redhat.com> Tested-by: NFam Zheng <famz@redhat.com> [eblake: commit message typo fixed] Reviewed-by: NKashyap Chamarthy <kchamart@redhat.com> Reviewed-by: NStefan Hajnoczi <stefanha@redhat.com> Signed-off-by: NEric Blake <eblake@redhat.com>
-
- 05 9月, 2017 1 次提交
-
-
由 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>
-
- 23 8月, 2017 1 次提交
-
-
由 Stefan Hajnoczi 提交于
Non-shared storage migration with NBD and drive-mirror is currently not tested by qemu-iotests. This test case covers the basic migration scenario. Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com> Based-on: <20170823134242.12080-1-famz@redhat.com> Message-Id: <20170823140506.28723-1-stefanha@redhat.com> Tested-by: NEric Blake <eblake@redhat.com> Signed-off-by: NEric Blake <eblake@redhat.com>
-
- 24 7月, 2017 1 次提交
-
-
由 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>
-
- 07 4月, 2017 1 次提交
-
-
由 Max Reitz 提交于
Signed-off-by: NMax Reitz <mreitz@redhat.com> Reviewed-by: NJohn Snow <jsnow@redhat.com> Reviewed-by: NEric Blake <eblake@redhat.com> Signed-off-by: NKevin Wolf <kwolf@redhat.com>
-
- 31 10月, 2016 1 次提交
-
-
由 Alberto Garcia 提交于
There's many tests that need Quorum support in order to run. At the moment each test implements its own check to see if Quorum is enabled. This patch centralizes all those checks in a new function called iotests.supports_quorum(). Signed-off-by: NAlberto Garcia <berto@igalia.com> Reviewed-by: NKevin Wolf <kwolf@redhat.com> Signed-off-by: NKevin Wolf <kwolf@redhat.com>
-
- 28 10月, 2016 3 次提交
-
-
由 Max Reitz 提交于
Since the order of keys in JSON filenames is not necessarily fixed, they should not be compared to fixed strings. This method takes a Python dict as a reference, parses a given JSON filename and compares both. Signed-off-by: NMax Reitz <mreitz@redhat.com> Signed-off-by: NKevin Wolf <kwolf@redhat.com>
-
由 Max Reitz 提交于
By adding an optional suffix to the files used for communication with a VM, we can launch multiple VM instances concurrently. Reviewed-by: NKevin Wolf <kwolf@redhat.com> Signed-off-by: NMax Reitz <mreitz@redhat.com> Signed-off-by: NKevin Wolf <kwolf@redhat.com>
-
由 Max Reitz 提交于
Signed-off-by: NMax Reitz <mreitz@redhat.com> Signed-off-by: NKevin Wolf <kwolf@redhat.com>
-
- 23 9月, 2016 1 次提交
-
-
由 Kevin Wolf 提交于
We just added the option to use qdev device names in all device related block QMP commands. This patch converts some of the test cases in 118 to use qdev device names instead of BlockBackend names to cover the new way. It converts cases for each of the media change commands, but only for CD-ROM and not everywhere, so that the old way is still tested, too. Signed-off-by: NKevin Wolf <kwolf@redhat.com> Reviewed-by: NEric Blake <eblake@redhat.com>
-
- 06 9月, 2016 2 次提交
-
-
由 Kevin Wolf 提交于
Python tests are already annoying enough to debug. With QMP traffic available it's a little bit easier at least. Signed-off-by: NKevin Wolf <kwolf@redhat.com> Reviewed-by: NEric Blake <eblake@redhat.com>
-
由 Pavel Butsykin 提交于
Added cases to check the backup compression out of qcow2, raw in qcow2 on drive-backup and blockdev-backup. Signed-off-by: NPavel Butsykin <pbutsykin@virtuozzo.com> Reviewed-by: NStefan Hajnoczi <stefanha@redhat.com> Signed-off-by: NDenis V. Lunev <den@openvz.org> CC: Jeff Cody <jcody@redhat.com> CC: Markus Armbruster <armbru@redhat.com> CC: Eric Blake <eblake@redhat.com> CC: John Snow <jsnow@redhat.com> CC: Stefan Hajnoczi <stefanha@redhat.com> CC: Kevin Wolf <kwolf@redhat.com> Signed-off-by: NKevin Wolf <kwolf@redhat.com>
-
- 27 7月, 2016 1 次提交
-
-
由 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>
-
- 22 7月, 2016 1 次提交
-
-
由 Daniel P. Berrange 提交于
The iotests module has a python class for controlling QEMU processes. Pull the generic functionality out of this file and create a scripts/qemu.py module containing a QEMUMachine class. Put the QTest integration support into a subclass QEMUQtestMachine. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com> Message-Id: <1469020993-29426-4-git-send-email-berrange@redhat.com> Signed-off-by: NAmit Shah <amit.shah@redhat.com>
-
- 12 5月, 2016 1 次提交
-
-
由 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>
-
- 20 4月, 2016 1 次提交
-
-
由 Fam Zheng 提交于
This retrieves the virtual size of the image out of qemu-img info. Signed-off-by: NFam Zheng <famz@redhat.com> Reviewed-by: NMax Reitz <mreitz@redhat.com> Reviewed-by: NJeff Cody <jcody@redhat.com> Signed-off-by: NKevin Wolf <kwolf@redhat.com>
-
- 15 4月, 2016 1 次提交
-
-
由 Fam Zheng 提交于
Block nodes are now assigned names automatically, therefore the test case is fragile in using fixed indices in result. Introduce a method in iotests.py and do the matching more sensibly. Signed-off-by: NFam Zheng <famz@redhat.com> Message-id: 1460518995-1338-1-git-send-email-famz@redhat.com Signed-off-by: NMax Reitz <mreitz@redhat.com>
-
- 13 4月, 2016 3 次提交
-
-
由 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>
-
由 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>
-
由 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>
-
- 30 3月, 2016 3 次提交
-
-
由 Daniel P. Berrange 提交于
Add a 'log' method to iotests.py which prints messages to stdout, with optional filtering of data. Port over some standard filters already present in the shell common.filter code to be usable in python too. Reviewed-by: NEric Blake <eblake@redhat.com> Signed-off-by: NDaniel P. Berrange <berrange@redhat.com> Signed-off-by: NKevin Wolf <kwolf@redhat.com>
-
由 Daniel P. Berrange 提交于
The iotests.py helper provides a main() method for running tests via the python unit test framework. Not all tests will want to use this, so refactor it to split the testing of compatible formats and platforms into separate helper methods Reviewed-by: NEric Blake <eblake@redhat.com> Signed-off-by: NDaniel P. Berrange <berrange@redhat.com> Signed-off-by: NKevin Wolf <kwolf@redhat.com>
-
由 Daniel P. Berrange 提交于
The python I/O tests helper for running qemu-img/qemu-io setup stdout to be captured to a pipe, but left stderr untouched. As a result, if something failed in qemu-img/ qemu-io, data written to stderr would get output directly and not line up with data on the test stdout due to buffering. If we explicitly redirect stderr to the same pipe as stdout, things are much clearer when they go wrong. Reviewed-by: NEric Blake <eblake@redhat.com> Signed-off-by: NDaniel P. Berrange <berrange@redhat.com> Signed-off-by: NKevin Wolf <kwolf@redhat.com>
-
- 18 12月, 2015 2 次提交
-
-
由 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>
-
由 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>
-