From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH v3] test: Add XSAVE unit test Date: Sun, 13 Jun 2010 11:17:17 +0300 Message-ID: <4C14940D.1050900@redhat.com> References: <1276242312-7982-1-git-send-email-sheng@linux.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Marcelo Tosatti , kvm@vger.kernel.org To: Sheng Yang Return-path: Received: from mx1.redhat.com ([209.132.183.28]:65409 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751820Ab0FMIRT (ORCPT ); Sun, 13 Jun 2010 04:17:19 -0400 In-Reply-To: <1276242312-7982-1-git-send-email-sheng@linux.intel.com> Sender: kvm-owner@vger.kernel.org List-ID: On 06/11/2010 10:45 AM, Sheng Yang wrote: > Based on IDT test framework. > > Nice and comprehensive. > + > +int main(void) > +{ > + setup_idt(); > + if (check_cpuid_1_ecx(CPUID_1_ECX_XSAVE)) { > + printf("CPU has XSAVE feature\n"); > + test_xsave(); > + } else { > + printf("CPU don't has XSAVE feature\n"); > + test_no_xsave(); > + } > + printf("Total test: %d\n", total_tests); > + if (fail_tests == 0) > + printf("ALL PASS!\n"); > + else > + printf("Fail %d tests.\n", fail_tests); > + return 1; > +} > Need to return 0 if !fail_tests, so we can hook this up to autotest. -- error compiling committee.c: too many arguments to function