public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Sheng Yang <sheng@linux.intel.com>
To: Avi Kivity <avi@redhat.com>
Cc: Marcelo Tosatti <mtosatti@redhat.com>, kvm@vger.kernel.org
Subject: Re: [PATCH v4] test: Add XSAVE unit test
Date: Sun, 13 Jun 2010 16:47:06 +0800	[thread overview]
Message-ID: <201006131647.06469.sheng@linux.intel.com> (raw)
In-Reply-To: <4C149A3E.5000004@redhat.com>

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

  reply	other threads:[~2010-06-13  8:46 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-11  7:45 [PATCH v3] test: Add XSAVE unit test Sheng Yang
2010-06-13  8:17 ` Avi Kivity
2010-06-13  8:32   ` [PATCH v4] " Sheng Yang
2010-06-13  8:43     ` Avi Kivity
2010-06-13  8:47       ` Sheng Yang [this message]
2010-06-13  8:49       ` Sheng Yang
2010-06-14 20:43         ` Marcelo Tosatti

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201006131647.06469.sheng@linux.intel.com \
    --to=sheng@linux.intel.com \
    --cc=avi@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=mtosatti@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox