* [Qemu-devel] [PATCH 1/2] qemu-iotests: only enable kvm if the host seems to support it
2019-02-09 4:01 [Qemu-devel] [PATCH 0/2] qemu-iotests: add a Travis job Cleber Rosa
@ 2019-02-09 4:01 ` Cleber Rosa
2019-02-09 4:01 ` [Qemu-devel] [PATCH 2/2] qemu-iotests: add "make check-block" job to Travis Cleber Rosa
2019-02-18 18:05 ` [Qemu-devel] [PATCH 0/2] qemu-iotests: add a Travis job Cleber Rosa
2 siblings, 0 replies; 4+ messages in thread
From: Cleber Rosa @ 2019-02-09 4:01 UTC (permalink / raw)
To: qemu-devel
Cc: Kevin Wolf, Philippe Mathieu-Daudé, Alex Bennée,
Max Reitz, qemu-block, Fam Zheng, Cleber Rosa
There are certainly some improvements to be made with regards
to kvm capabilities detection, but this seems good enough for
this specific case.
Signed-off-by: Cleber Rosa <crosa@redhat.com>
---
tests/qemu-iotests/235 | 5 +++--
tests/qemu-iotests/238 | 5 +++--
2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/tests/qemu-iotests/235 b/tests/qemu-iotests/235
index d6edd97ab4..c83b548adc 100755
--- a/tests/qemu-iotests/235
+++ b/tests/qemu-iotests/235
@@ -25,7 +25,7 @@ from iotests import qemu_img_create, qemu_io, file_path, log
sys.path.append(os.path.join(os.path.dirname(__file__), '..', '..', 'scripts'))
-from qemu import QEMUMachine
+from qemu import QEMUMachine, kvm_available
# Note:
# This test was added to check that mirror dead-lock was fixed (see previous
@@ -49,7 +49,8 @@ qemu_img_create('-f', iotests.imgfmt, '-o', 'preallocation=metadata', disk,
str(size))
vm = QEMUMachine(iotests.qemu_prog)
-vm.add_args('-machine', 'accel=kvm')
+if kvm_available():
+ vm.add_args('-machine', 'accel=kvm')
if iotests.qemu_default_machine == 's390-ccw-virtio':
vm.add_args('-no-shutdown')
vm.add_args('-drive', 'id=src,file=' + disk)
diff --git a/tests/qemu-iotests/238 b/tests/qemu-iotests/238
index f81ee1112f..75ccd5f82f 100755
--- a/tests/qemu-iotests/238
+++ b/tests/qemu-iotests/238
@@ -25,7 +25,7 @@ from iotests import log
sys.path.append(os.path.join(os.path.dirname(__file__), '..', '..', 'scripts'))
-from qemu import QEMUMachine
+from qemu import QEMUMachine, kvm_available
if iotests.qemu_default_machine == 's390-ccw-virtio':
virtio_scsi_device = 'virtio-scsi-ccw'
@@ -33,7 +33,8 @@ else:
virtio_scsi_device = 'virtio-scsi-pci'
vm = QEMUMachine(iotests.qemu_prog)
-vm.add_args('-machine', 'accel=kvm')
+if kvm_available():
+ vm.add_args('-machine', 'accel=kvm')
vm.launch()
log(vm.qmp('blockdev-add', node_name='hd0', driver='null-co'))
--
2.20.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [Qemu-devel] [PATCH 2/2] qemu-iotests: add "make check-block" job to Travis
2019-02-09 4:01 [Qemu-devel] [PATCH 0/2] qemu-iotests: add a Travis job Cleber Rosa
2019-02-09 4:01 ` [Qemu-devel] [PATCH 1/2] qemu-iotests: only enable kvm if the host seems to support it Cleber Rosa
@ 2019-02-09 4:01 ` Cleber Rosa
2019-02-18 18:05 ` [Qemu-devel] [PATCH 0/2] qemu-iotests: add a Travis job Cleber Rosa
2 siblings, 0 replies; 4+ messages in thread
From: Cleber Rosa @ 2019-02-09 4:01 UTC (permalink / raw)
To: qemu-devel
Cc: Kevin Wolf, Philippe Mathieu-Daudé, Alex Bennée,
Max Reitz, qemu-block, Fam Zheng, Cleber Rosa
I usually keep an eye if I'm breaking stuff by looking at Travis
(too). So it seems like a good idea to add a job that will do that.
A few things deserve a better explanation:
* test 233 requires "--enable-gnutls", and fails without it
* QEMU seems unable to initialize sound devices on the environment
given by Travis, and that's why it's compiled without any audio
driver.
* The syntax for setting an empty list of audio drivers possibly
deserves some TLC (it's not currently possible to set it to an
empty list with quotes, resulting in something like "Unknown
driver '''' selected".
Signed-off-by: Cleber Rosa <crosa@redhat.com>
---
.travis.yml | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/.travis.yml b/.travis.yml
index 87d9fa971c..6d60ae9762 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -196,6 +196,14 @@ matrix:
packages:
- python3-pip
- python3.5-venv
+
+
+ # qemu-iotests
+ - env:
+ - CONFIG="--target-list=x86_64-softmmu --enable-gnutls --audio-drv-list="
+ - TEST_CMD="make check-block"
+
+
# Using newer GCC with sanitizers
- addons:
apt:
--
2.20.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH 0/2] qemu-iotests: add a Travis job
2019-02-09 4:01 [Qemu-devel] [PATCH 0/2] qemu-iotests: add a Travis job Cleber Rosa
2019-02-09 4:01 ` [Qemu-devel] [PATCH 1/2] qemu-iotests: only enable kvm if the host seems to support it Cleber Rosa
2019-02-09 4:01 ` [Qemu-devel] [PATCH 2/2] qemu-iotests: add "make check-block" job to Travis Cleber Rosa
@ 2019-02-18 18:05 ` Cleber Rosa
2 siblings, 0 replies; 4+ messages in thread
From: Cleber Rosa @ 2019-02-18 18:05 UTC (permalink / raw)
To: qemu-devel
Cc: Kevin Wolf, Philippe Mathieu-Daudé, Alex Bennée,
Max Reitz, qemu-block, Fam Zheng
On 2/8/19 11:01 PM, Cleber Rosa wrote:
> Besides the obvious reasons of testing more, and somewhat for free,
> running the qemu-iotests along the other tests on Travis also makes
> sure that changes to shared code such as "scripts/qemu.py" and the
> like won't break other users of the same code.
>
> Cleber Rosa (2):
> qemu-iotests: only enable kvm if the host seems to support it
> qemu-iotests: add "make check-block" job to Travis
>
> .travis.yml | 8 ++++++++
> tests/qemu-iotests/235 | 5 +++--
> tests/qemu-iotests/238 | 5 +++--
> 3 files changed, 14 insertions(+), 4 deletions(-)
>
Just a follow up showing the results for the added Travis job:
https://travis-ci.org/clebergnu/qemu/jobs/490806941#L2321
Cheers,
- Cleber.
^ permalink raw reply [flat|nested] 4+ messages in thread