<feed xmlns='http://www.w3.org/2005/Atom'>
<title>bwlp/qemu.git/tests/qemu-iotests/046, branch master</title>
<subtitle>Experimental fork of QEMU with video encoding patches</subtitle>
<id>https://git.openslx.org/bwlp/qemu.git/atom/tests/qemu-iotests/046?h=master</id>
<link rel='self' href='https://git.openslx.org/bwlp/qemu.git/atom/tests/qemu-iotests/046?h=master'/>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/'/>
<updated>2021-03-29T16:06:14+00:00</updated>
<entry>
<title>iotests/046: Filter request length</title>
<updated>2021-03-29T16:06:14+00:00</updated>
<author>
<name>Max Reitz</name>
</author>
<published>2020-09-18T15:33:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=6d7bb95180b9313c8deb65671e65174205b1fd83'/>
<id>urn:sha1:6d7bb95180b9313c8deb65671e65174205b1fd83</id>
<content type='text'>
For its concurrent requests, 046 has always filtered the offset,
probably because concurrent requests may settle in any order.  However,
it did not filter the request length, and so if requests with different
lengths settle in an unexpected order (notably the longer request before
the shorter request), the test fails (for no good reason).

Filter the length, too.

Signed-off-by: Max Reitz &lt;mreitz@redhat.com&gt;
Message-Id: &lt;20200918153323.108932-1-mreitz@redhat.com&gt;
</content>
</entry>
<entry>
<title>iotests: define group in each iotest</title>
<updated>2021-01-20T20:53:22+00:00</updated>
<author>
<name>Vladimir Sementsov-Ogievskiy</name>
</author>
<published>2021-01-16T13:44:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=9dd003a99842d1d82c336e45c5cce656149de382'/>
<id>urn:sha1:9dd003a99842d1d82c336e45c5cce656149de382</id>
<content type='text'>
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}' &lt;&lt;&lt; "$line");
        groups=$(sed -e 's/^... //' &lt;&lt;&lt; "$line");
        awk "NR==2{print \"# group: $groups\"}1" $file &gt; tmp;
        cat tmp &gt; $file;
    done

Signed-off-by: Vladimir Sementsov-Ogievskiy &lt;vsementsov@virtuozzo.com&gt;
Reviewed-by: Eric Blake &lt;eblake@redhat.com&gt;
Message-Id: &lt;20210116134424.82867-7-vsementsov@virtuozzo.com&gt;
Signed-off-by: Eric Blake &lt;eblake@redhat.com&gt;
</content>
</entry>
<entry>
<title>iotests: Enable fuse for many tests</title>
<updated>2020-12-11T16:52:40+00:00</updated>
<author>
<name>Max Reitz</name>
</author>
<published>2020-10-27T19:05:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=57284d2ada481fe557c9a2f00228eca2a83e1d60'/>
<id>urn:sha1:57284d2ada481fe557c9a2f00228eca2a83e1d60</id>
<content type='text'>
Many tests (that do not support generic protocols) can run just fine
with FUSE-exported images, so allow them to.  Note that this is no
attempt at being definitely complete.  There are some tests that might
be modified to run on FUSE, but this patch still skips them.  This patch
only tries to pick the rather low-hanging fruits.

Note that 221 and 250 only pass when .lseek is correctly implemented,
which is only possible with a libfuse that is 3.8 or newer.

Signed-off-by: Max Reitz &lt;mreitz@redhat.com&gt;
Reviewed-by: Kevin Wolf &lt;kwolf@redhat.com&gt;
Message-Id: &lt;20201027190600.192171-20-mreitz@redhat.com&gt;
Signed-off-by: Kevin Wolf &lt;kwolf@redhat.com&gt;
</content>
</entry>
<entry>
<title>iotests/046: Avoid renaming images</title>
<updated>2020-12-11T16:52:40+00:00</updated>
<author>
<name>Max Reitz</name>
</author>
<published>2020-10-27T19:05:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=63c17df7a4a12ccb0c5355c7429bdee943a4aa1d'/>
<id>urn:sha1:63c17df7a4a12ccb0c5355c7429bdee943a4aa1d</id>
<content type='text'>
This generally does not work on non-file protocols.  It is better to
create the image with the final name from the start, and most tests do
this already.  Let 046 follow suit.

