summaryrefslogtreecommitdiff
path: root/tests/qemu-iotests/common.pattern
AgeCommit message (Collapse)AuthorFilesLines
2013-11-07block: qemu-iotests, add quotes to $TEST_IMG usage io pattern testsJeff Cody1-6/+6
The usage of $TEST_IMG was not properly quoted everywhere in common.pattern. Signed-off-by: Jeff Cody <jcody@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-09-06qemu-iotests: Whitespace cleanupKevin Wolf1-2/+2
These scripts used to have a four characters indentation, with eight consecutive spaces converted into a tab. Convert everything into spaces. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2012-02-23qemu-iotests: Use zero-based offsets for IO patternsStefan Hajnoczi1-2/+2
The io_pattern style functions have the following loop: for i in `seq 1 $count`; do echo ... $(( start + i * step )) ... done Offsets are 1-based so start=1024, step=512, count=4 yields: 1536, 2048, 2560, 3072 Normally we expect: 1024, 1536, 2048, 2560 Most tests ignore this detail, which means that they perform I/O to a slightly different range than expected by the test author. Later on things got less innocent and tests started trying to compensate for the 1-based indexing. This included negative start values in test 024 and my own attempt with count-1 in test 028! The end result is that tests that use io_pattern are hard to reason about and don't work the way you'd expect. It's time to clean this mess up. This patch switches io_pattern to 0-based offsets. This requires adjusting the golden outputs since I/O ranges are now shifted and output differs. Verifying these output diffs is easy, however. Each diff hunk moves one I/O from beyond the end of the pattern range to the beginning. Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
2012-02-22qemu-iotests: explicitly use bash interpreterStefan Hajnoczi1-1/+1
The tests use bash language features like 'let', which aren't supported by /bin/sh on systems that use a conservative shell like dash. This patch changes the interpreter to /bin/bash. Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
2012-02-22qemu-iotests: test larger clusters sizes on qcow2Kevin Wolf1-2/+3
This patch adds test case 023 which tests some more cluster sizes. For anythinger larger than 4k clusters we can't use requests that are l2_size or more (128k for 1k clusters, 2 MB for 4k clusters, 512 MB for 64k clusters). Therefore one of the common.pattern cases is changed and needs new expected results for some old test cases. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
2012-02-22qemu-iotests: align test requests according to cluster sizeKevin Wolf1-29/+37
Change the io_test and io_test2 functions to take the cluster size of the image and the number of test requests to issue. Tests are changed to specify a cluster size (usually 4k), but expected test results stay the same for now (apart from qemu-img printing the cluster size now). Based on a patch written by Christoph Hellwig. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
2012-02-22qemu-iotests: common.pattern: allow spaces in io() operationKevin Wolf1-9/+9
We need to be able to pass "write -b" as an operation to the pattern testing functions. Unfortunately, this contains a space character... Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
2012-02-22qemu-iotests: replace FSF postal addresses with www.gnu.org linksChristoph Hellwig1-3/+1
Blue Swirl notices that we were using the old FSF post address in the license boilerplates. Replace both the old and new address with links to the gnu.org licenses homepage as suggested by Ben Pfaff. Signed-off-by: Christoph Hellwig <hch@lst.de>
2012-02-22qemu-iotests: test qemu-img convert with backing file for the output imageKevin Wolf1-0/+15
Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
2012-02-22qemu-iotests: make a few more tests genericChristoph Hellwig1-1/+1
Pretend that a non-implemented check is always successful and thus allow various tests that were qcow2-specific before to be generic. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Kevin Wolf <kwolf@redhat.com>
2012-02-22qemu-iotests: Initial import into the public repository.Christoph Hellwig1-0/+118
Signed-off-by: Kevin Wolf <kwolf@redhat.com>