From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?UTF-8?q?Radim=20Kr=C4=8Dm=C3=A1=C5=99?= Subject: [PATCH kvm-unit-tests 5/6] x86/hyperv_synic: check for support before testing Date: Mon, 14 Dec 2015 22:24:20 +0100 Message-ID: <1450128261-21170-6-git-send-email-rkrcmar@redhat.com> References: <1450128261-21170-1-git-send-email-rkrcmar@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: Paolo Bonzini , Andrew Jones To: kvm@vger.kernel.org Return-path: Received: from mx1.redhat.com ([209.132.183.28]:43638 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932519AbbLNVYm (ORCPT ); Mon, 14 Dec 2015 16:24:42 -0500 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (Postfix) with ESMTPS id 785C1C0A1613 for ; Mon, 14 Dec 2015 21:24:42 +0000 (UTC) In-Reply-To: <1450128261-21170-1-git-send-email-rkrcmar@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: It's not easy to distinguish successful unit-test from failed QEMU, so we check for presence of the needed feature before hand. x86/hyperv_synic is "skip" instead of "PASS", without KVM/QEMU support. Signed-off-by: Radim Kr=C4=8Dm=C3=A1=C5=99 --- Probably not the nicest solution around ... "dry_run_qemu_and_skip_if_it_fails=3Dtrue" parameter in unittest.cfg might be better. x86/unittests.cfg | 1 + 1 file changed, 1 insertion(+) diff --git a/x86/unittests.cfg b/x86/unittests.cfg index 6b94ad93dcf0..32fc5f7037e1 100644 --- a/x86/unittests.cfg +++ b/x86/unittests.cfg @@ -182,3 +182,4 @@ arch =3D x86_64 file =3D hyperv_synic.flat smp =3D 2 extra_params =3D -cpu kvm64,hv_synic -device hyperv-testdev +check =3D echo quit | $qemu -enable-kvm -cpu kvm64,hv_synic -device hy= perv-testdev -monitor stdio > /dev/null --=20 2.6.4