The shell script attempts to suppress core dumps like this:
old_ulimit=$(ulimit -c)
ulimit -c 0
$QEMU_IO arg...
ulimit -c "$old_ulimit"
This breaks the test hard unless the limit was zero to begin with!
ulimit sets both hard and soft limit by default, and (re-)raising the
hard limit requires privileges. Broken since it was added in commit
dc68afe.
Could be fixed by adding -S to set only the soft limit, but I'm not
sure how portable that is in practice. Simply do it in a subshell
instead, like this:
(ulimit -c 0; exec $QEMU_IO arg...)
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Fam Zheng <famz@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
SMTP does not preserve newlines. This is normally not a problem if the
email body uses DOS or UNIX newlines consistently. In 051.out we mix
UNIX newlines with DOS newlines (since QEMU monitor output uses \r\n).
This patch filters the QEMU monitor output so the golden master file
uses UNIX newlines exclusively.
The result is that patches touching 051.out will apply cleanly without
mangling newlines after this commit.
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
This removes "qemu-io> " prompt from qemu-io output in _filter_qemu_io,
and updates all the output files with the following command:
cd tests/qemu-iotests && sed -i "s/qemu-io> //g" *.out
Signed-off-by: Fam Zheng <famz@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Block devices creates with -drive and drive_add should automatically
disappear if the guest device is unplugged. blockdev-add ones shouldn't.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
These scripts used to have a four characters indentation, with eight
consecutive spaces converted into a tab. Convert everything into spaces.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Filter out the QEMU monitor version banner so that tests do not break
when the QEMU version number is changed.
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
$QEMU_PROG happens to be 'qemu' in my setup, so this sed command
replaces a bit too much. Restrict it to the start of the line and to
when it's followed by a colon, i.e. the form used by error messages.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Filter the name of the QEMU executable so the output can be diffed no
matter what QEMU_PROG is (e.g. qemu-system-x86_64).
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
This one makes it possible to run qemu-iotests on a Windows build using Wine
and get somewhat meaningful results.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
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>
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>
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>
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>