All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Jones <drjones@redhat.com>
To: "Radim Krčmář" <rkrcmar@redhat.com>
Cc: kvm@vger.kernel.org, Paolo Bonzini <pbonzini@redhat.com>
Subject: Re: [PATCH v3 2/9] x86/*: report skipped tests
Date: Tue, 19 Apr 2016 08:34:19 +0200	[thread overview]
Message-ID: <20160419063419.zxzefxnhqgcxmsmi@hawk.localdomain> (raw)
In-Reply-To: <1460753571-20732-3-git-send-email-rkrcmar@redhat.com>

On Fri, Apr 15, 2016 at 10:52:44PM +0200, Radim Krčmář wrote:
> No care to consistency or exhaustivity was given.

Me neither, but I see that x86/tscdeadline_latency.c could use similar
updates too.

drew

> 
> Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
> ---
>  x86/apic.c         | 7 +++----
>  x86/emulator.c     | 2 +-
>  x86/hyperv_synic.c | 2 +-
>  x86/pku.c          | 2 +-
>  x86/pmu.c          | 2 +-
>  x86/smap.c         | 2 +-
>  x86/svm.c          | 2 +-
>  x86/tsc.c          | 2 +-
>  8 files changed, 10 insertions(+), 11 deletions(-)
> 
> diff --git a/x86/apic.c b/x86/apic.c
> index 61a0a7659805..8b08a950a0c7 100644
> --- a/x86/apic.c
> +++ b/x86/apic.c
> @@ -27,7 +27,7 @@ static void tsc_deadline_timer_isr(isr_regs_t *regs)
>      ++tdt_count;
>  }
>  
> -static void start_tsc_deadline_timer(void)
> +static void __test_tsc_deadline_timer(void)
>  {
>      handle_irq(TSC_DEADLINE_TIMER_VECTOR, tsc_deadline_timer_isr);
>      irq_enable();
> @@ -45,7 +45,6 @@ static int enable_tsc_deadline_timer(void)
>      if (cpuid(1).c & (1 << 24)) {
>          lvtt = TSC_DEADLINE_TIMER_MODE | TSC_DEADLINE_TIMER_VECTOR;
>          apic_write(APIC_LVTT, lvtt);
> -        start_tsc_deadline_timer();
>          return 1;
>      } else {
>          return 0;
> @@ -55,9 +54,9 @@ static int enable_tsc_deadline_timer(void)
>  static void test_tsc_deadline_timer(void)
>  {
>      if(enable_tsc_deadline_timer()) {
> -        printf("tsc deadline timer enabled\n");
> +        __test_tsc_deadline_timer();
>      } else {
> -        printf("tsc deadline timer not detected\n");
> +        report_skip("tsc deadline timer not detected");
>      }
>  }
>  
> diff --git a/x86/emulator.c b/x86/emulator.c
> index 3730721258bc..8d262d832112 100644
> --- a/x86/emulator.c
> +++ b/x86/emulator.c
> @@ -1082,7 +1082,7 @@ static void illegal_movbe_handler(struct ex_regs *regs)
>  static void test_illegal_movbe(void)
>  {
>  	if (!(cpuid(1).c & (1 << 22))) {
> -		printf("SKIP: illegal movbe\n");
> +		report_skip("illegal movbe");
>  		return;
>  	}
>  
> diff --git a/x86/hyperv_synic.c b/x86/hyperv_synic.c
> index 6e088944be1f..f5eb82bb7336 100644
> --- a/x86/hyperv_synic.c
> +++ b/x86/hyperv_synic.c
> @@ -202,7 +202,7 @@ int main(int ac, char **av)
>  
>          report("Hyper-V SynIC test", ok);
>      } else {
> -        report("Hyper-V SynIC is not supported", true);
> +        report_skip("Hyper-V SynIC is not supported");
>      }
>  
>      return report_summary();
> diff --git a/x86/pku.c b/x86/pku.c
> index df51d1b59048..6214f0bc151f 100644
> --- a/x86/pku.c
> +++ b/x86/pku.c
> @@ -68,7 +68,7 @@ int main(int ac, char **av)
>  
>      if (!(cpuid_indexed(7, 0).c & (1 << X86_FEATURE_PKU))) {
>          printf("PKU not enabled, aborting\n");
> -        abort();
> +        return report_summary();
>      }
>  
>      setup_vm();
> diff --git a/x86/pmu.c b/x86/pmu.c
> index 03f80190bb25..c68980044dee 100644
> --- a/x86/pmu.c
> +++ b/x86/pmu.c
> @@ -387,7 +387,7 @@ int main(int ac, char **av)
>  
>  	if (!eax.split.version_id) {
>  		printf("No pmu is detected!\n");
> -		return 1;
> +		return report_summary();
>  	}
>  	printf("PMU version:         %d\n", eax.split.version_id);
>  	printf("GP counters:         %d\n", eax.split.num_counters);
> diff --git a/x86/smap.c b/x86/smap.c
> index 69e71864dc9b..c9de081a474b 100644
> --- a/x86/smap.c
> +++ b/x86/smap.c
> @@ -93,7 +93,7 @@ int main(int ac, char **av)
>  
>  	if (!(cpuid_indexed(7, 0).b & (1 << X86_FEATURE_SMAP))) {
>  		printf("SMAP not enabled, aborting\n");
> -		abort();
> +		return report_summary();
>  	}
>  
>  	setup_vm();
> diff --git a/x86/svm.c b/x86/svm.c
> index 934b2ae91fa8..301cf8cb2d6b 100644
> --- a/x86/svm.c
> +++ b/x86/svm.c
> @@ -1064,7 +1064,7 @@ int main(int ac, char **av)
>  
>      if (!(cpuid(0x80000001).c & 4)) {
>          printf("SVM not availble\n");
> -        return 0;
> +        return report_summary();
>      }
>  
>      setup_svm();
> diff --git a/x86/tsc.c b/x86/tsc.c
> index 6f89c911c2bc..62450e71725c 100644
> --- a/x86/tsc.c
> +++ b/x86/tsc.c
> @@ -43,5 +43,5 @@ int main()
>  		test_rdtscp(0x100);
>  	} else
>  		printf("rdtscp not supported\n");
> -	return 0;
> +	return report_summary();
>  }
> -- 
> 2.8.1
> 
> --
> 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

  reply	other threads:[~2016-04-19  6:34 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-15 20:52 [PATCH kvm-unit-tests v3 0/9] Improve the output of test runners Radim Krčmář
2016-04-15 20:52 ` [PATCH v3 1/9] lib/report: allow test skipping Radim Krčmář
2016-04-19  6:26   ` Andrew Jones
2016-04-15 20:52 ` [PATCH v3 2/9] x86/*: report skipped tests Radim Krčmář
2016-04-19  6:34   ` Andrew Jones [this message]
2016-04-19 11:51     ` Radim Krčmář
2016-04-15 20:52 ` [PATCH v3 3/9] x86/unittests: remove svm-disabled Radim Krčmář
2016-04-15 20:52 ` [PATCH v3 4/9] x86/pmu: expect failure with nmi_watchdog Radim Krčmář
2016-04-19  6:44   ` Andrew Jones
2016-04-19 11:57     ` Radim Krčmář
2016-04-19 13:46       ` Andrew Jones
2016-04-15 20:52 ` [PATCH v3 5/9] lib/report: don't print 0 failed tests Radim Krčmář
2016-04-19  6:45   ` Andrew Jones
2016-04-15 20:52 ` [PATCH v3 6/9] scripts/runtime: skip tests that cannot run Radim Krčmář
2016-04-19  7:01   ` Andrew Jones
2016-04-19 12:01     ` Radim Krčmář
2016-04-15 20:52 ` [PATCH v3 7/9] scripts/runtime: consolidate summary tags Radim Krčmář
2016-04-19  7:04   ` Andrew Jones
2016-04-15 20:52 ` [PATCH v3 8/9] run_tests: print summary Radim Krčmář
2016-04-19  7:19   ` Andrew Jones
2016-05-10 11:45     ` Paolo Bonzini
2016-05-10 12:41       ` Radim Krčmář
2016-05-10 14:32         ` Paolo Bonzini
2016-05-10 15:31           ` Radim Krčmář
2016-05-10 15:46             ` Paolo Bonzini
2016-05-10 16:17               ` Radim Krčmář
2016-04-15 20:52 ` [PATCH v3 9/9] run_tests: log stderr Radim Krčmář
2016-04-19  7:26   ` Andrew Jones
2016-04-19 12:13     ` Radim Krčmář
2016-05-10 11:41   ` Paolo Bonzini
2016-05-10 12:47     ` Radim Krčmář
2016-04-19  7:31 ` [PATCH kvm-unit-tests v3 0/9] Improve the output of test runners Andrew Jones
2016-04-19 12:14   ` Radim Krčmář

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=20160419063419.zxzefxnhqgcxmsmi@hawk.localdomain \
    --to=drjones@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=rkrcmar@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.