Signed-off-by: Max Reitz &lt;mreitz@redhat.com&gt;
Reviewed-by: Kevin Wolf &lt;kwolf@redhat.com&gt;
Message-Id: &lt;20201027190600.192171-11-mreitz@redhat.com&gt;
Signed-off-by: Kevin Wolf &lt;kwolf@redhat.com&gt;
</content>
</entry>
<entry>
<title>iotests: Specify explicit backing format where sensible</title>
<updated>2020-07-14T13:18:59+00:00</updated>
<author>
<name>Eric Blake</name>
</author>
<published>2020-07-06T20:39:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=b66ff2c29817f5efa18f5120fd6f089fbf59a933'/>
<id>urn:sha1:b66ff2c29817f5efa18f5120fd6f089fbf59a933</id>
<content type='text'>
There are many existing qcow2 images that specify a backing file but
no format.  This has been the source of CVEs in the past, but has
become more prominent of a problem now that libvirt has switched to
-blockdev.  With older -drive, at least the probing was always done by
qemu (so the only risk of a changed format between successive boots of
a guest was if qemu was upgraded and probed differently).  But with
newer -blockdev, libvirt must specify a format; if libvirt guesses raw
where the image was formatted, this results in data corruption visible
to the guest; conversely, if libvirt guesses qcow2 where qemu was
using raw, this can result in potential security holes, so modern
libvirt instead refuses to use images without explicit backing format.

The change in libvirt to reject images without explicit backing format
has pointed out that a number of tools have been far too reliant on
probing in the past.  It's time to set a better example in our own
iotests of properly setting this parameter.

iotest calls to create, rebase, and convert are all impacted to some
degree.  It's a bit annoying that we are inconsistent on command line
- while all of those accept -o backing_file=...,backing_fmt=..., the
shortcuts are different: create and rebase have -b and -F, while
convert has -B but no -F.  (amend has no shortcuts, but the previous
patch just deprecated the use of amend to change backing chains).

Signed-off-by: Eric Blake &lt;eblake@redhat.com&gt;
Message-Id: &lt;20200706203954.341758-9-eblake@redhat.com&gt;
Signed-off-by: Kevin Wolf &lt;kwolf@redhat.com&gt;
</content>
</entry>
<entry>
<title>qcow2: Forbid discard in qcow2 v2 images with backing files</title>
<updated>2020-04-07T11:51:09+00:00</updated>
<author>
<name>Alberto Garcia</name>
</author>
<published>2020-03-31T11:43:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=80f5c01183597b075157eb7bedbcb8691f8fa1d1'/>
<id>urn:sha1:80f5c01183597b075157eb7bedbcb8691f8fa1d1</id>
<content type='text'>
A discard request deallocates the selected clusters so they read back
as zeroes. This is done by clearing the cluster offset field and
setting QCOW_OFLAG_ZERO in the L2 entry.

This flag is however only supported when qcow_version &gt;= 3. In older
images the cluster is simply deallocated, exposing any possible stale
data from the backing file.

Since discard is an advisory operation it's safer to simply forbid it
in this scenario.

Note that we are adding this check to qcow2_co_pdiscard() and not to
qcow2_cluster_discard() or discard_in_l2_slice() because the last
two are also used by qcow2_snapshot_create() to discard the clusters
used by the VM state. In this case there's no risk of exposing stale
data to the guest and we really want that the clusters are always
discarded.

