summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* Merge qemu-iotests into for-anthonyKevin Wolf2012-02-2369-0/+153385
|\
| * qemu-iotests: common.config: Allow use of arbitrary qemu* pathsLucas Meneghel Rodrigues2012-02-231-3/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | Since we might want to test arbitrary qemu, qemu-img and qemu-io paths, allow users to specify environment variable values for QEMU_PROG, QEMU_IMG_PROG and QEMU_IO_PROG so the testsuite will use those values rather than find them on PATH. Obviously, if such env variables are not set prior to script execution, normal detection mechanism takes place. Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
| * qemu-iotests: check: print relevant path informationLucas Meneghel Rodrigues2012-02-231-0/+3
| | | | | | | | | | | | | | | | Print the paths of the programs under test (qemu, qemu-img and qemu-io). Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
| * qemu-iotests: test loading internal snapshotsKevin Wolf2012-02-233-0/+76
| | | | | | | | | | | | | | | | Test loading internal snapshots where the L1 table of the snapshot is smaller than the current L1 table. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
| * qemu-iotests: Update filter for default cluster sizeKevin Wolf2012-02-232-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Until recently, qemu-img create displayed cluster_size=0 for the default cluster size. It is changed to display the real cluster size now, which results in the cluster size not being filtered out any more. If the cluster size is specified explicitly in CLUSTER_SIZE, keep the output, and if using the default, filter it out. This mostly restores the old behaviour of the test cases; test 015 must be fixed to use CLUSTER_SIZE instead of using extra_img_options for it. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
| * qemu-iotests: add qed support to 025 image resize testStefan Hajnoczi2012-02-231-1/+1
| | | | | | | | | | | | | | | | QED now supports the truncate (aka resize) operation for growing images. Update test 025 so it runs for QED. Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
| * qemu-iotests: Update rbd supportJosh Durgin2012-02-231-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>
| * qemu-iotests: common.config: Fix no $TEST_DIR directoryMitnick Lyu2012-02-231-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>
| * qemu-iotests: only run 016 for file and sheepdog protocolsChristoph Hellwig2012-02-231-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>
| * qemu-iotests: Use zero-based offsets for IO patternsStefan Hajnoczi2012-02-2312-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>
| * qemu-iotests: add support for rbd and sheepdog protocolsMORITA Kazutaka2012-02-2331-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>
| * qemu-iotests: filter IMGFMT correctly in 019Stefan Hajnoczi2012-02-233-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>
| * qemu-iotests: README: Fix spellingStefan Weil2012-02-231-1/+1
| | | | | | | | | | Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Christoph Hellwig <hch@lst.de>
| * qemu-iotests: add support for qed formatStefan Hajnoczi2012-02-239-9/+16
| | | | | | | | | | Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
| * qemu-iotests: filter TEST_DIR correctly in 019Christoph Hellwig2012-02-232-3/+3
| | | | | | | | Signed-off-by: Kevin Wolf <kwolf@redhat.com>
| * qemu-iotests: fix 019 golden outputKevin Wolf2012-02-221-15/+562
| | | | | | | | | | Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
| * qemu-iotests: update expected results after qemu-img changesKevin Wolf2012-02-221-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>
| * qemu-iotests: add read/write from smaller backing image testStefan Hajnoczi2012-02-223-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>
| * qemu-iotests: add sub-cluster allocating write test for sparse image formatsStefan Hajnoczi2012-02-223-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>
| * qemu-iotests: improve test for qemu-img convert with backing fileKevin Wolf2012-02-221-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>
| * qemu-iotests: consider more cases in parsing qemu-io outputKevin Wolf2012-02-221-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>
| * qemu-iotests: qcow2 error path testsKevin Wolf2012-02-223-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>
| * qemu-iotests: improve rebase testKevin Wolf2012-02-222-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>
| * qemu-iotests: test bdrv_truncateStefan Hajnoczi2012-02-223-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>
| * qemu-iotests: explicitly use bash interpreterStefan Hajnoczi2012-02-2230-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>
| * qemu-iotests: test qemu-img rebaseKevin Wolf2012-02-223-0/+186
| | | | | | | | | | Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
| * qemu-iotests: test larger clusters sizes on qcow2Kevin Wolf2012-02-227-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>
| * qemu-iotests: 019: Make cluster size dynamicKevin Wolf2012-02-222-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>
| * qemu-iotests: align test requests according to cluster sizeKevin Wolf2012-02-2210-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>
| * qemu-iotests: add support for vdi format "static" optionStefan Weil2012-02-221-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>
| * qemu-iotests: fix expected result for 019 after qemu-io changeKevin Wolf2012-02-221-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>
| * qemu-iotests: test bdrv_load/save_vmstateKevin Wolf2012-02-223-0/+8867
| | | | | | | | | | Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
| * qemu-iotests: common.pattern: allow spaces in io() operationKevin Wolf2012-02-221-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>
| * qemu-iotests: test invalid pattern argument handling in qemu-ioChristoph Hellwig2012-02-223-0/+156
| | | | | | | | | | Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Kevin Wolf <kwolf@redhat.com>
| * qemu-iotests: replace FSF postal addresses with www.gnu.org linksChristoph Hellwig2012-02-2226-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>
| * qemu-iotests: test commiting changes to backing fileKevin Wolf2012-02-223-0/+1186
| | | | | | | | | | Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
| * qemu-iotests: test qemu-img convert with backing file for the output imageKevin Wolf2012-02-224-0/+1213
| | | | | | | | | | Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
| * qemu-iotests: test merge of backing file when convertingKevin Wolf2012-02-223-0/+1183
| | | | | | | | | | Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
| * qemu-iotests: simple backing file testKevin Wolf2012-02-224-0/+1181
| | | | | | | | | | Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
| * qemu-iotests: test I/O after EOF for growable filesChristoph Hellwig2012-02-223-0/+96
| | | | | | | | | | Signed-off-by: Christoph Hellwig <hch@lst.de> Reviwed-by: Kevin Wolf <kwolf@redhat.com>
| * qemu-iotests: fix pattern for write testStefan Weil2012-02-221-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>
| * qemu-iotests: make a few more tests genericChristoph Hellwig2012-02-228-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>
| * qemu-iotests: remove test image after 015 is doneChristoph Hellwig2012-02-221-1/+1
| | | | | | | | Signed-off-by: Christoph Hellwig <hch@lst.de>
| * qemu-iotests: add support for the vdi image formatChristoph Hellwig2012-02-221-0/+6
| | | | | | | | Signed-off-by: Christoph Hellwig <hch@lst.de>
| * qemu-iotests: add test for refcount table growth and snapshotsKevin Wolf2012-02-223-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>
| * qemu-iotests: skip test 005 for vpc format imagesChristoph Hellwig2012-02-221-1/+4
| | | | | | | | | | | | The vpc format doesn't support large enough image size for this test. Signed-off-by: Kevin Wolf <kwolf@redhat.com>
| * qemu-iotests: Initial import into the public repository.Christoph Hellwig2012-02-2239-0/+110986
| | | | Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* qapi: add tests for string-based visitorsPaolo Bonzini2012-02-211-2/+10
| | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* tests: Silence gtester in MakefileStefan Weil2012-01-191-1/+1
| | | | | | | | This prettifies make output a little by avoiding a very long line. As gtester prints the checks when they are run, no information is lost. Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
* cris: Update paths to match the move of tests/crisEdgar E. Iglesias2012-01-131-5/+5
| | | | Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
OpenPOWER on IntegriCloud