summaryrefslogtreecommitdiffstats
path: root/tests/qemu-iotests/040
Commit message (Collapse)AuthorAgeFilesLines
* qemu-iotests: Add qemu-io format option in Python testsKevin Wolf2014-12-101-16/+16
| | | | | | | | | Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Max Reitz <mreitz@redhat.com> Message-id: 1416497234-29880-4-git-send-email-kwolf@redhat.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* iotests: Omit length/offset test in 040 and 041Max Reitz2014-11-031-3/+1
| | | | | | | | | | | | | | | | | | | As of a follow-up patch to this one, the length of a mirror block job will no longer directly depend on the size of the block device; therefore, drop these checks from this test. Instead, just check whether the final offset equals the block job length. As 041 uses the wait_until_completed function from iotests.py, the same applies there as well which in turn affects tests 030, 055 and 056. On the other hand, a block job's length does not have to be related to the length of the image file in the first place, so that check was questionable anyway. Signed-off-by: Max Reitz <mreitz@redhat.com> Reviewed-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-id: 1414159063-25977-7-git-send-email-mreitz@redhat.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
* block: make 'top' argument to block-commit optionalJeff Cody2014-07-011-10/+18
| | | | | | | | | | | | | | | | Now that active layer block-commit is supported, the 'top' argument no longer needs to be mandatory. Change it to optional, with the default being the active layer in the device chain. [kwolf: Rebased and resolved conflict in tests/qemu-iotests/040] Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Benoit Canet <benoit@irqsave.net> Signed-off-by: Jeff Cody <jcody@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
* qemu-iotests: Test BLOCK_JOB_READY event for 0Kb image active commitFam Zheng2014-06-261-3/+9
| | | | | | | | | | There should be a BLOCK_JOB_READY event with active commit, regardless of image length. Let's test the 0 length image case, and make sure it goes through the ready->complete process. Signed-off-by: Fam Zheng <famz@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* qemu-iotests: Drop assert_no_active_commit in case 040Fam Zheng2014-01-311-16/+12
| | | | | | | It is exactly assert_no_active_block_jobs in iotests.py Signed-off-by: Fam Zheng <famz@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
* qemu-iotests: Update test cases for commit activeFam Zheng2013-12-201-42/+32
| | | | | | | | Factor out commit test common logic into super class, and update test of committing the active image. Signed-off-by: Fam Zheng <famz@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
* qemu-iotests: Make test case 030, 040 and 055 deterministicFam Zheng2013-11-291-1/+3
| | | | | | | Pause the drive and start the block job, so we won't miss the block job. Signed-off-by: Fam Zheng <famz@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
* qemu-iotests: Drop local version of cancel_and_wait from 040Fam Zheng2013-11-291-15/+0
| | | | | | | iotests.py already has one. Signed-off-by: Fam Zheng <famz@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
* qemu-iotests: drop duplicated "create_image"Fam Zheng2013-10-301-12/+2
| | | | | | | There's a same common function in iotests.py Signed-off-by: Fam Zheng <famz@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* qemu-iotests: add relative backing file tests for block-commit (040)Jeff Cody2012-10-241-0/+102
| | | | | | | | | The previous block commit used absolute filenames for all block-commit images and commands; this adds relative filenames for the same tests. Signed-off-by: Jeff Cody <jcody@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* block: in commit, determine base image from the top imageJeff Cody2012-10-241-2/+2
| | | | | | | | | | | | | | | | | | This simplifies some code and error checking, and also fixes a bug. bdrv_find_backing_image() should only be passed absolute filenames, or filenames relative to the chain. In the QMP message handler for block commit, when looking up the base do so from the determined top image, so we know it is reachable from top. Some of the error messages put out by block-commit have changed slightly, which causes 2 tests cases for block-commit to fail. This patch updates the test cases to look for the correct error output. Signed-off-by: Jeff Cody <jcody@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* qemu-iotests: add initial tests for live block commitJeff Cody2012-09-281-0/+178
Derived from the streaming test cases (030), this adds the following 9 tests: 1. For the following image chain, commit [mid] into [backing], and use qemu-io to verify [backing] has its original data, as well as the data from [mid] [backing] <-- [mid] <-- [test] 2. Verifies that 'block-commit' with the 'speed' parameter sets the speed parameter, as reported by 'query-block-jobs' 3. Verifies that a bogus 'device' parameter to 'block-commit' results in error 4-9: Appropriate error values returned for the following argument errors: * top == base * top is nonexistent * base is nonexistent * top == active layer (this is currently not supported) * top and base arguments are reversed * top argument is omitted Signed-off-by: Jeff Cody <jcody@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
OpenPOWER on IntegriCloud