diff mbox

[kvm-unit-tests,v2,09/12] x86/hyperv_synic: check for support before testing

Message ID 1450374823-7648-10-git-send-email-rkrcmar@redhat.com (mailing list archive)
State New, archived
Headers show

Commit Message

Radim Krčmář Dec. 17, 2015, 5:53 p.m. UTC
It's not easy to distinguish successful unit-test from failed QEMU, so
we check for presence of the needed feature before hand.

Signed-off-by: Radim Kr?má? <rkrcmar@redhat.com>
---
 v2: remove "> /dev/null" as check doesn't print the output anymore
 
 x86/unittests.cfg | 1 +
 1 file changed, 1 insertion(+)

Comments

Andrew Jones Dec. 17, 2015, 7:42 p.m. UTC | #1
On Thu, Dec 17, 2015 at 06:53:40PM +0100, Radim Kr?má? wrote:
> It's not easy to distinguish successful unit-test from failed QEMU, so
> we check for presence of the needed feature before hand.
> 
> Signed-off-by: Radim Kr?má? <rkrcmar@redhat.com>
> ---
>  v2: remove "> /dev/null" as check doesn't print the output anymore
>  
>  x86/unittests.cfg | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/x86/unittests.cfg b/x86/unittests.cfg
> index 6b94ad93dcf0..25779993cc27 100644
> --- a/x86/unittests.cfg
> +++ b/x86/unittests.cfg
> @@ -182,3 +182,4 @@ arch = x86_64
>  file = hyperv_synic.flat
>  smp = 2
>  extra_params = -cpu kvm64,hv_synic -device hyperv-testdev
> +check = echo quit | $qemu -cpu kvm64,hv_synic -device hyperv-testdev -monitor stdio

Let's make sure $QEMU==$qemu in contexts where unittests.cfg is used, and
then document (in the unittests.cfg header) that $QEMU may be used in the
check lines.

> -- 
> 2.6.4
> 
> --
> To unsubscribe from this list: send the line "unsubscribe kvm" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Radim Krčmář Dec. 18, 2015, 12:13 p.m. UTC | #2
2015-12-17 13:42-0600, Andrew Jones:
> On Thu, Dec 17, 2015 at 06:53:40PM +0100, Radim Kr?má? wrote:
>> It's not easy to distinguish successful unit-test from failed QEMU, so
>> we check for presence of the needed feature before hand.
>> 
>> Signed-off-by: Radim Kr?má? <rkrcmar@redhat.com>
>> ---
>>  v2: remove "> /dev/null" as check doesn't print the output anymore
>> diff --git a/x86/unittests.cfg b/x86/unittests.cfg
>> @@ -182,3 +182,4 @@ arch = x86_64
>>  file = hyperv_synic.flat
>>  smp = 2
>>  extra_params = -cpu kvm64,hv_synic -device hyperv-testdev
>> +check = echo quit | $qemu -cpu kvm64,hv_synic -device hyperv-testdev -monitor stdio
> 
> Let's make sure $QEMU==$qemu in contexts where unittests.cfg is used, and
> then document (in the unittests.cfg header) that $QEMU may be used in the
> check lines.

I'd just get rid of $qemu, we don't gain anything by having them both.
Documenting it is a good idea.
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/x86/unittests.cfg b/x86/unittests.cfg
index 6b94ad93dcf0..25779993cc27 100644
--- a/x86/unittests.cfg
+++ b/x86/unittests.cfg
@@ -182,3 +182,4 @@  arch = x86_64
 file = hyperv_synic.flat
 smp = 2
 extra_params = -cpu kvm64,hv_synic -device hyperv-testdev
+check = echo quit | $qemu -cpu kvm64,hv_synic -device hyperv-testdev -monitor stdio