aboutsummaryrefslogtreecommitdiffstats
path: root/tests/qemu-iotests
AgeCommit message (Collapse)AuthorFilesLines
2012-02-23qemu-iotests: Update rbd supportJosh Durgin1-1/+1
rbd implements bdrv_truncate, so test 025 will work. Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
2012-02-23qemu-iotests: common.config: Fix no $TEST_DIR directoryMitnick Lyu1-1/+5
mkdir $TEST_DIR on common.config first run Signed-off-by: Mitnick Lyu <mitnick.lyu@gmail.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
2012-02-23qemu-iotests: only run 016 for file and sheepdog protocolsChristoph Hellwig1-2/+1
016 writes past EOF which isn't support by most protocols, so limit it to file and sheepdog, which explicitly support it. Pointed out by Josh Durgin <josh.durgin@dreamhost.com>. Signed-off-by: Christoph Hellwig <hch@lst.de>
2012-02-23qemu-iotests: Use zero-based offsets for IO patternsStefan Hajnoczi12-1863/+1873
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-23qemu-iotests: add support for rbd and sheepdog protocolsMORITA Kazutaka31-4/+89
This patch introduces tests for protocols other than file, and initially supports rbd and sheepdog. Signed-off-by: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp> Signed-off-by: Christoph Hellwig <hch@lst.de>
2012-02-23qemu-iotests: filter IMGFMT correctly in 019Stefan Hajnoczi3-4/+10
Test 019 can be run with qcow2 and qed image formats. Replace the specific image format value with "IMGFMT" so the golden output does not hardcode qcow2 or qed. This patch also includes a typo fix for "occurrences". Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
2012-02-23qemu-iotests: README: Fix spellingStefan Weil1-1/+1
Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Christoph Hellwig <hch@lst.de>
2012-02-23qemu-iotests: add support for qed formatStefan Hajnoczi9-9/+16
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
2012-02-23qemu-iotests: filter TEST_DIR correctly in 019Christoph Hellwig2-3/+3
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2012-02-22qemu-iotests: fix 019 golden outputKevin Wolf1-15/+562
Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
2012-02-22qemu-iotests: update expected results after qemu-img changesKevin Wolf1-30/+90
The error message for leaked clusters has changed. qemu-iotests needs to be updated to pass 026 again. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
2012-02-22qemu-iotests: add read/write from smaller backing image testStefan Hajnoczi3-0/+560
Some image formats support backing images that are smaller than the image file. This patch adds a test that verifies that reads and writes beyond the end of backing image work. Unallocated reads beyond the end of the backing file should produce zeroes. Writes beyond the end of the backing file should copy-on-write using zeroes. Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
2012-02-22qemu-iotests: add sub-cluster allocating write test for sparse image formatsStefan Hajnoczi3-0/+101
Image formats that grow the image file on demand and are organized into clusters must handle sub-cluster allocating writes. Such writes touch a portion of a previously unallocated data cluster. After the image file is grown with the written data, reads of that cluster should work as expected: 1. Sectors before the written region are zero. 2. The written region is present and the data is uncorrupted. 3. Sectors after the written region are zero. Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
2012-02-22qemu-iotests: improve test for qemu-img convert with backing fileKevin Wolf1-23/+36
Additionally to testing the qemu-img convert -B option, also test -o backing_file. Also, the old test acidentlly used a pattern of zeros for most of the writes, so that the allocation test didn't really work out. This is fixed by using an explicit pattern. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
2012-02-22qemu-iotests: consider more cases in parsing qemu-io outputKevin Wolf1-1/+1
I got a bug report with test output diffs like this: -4 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) +4 KiB, 1 ops; 0.0000 sec (inf EiB/sec and inf ops/sec) This patch extends the regular expression to consider terabytes, petabytes and exabytes, and to allow inf as value for the throughput. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
2012-02-22qemu-iotests: qcow2 error path testsKevin Wolf3-0/+751
This adds test cases for qcow2 error paths (using blkdebug) Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
2012-02-22qemu-iotests: improve rebase testKevin Wolf2-2/+85
The old test didn't consider cases in which the COW files contains some unallocated clusters and after them allocated ones again. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
2012-02-22qemu-iotests: test bdrv_truncateStefan Hajnoczi3-0/+105
This patch adds an image resize grow test to ensure that existing data is not lost during grow and new space is zeroed. 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 Hajnoczi30-30/+30
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 qemu-img rebaseKevin Wolf3-0/+186
Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
2012-02-22qemu-iotests: test larger clusters sizes on qcow2Kevin Wolf7-818/+26645
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: 019: Make cluster size dynamicKevin Wolf2-6/+6
Change the offsets for test requests according to CLUSTER_SIZE. 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 Wolf10-42/+59
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: add support for vdi format "static" optionStefan Weil1-2/+2
VDI supports an image option 'static'. Ignore "static=off" from qemu-img output. Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Christoph Hellwig <hch@lst.de>
2012-02-22qemu-iotests: fix expected result for 019 after qemu-io changeKevin Wolf1-2/+2
The output of the alloc command in qemu-io has changed. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
2012-02-22qemu-iotests: test bdrv_load/save_vmstateKevin Wolf3-0/+8867
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: test invalid pattern argument handling in qemu-ioChristoph Hellwig3-0/+156
Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Kevin Wolf <kwolf@redhat.com>
2012-02-22qemu-iotests: replace FSF postal addresses with www.gnu.org linksChristoph Hellwig26-74/+26
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 commiting changes to backing fileKevin Wolf3-0/+1186
Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
2012-02-22qemu-iotests: test qemu-img convert with backing file for the output imageKevin Wolf4-0/+1213
Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
2012-02-22qemu-iotests: test merge of backing file when convertingKevin Wolf3-0/+1183
Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
2012-02-22qemu-iotests: simple backing file testKevin Wolf4-0/+1181
Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
2012-02-22qemu-iotests: test I/O after EOF for growable filesChristoph Hellwig3-0/+96
Signed-off-by: Christoph Hellwig <hch@lst.de> Reviwed-by: Kevin Wolf <kwolf@redhat.com>
2012-02-22qemu-iotests: fix pattern for write testStefan Weil1-1/+1
The write pattern value 0axb is invalid and evaluates to 0, so the read check (which uses a correct value of 0xab) will fail. This failure will only be detected with a separate patch for qemu-io. Without it, qemu-io cannot interpret hex values and always uses a pattern value of 0. Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Christoph Hellwig <hch@lst.de>
2012-02-22qemu-iotests: make a few more tests genericChristoph Hellwig8-9/+10
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: remove test image after 015 is doneChristoph Hellwig1-1/+1
Signed-off-by: Christoph Hellwig <hch@lst.de>
2012-02-22qemu-iotests: add support for the vdi image formatChristoph Hellwig1-0/+6
Signed-off-by: Christoph Hellwig <hch@lst.de>
2012-02-22qemu-iotests: add test for refcount table growth and snapshotsKevin Wolf3-0/+106
015: Combined test to grow the refcount table and test snapshots. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
2012-02-22qemu-iotests: skip test 005 for vpc format imagesChristoph Hellwig1-1/+4
The vpc format doesn't support large enough image size for this test. Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2012-02-22qemu-iotests: Initial import into the public repository.Christoph Hellwig39-0/+110986
Signed-off-by: Kevin Wolf <kwolf@redhat.com>