Signed-off-by: Alberto Garcia &lt;berto@igalia.com&gt;
Message-Id: &lt;20200331114345.29993-1-berto@igalia.com&gt;
Reviewed-by: Eric Blake &lt;eblake@redhat.com&gt;
Signed-off-by: Max Reitz &lt;mreitz@redhat.com&gt;
</content>
</entry>
<entry>
<title>iotests: Disable data_file where it cannot be used</title>
<updated>2020-01-06T12:43:07+00:00</updated>
<author>
<name>Max Reitz</name>
</author>
<published>2019-11-07T16:37:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=3be2024aefe0024ada2fb5044c230c867ef59c67'/>
<id>urn:sha1:3be2024aefe0024ada2fb5044c230c867ef59c67</id>
<content type='text'>
Signed-off-by: Max Reitz &lt;mreitz@redhat.com&gt;
Message-id: 20191107163708.833192-22-mreitz@redhat.com
[mreitz: Also disable 273]
Signed-off-by: Max Reitz &lt;mreitz@redhat.com&gt;
</content>
</entry>
<entry>
<title>tests/qemu-iotests: Don't use 'seq' in the iotests</title>
<updated>2019-07-23T14:53:25+00:00</updated>
<author>
<name>Thomas Huth</name>
</author>
<published>2019-07-23T11:12:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=30edd9fa50e86fbf40c780bf47d7cb214e6f8438'/>
<id>urn:sha1:30edd9fa50e86fbf40c780bf47d7cb214e6f8438</id>
<content type='text'>
The 'seq' command is not available by default on OpenBSD, so these
iotests are currently failing there. It could be installed as 'gseq'
from the coreutils package - but since it is using a different name
there and we are running the iotests with the "bash" shell anyway,
let's simply use the built-in double parentheses for the for-loops
instead.

Signed-off-by: Thomas Huth &lt;thuth@redhat.com&gt;
Message-Id: &lt;20190723111201.1926-1-thuth@redhat.com&gt;
Signed-off-by: Alex Bennée &lt;alex.bennee@linaro.org&gt;
</content>
</entry>
<entry>
<title>tests/qemu-iotests: Remove the "_supported_os Linux" line from many tests</title>
<updated>2019-05-21T08:13:58+00:00</updated>
<author>
<name>Thomas Huth</name>
</author>
<published>2019-04-23T15:31:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=b3763a195cc167152df1f762b3c3a73f7db7677b'/>
<id>urn:sha1:b3763a195cc167152df1f762b3c3a73f7db7677b</id>
<content type='text'>
A lot of tests run fine on FreeBSD and macOS, too - the limitation
to Linux here was likely just copied-and-pasted from other tests.
Thus remove the "_supported_os Linux" line from tests that run
successful in our CI pipelines on FreeBSD and macOS.

Reviewed-by: Alex Bennée &lt;alex.bennee@linaro.org&gt;
Tested-by: Alex Bennée &lt;alex.bennee@linaro.org&gt;
Acked-by: Christian Borntraeger &lt;borntraeger@de.ibm.com&gt;
Message-Id: &lt;20190502084506.8009-6-thuth@redhat.com&gt;
Signed-off-by: Thomas Huth &lt;thuth@redhat.com&gt;
</content>
</entry>
<entry>
<title>qemu-iotests: Improve portability by searching bash in the $PATH</title>
<updated>2019-03-08T11:26:45+00:00</updated>
<author>
<name>Philippe Mathieu-Daudé</name>
</author>
<published>2019-03-07T14:58:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=11a82d14293cd66f428f535741717ff338c0722b'/>
<id>urn:sha1:11a82d14293cd66f428f535741717ff338c0722b</id>
<content type='text'>
Bash is not always installed as /bin/bash. In particular on OpenBSD,
the package installs it in /usr/local/bin.
Use the 'env' shebang to search bash in the $PATH.

Patch created mechanically by running:

  $ git grep -lE '#! ?/bin/bash' -- tests/qemu-iotests \
    | while read f; do \
      sed -i 's|^#!.\?/bin/bash$|#!/usr/bin/env bash|' $f; \
    done

Reviewed-by: Eric Blake &lt;eblake@redhat.com&gt;
Signed-off-by: Philippe Mathieu-Daudé &lt;philmd@redhat.com&gt;
Signed-off-by: Kevin Wolf &lt;kwolf@redhat.com&gt;
</content>
</entry>
</feed>
