public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Amos Kong <akong@redhat.com>
To: avi@redhat.com
Cc: jasowang@redhat.com, kvm@vger.kernel.org
Subject: [PATCH] [KVM-Unit-Tests] Add summary to kvmclock test
Date: Wed, 08 Sep 2010 07:38:10 +0800	[thread overview]
Message-ID: <20100907233810.3210.15046.stgit@z> (raw)

This summary would be helpful when analyze test log

Signed-off-by: Amos Kong <akong@redhat.com>
---
 0 files changed, 0 insertions(+), 0 deletions(-)

diff --git a/x86/kvmclock_test.c b/x86/kvmclock_test.c
index 5b14ae2..97fe6b3 100644
--- a/x86/kvmclock_test.c
+++ b/x86/kvmclock_test.c
@@ -19,12 +19,15 @@ struct test_info {
 };
 
 struct test_info ti[4];
+static int ntests;
 
 static int wallclock_test(long sec, long threshold)
 {
         long ksec, offset;
         struct timespec ts;
 
+	++ntests;
+
         printf("Wallclock test, threshold %ld\n", threshold);
         kvm_get_wallclock(&ts);
         ksec = ts.tv_sec;
@@ -87,6 +90,8 @@ static int cycle_test(int ncpus, long loops, int check, struct test_info *ti)
         int i;
         unsigned long long begin, end;
 
+	++ntests;
+
         begin = rdtsc();
 
         atomic_set(&ti->ncpus, ncpus);
@@ -162,5 +167,6 @@ int main(int ac, char **av)
         for (i = 0; i < ncpus; ++i)
                 on_cpu(i, kvm_clock_clear, (void *)0);
 
+	printf("\nsummary: %d tests, %d failures\n", ntests, nerr);
         return nerr > 0 ? 1 : 0;
 }


                 reply	other threads:[~2010-09-07 23:38 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20100907233810.3210.15046.stgit@z \
    --to=akong@redhat.com \
    --cc=avi@redhat.com \
    --cc=jasowang@redhat.com \
    --cc=kvm@vger.kernel.org \
    /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