summaryrefslogtreecommitdiff
path: root/tests/qemu-iotests/244
AgeCommit message (Collapse)Author
2021-03-30iotests/244: Test preallocation for data-file-rawMax Reitz
Three test cases: (1) Adding a qcow2 (metadata) file to an existing data file, see whether we can read the existing data through the qcow2 image. (2) Append data to the data file, grow the qcow2 image accordingly, see whether we can read the new data through the qcow2 image. (3) At runtime, add a backing image to a freshly created qcow2 image with an external data file (with data-file-raw). Reading data from the qcow2 image must return the same result as reading data from the data file, so everything in the backing image must be ignored. (This did not use to be the case, because without the L2 tables preallocated, all clusters would appear as unallocated, and so the qcow2 driver would fall through to the backing file.) Signed-off-by: Max Reitz <mreitz@redhat.com> Message-Id: <20210326145509.163455-3-mreitz@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
2021-01-20iotests: define group in each iotestVladimir Sementsov-Ogievskiy
We are going to drop group file. Define group in tests as a preparatory step. The patch is generated by cd tests/qemu-iotests grep '^[0-9]\{3\} ' group | while read line; do file=$(awk '{print $1}' <<< "$line"); groups=$(sed -e 's/^... //' <<< "$line"); awk "NR==2{print \"# group: $groups\"}1" $file > tmp; cat tmp > $file; done Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-Id: <20210116134424.82867-7-vsementsov@virtuozzo.com> Signed-off-by: Eric Blake <eblake@redhat.com>
2020-09-07iotests: Test that qcow2's data-file is flushedMax Reitz
Flushing a qcow2 node must lead to the data-file node being flushed as well. Signed-off-by: Max Reitz <mreitz@redhat.com> Reviewed-by: Andrey Shinkevich <andrey.shinkevich@virtuozzo.com> Reviewed-by: Kevin Wolf <kwolf@redhat.com>
2020-04-30qemu-iotests: allow qcow2 external discarded clusters to contain stale dataPaolo Bonzini
Test 244 checks the expected behavior of qcow2 external data files with respect to zero and discarded clusters. Filesystems however are free to ignore discard requests, and this seems to be the case for overlayfs. Relax the tests to skip checks on the external data file for discarded areas, which implies not using qemu-img compare in the data_file_raw=on case. This fixes docker tests on RHEL8. Cc: Kevin Wolf <kwolf@redhat.com> Cc: qemu-block@nongnu.org Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Message-Id: <20200409191006.24429-1-pbonzini@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2020-02-18iotests: Test copy offloading with external data fileKevin Wolf
This adds a test for 'qemu-img convert' with copy offloading where the target image has an external data file. If the test hosts supports it, it tests both the case where copy offloading is supported and the case where it isn't (otherwise we just test unsupported twice). More specifically, the case with unsupported copy offloading tests qcow2_alloc_cluster_abort() with external data files. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Message-Id: <20200211094900.17315-4-kwolf@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2020-01-06iotests: Disable data_file where it cannot be usedMax Reitz
Signed-off-by: Max Reitz <mreitz@redhat.com> Message-id: 20191107163708.833192-22-mreitz@redhat.com [mreitz: Also disable 273] Signed-off-by: Max Reitz <mreitz@redhat.com>
2020-01-06iotests: Use _rm_test_img for deleting test imagesMax Reitz
Just rm will not delete external data files. Use _rm_test_img every time we delete a test image. (In the process, clean up the indentation of every _cleanup() this patch touches.) ((Also, use quotes consistently. I am happy to see unquoted instances like "rm -rf $TEST_DIR/..." go.)) Signed-off-by: Max Reitz <mreitz@redhat.com> Reviewed-by: Maxim Levitsky <mlevitsk@redhat.com> Message-id: 20191107163708.833192-16-mreitz@redhat.com Signed-off-by: Max Reitz <mreitz@redhat.com>
2020-01-06iotests: Replace IMGOPTS= by -oMax Reitz
Tests should not overwrite all user-supplied image options, but only add to it (which will effectively overwrite conflicting values). Accomplish this by passing options to _make_test_img via -o instead of $IMGOPTS. For some tests, there is no functional change because they already only appended options to IMGOPTS. For these, this patch is just a simplification. For others, this is a change, so they now heed user-specified $IMGOPTS. Some of those tests do not work with all image options, though, so we need to disable them accordingly. Signed-off-by: Max Reitz <mreitz@redhat.com> Reviewed-by: Maxim Levitsky <mlevitsk@redhat.com> Message-id: 20191107163708.833192-12-mreitz@redhat.com Signed-off-by: Max Reitz <mreitz@redhat.com>
2019-05-21tests/qemu-iotests: Do not hard-code the path to bashThomas Huth
bash is installed in a different directory on non-Linux systems like FreeBSD. Do not hard-code /bin/bash here so that the tests can run there, too. Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Acked-by: Christian Borntraeger <borntraeger@de.ibm.com> Message-Id: <20190502084506.8009-4-thuth@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
2019-03-08qemu-iotests: General tests for qcow2 with external data fileKevin Wolf
Signed-off-by: Kevin Wolf <kwolf@redhat.com>