Re: [PATCH v4] test: Add XSAVE unit test

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sunday 13 June 2010 16:43:42 Avi Kivity wrote:
> On 06/13/2010 11:32 AM, Sheng Yang wrote:
> > Based on IDT test framework.
> > +
> > +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 0;
> > +    }
> > +    return 1;
> > +}
> 
> Wrong way, 0 = success, !0 = fail (just like shell exit codes).

Indeed oops. Finally checked your first comment to this test case patch, and found 
I completely misread it...

--
regards
Yang, Sheng
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux