qemu-iotests: add qcow2.py set-feature-bit command
This new command sets feature bits in the image file header:
qcow2.py set-feature-bit incompatible|compatible|autoclear <bit>
The bit number must be in the range [0, 64).
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>...
qemu-iotests: add 036 autoclear feature bit test
This new test validates the autoclear feature bit behavior. When QEMUopens a qcow2v3 image file with an unknown autoclear feature bit the bitshould be cleared in the image file header.
qemu-iotests: fill streaming test image with data
The TestStreamStop test case is racy; if the job completes before we cancancel it, it fails. If we remove the sleep the job will be canceledbefore it has even started, and the test succeeds but it is also not...
qemu-iotests: start vms in qtest mode
This way, they will not execute any VM code at all. However, right nowthe cancellation test is "relying" on being slowed down by TCG executingBIOS code. So, change the timeouts.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>...
qemu-iotests: Some backing file COW tests
Looks like we're still missing these very basic tests for backing filehandling.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
qemu-iotests: COW with many AIO requests on the same cluster
This one is a bit more interesting. The COW operation isn't performedcompletely synchronously, and therefore dependencies must be handledcorrectly when multiple requests write to the same unallocated cluster....
qemu-iotests: mark 035 qcow2-only
The 035 parallel aio write test relies on knowledge of qcow2 metadatalayout to stress parallel L2 table accesses. This only works for qcow2unless we add additional calculations for qed or other formats.
Mark this test as qcow2-only....
stream: do not copy unallocated sectors from the base
Unallocated sectors should really never be accessed by the guest,so there's no need to copy them during the streaming process.If they are read by the guest during streaming, guest-initiatedcopy-on-read will copy them (we're in the base == NULL case, which...
stream: add testcase for partial streaming
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>Signed-off-by: Kevin Wolf <kwolf@redhat.com>
stream: fix sectors not allocated test
The test on sectors not allocated can fail if the L1/L2 tables arenot on disk yet. Allow tests to shutdown the VM early.
qemu-io: correctly print non-integer values as decimals
qemu-io's cvtstr function sometimes will incorrectly omit thedecimal part of the number, and sometimes will incorrectly includeit. This patch fixes both. The former is more serious, and canbe seen in the patches to 027.out and 033.out....
qemu-iotests: strip spaces from qemu-img/qemu-io/qemu command lines
A trailing space is left when qemu-img has no arguments, for example if-nocache is not used. This becomes an empty argument after split()and causes qemu-io to fail.
qemu-iotests: ignore fragmentation information for qed
We added image fragmentation statistics functions to qemu-img several daysago, those patches will cause "./check -qed" failed. This patch will ignorefragmentation statistics information of qed format, and then "./check -qed"...
qemu-iotests: Many parallel allocating I/O requests
This test case manages to let qcow2 abort because its cache is used upand it can't find free cache entries for new requests any more.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
qemu-iotests: add block-stream speed value test case
Add tests to exercise the InvalidParameter 'speed' error code path, aswell as the regular success case for setting the speed. Theblock-stream 'speed' parameter allows the speed limit of the job to be...
Merge remote-tracking branch 'qmp/queue/qmp' into staging
qmp: make block job command naming consistent
The block streaming and job commands used '_' instead of '-' for reasonsof compatibility with libvirt, which already included support for the'_' naming. However, the semantics of block_job_cancel have changed and...
qemu-iotests: add a simple test for write_zeroes
qemu-iotests: Test backing file COW with zero clusters
qemu-iotests: Add -o and make v3 the default for qcow2
This adds an -o option to qemu-iotests, which is an option string thatis passed through to qemu-img create -o... This allows testing differentsubformat with a command like './check -qcow2 -o compat=0.10'....
qemu-iotests: Fix test 031 for qcow2 v3 support
qcow2.py must be updated to work with version 3 images at all, theoutput has changed since the feature table extension has been added, andversion 2 and version 3 images can't possibly have the same test output....
iotests: Resolve test failures caused by hostname
`hostname -s` may output an errror:hostname: Name or service not knownThis causes all tests to fail for `make check-block`.
Suppress such error messages, letting the tests succeed.
Signed-off-by: Andreas Färber <afaerber@suse.de>...
qemu-iotests: Always filter cluster_size out in _make_test_img
Some image formats do have a cluster size, others don't, but there aretests that work with both sets of images and currently we get failuresbecause the qemu-img create output doesn't mention the cluster size for...
qemu-iotests: Test bdrv_close while AIO is in flight
If the BlockDriverState is closed/freed without draining the AIOrequests first, the request coroutines may work on invalid data and filedescriptors or have some dangling pointers that cause segfaults....
iotests: fix error in 005
According comment, we should not read again, we will write.
Signed-off-by: Dong Xu Wang <wdongxu@linux.vnet.ibm.com>Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>Signed-off-by: Kevin Wolf <kwolf@redhat.com>
qemu-iotests: Fix call syntax for qemu-io
qemu-io requires options first, then fixed parameters.
GNU getopt also allows options at the end, but POSIX getoptdoesn't. Try "export POSIXLY_CORRECT=y" to get the POSIXbehaviour with GNU getopt, too.
Cc: Kevin Wolf <kwolf@redhat.com>...
qemu-iotests: Fix call syntax for qemu-img
qemu-img requires first options, then file name, then size.
qemu-iotests: qcow2.py
This adds a tool that is meant to inspect and edit qcow2 files in alow-level way, that wouldn't be possible with qemu-img/io, for exampleby adding yet unknown extensions or flags. This way we can test whetherqemu deals properly with future backwards compatible extensions....
qemu-iotests: Test unknown qcow2 header extensions
The immportant thing here is that header extensions don't get silentlydropped when the header is rewritten, e.g. during a rebase.
qemu-iotests: Mark some tests as quick
This creates a new test group 'quick' for some test case that take atmost a couple of seconds each, so that the group can be run during aquick 'make check'
qemu-iotests: export TEST_DIR for non-bash tests
Since qemu-iotests may need to create large image files it is possibleto specify the test directory. The TEST_DIR variable needs to beexported so non-bash tests can make use of it.
qemu-iotests: add iotests Python module
Block layer tests that involve QMP commands rather than qemu-img orqemu-io are not well-suited for shell scripting. This patch adds aPython module which allows tests to be written in Python instead.
The basic API is:...
test: add image streaming tests
This patch adds a test suite for the image streaming feature. Itexercises the 'block_stream', 'block_job_cancel', 'block_job_set_speed',and 'query-block-jobs' QMP commands.
qemu-iotests: Filter out DOS line endings
This one makes it possible to run qemu-iotests on a Windows build using Wineand get somewhat meaningful results.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
qemu-iotests: 026: Reduce output changes for cache=none qcow2
qemu-iotests supports the -nocache option which makes the tests run withcache=none. For blkdebug tests with qcow2 this means that we may seetest results that differ from cache=writethrough. This patch makes the...
qemu-iotests: Test rebase with short backing file
This tests that qemu-img rebase doesn't assume that the backing file hasthe same size as the image, but considers that it can be smaller.
qemu-iotests: only run 016 for file and sheepdog protocols
016 writes past EOF which isn't support by most protocols, so limitit 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: common.config: Fix no $TEST_DIR directory
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: Update rbd support
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: add qed support to 025 image resize test
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 filter for default cluster size
Until recently, qemu-img create displayed cluster_size=0 for the defaultcluster size. It is changed to display the real cluster size now, which resultsin the cluster size not being filtered out any more....
qemu-iotests: test loading internal snapshots
Test loading internal snapshots where the L1 table of the snapshotis smaller than the current L1 table.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>Signed-off-by: Christoph Hellwig <hch@lst.de>
qemu-iotests: check: print relevant path information
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: common.config: Allow use of arbitrary qemu* paths
Since we might want to test arbitrary qemu, qemu-img andqemu-io paths, allow users to specify environment variablevalues for QEMU_PROG, QEMU_IMG_PROG and QEMU_IO_PROG sothe testsuite will use those values rather than find them...
qemu-iotests: add support for qed format
qemu-iotests: README: Fix spelling
Signed-off-by: Stefan Weil <weil@mail.berlios.de>Signed-off-by: Christoph Hellwig <hch@lst.de>
qemu-iotests: filter IMGFMT correctly in 019
Test 019 can be run with qcow2 and qed image formats. Replace thespecific image format value with "IMGFMT" so the golden output does nothardcode qcow2 or qed.
This patch also includes a typo fix for "occurrences"....
qemu-iotests: add support for rbd and sheepdog protocols
This patch introduces tests for protocols other than file, andinitially 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: Use zero-based offsets for IO patterns
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...
qemu-iotests: filter TEST_DIR correctly in 019
qemu-iotests: test qemu-img rebase
qemu-iotests: explicitly use bash interpreter
The tests use bash language features like 'let', which aren't supportedby /bin/sh on systems that use a conservative shell like dash. Thispatch changes the interpreter to /bin/bash.
qemu-iotests: test bdrv_truncate
This patch adds an image resize grow test to ensure that existing datais not lost during grow and new space is zeroed.
qemu-iotests: improve rebase test
The old test didn't consider cases in which the COW files contains someunallocated clusters and after them allocated ones again.
qemu-iotests: qcow2 error path tests
This adds test cases for qcow2 error paths (using blkdebug)
qemu-iotests: consider more cases in parsing qemu-io output
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...
qemu-iotests: improve test for qemu-img convert with backing file
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...
qemu-iotests: add sub-cluster allocating write test for sparse image formats
Image formats that grow the image file on demand and are organized intoclusters must handle sub-cluster allocating writes. Such writes toucha portion of a previously unallocated data cluster. After the image...
qemu-iotests: add read/write from smaller backing image test
Some image formats support backing images that are smaller than theimage file. This patch adds a test that verifies that reads and writesbeyond the end of backing image work.
Unallocated reads beyond the end of the backing file should produce...
qemu-iotests: update expected results after qemu-img changes
The error message for leaked clusters has changed. qemu-iotests needs to beupdated to pass 026 again.
qemu-iotests: fix 019 golden output
qemu-iotests: fix pattern for write test
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 forqemu-io. Without it, qemu-io cannot interpret hex values...
qemu-iotests: test I/O after EOF for growable files
Signed-off-by: Christoph Hellwig <hch@lst.de>Reviwed-by: Kevin Wolf <kwolf@redhat.com>
qemu-iotests: simple backing file test
qemu-iotests: test merge of backing file when converting
qemu-iotests: test qemu-img convert with backing file for the output image
qemu-iotests: test commiting changes to backing file
qemu-iotests: replace FSF postal addresses with www.gnu.org links
Blue Swirl notices that we were using the old FSF post address in thelicense boilerplates. Replace both the old and new address with linksto the gnu.org licenses homepage as suggested by Ben Pfaff....
qemu-iotests: test invalid pattern argument handling in qemu-io
Signed-off-by: Christoph Hellwig <hch@lst.de>Reviewed-by: Kevin Wolf <kwolf@redhat.com>
qemu-iotests: common.pattern: allow spaces in io() operation
We need to be able to pass "write -b" as an operation to the pattern testingfunctions. Unfortunately, this contains a space character...
qemu-iotests: test bdrv_load/save_vmstate
qemu-iotests: fix expected result for 019 after qemu-io change
The output of the alloc command in qemu-io has changed.
qemu-iotests: add support for vdi format "static" option
VDI supports an image option 'static'.Ignore "static=off" from qemu-img output.
qemu-iotests: align test requests according to cluster size
Change the io_test and io_test2 functions to take the cluster size of the imageand the number of test requests to issue. Tests are changed to specify acluster size (usually 4k), but expected test results stay the same for now...
qemu-iotests: 019: Make cluster size dynamic
Change the offsets for test requests according to CLUSTER_SIZE.
qemu-iotests: test larger clusters sizes on qcow2
This patch adds test case 023 which tests some more cluster sizes. Foranythinger larger than 4k clusters we can't use requests that are l2_size ormore (128k for 1k clusters, 2 MB for 4k clusters, 512 MB for 64k clusters)....
qemu-iotests: add test for refcount table growth and snapshots
015: Combined test to grow the refcount table and test snapshots.
qemu-iotests: add support for the vdi image format
qemu-iotests: remove test image after 015 is done
qemu-iotests: make a few more tests generic
Pretend that a non-implemented check is always successful and thus allowvarious tests that were qcow2-specific before to be generic.
qemu-iotests: skip test 005 for vpc format images
The vpc format doesn't support large enough image size for this test.
qemu-iotests: Initial import into the public repository.