From: "Radim Krčmář" <rkrcmar@redhat.com>
To: Andrew Jones <drjones@redhat.com>
Cc: kvm@vger.kernel.org, Paolo Bonzini <pbonzini@redhat.com>
Subject: Re: [PATCH v3 4/9] x86/pmu: expect failure with nmi_watchdog
Date: Tue, 19 Apr 2016 13:57:13 +0200 [thread overview]
Message-ID: <20160419115712.GC11472@potion.brq.redhat.com> (raw)
In-Reply-To: <20160419064422.grxi36r2nmgmns7g@hawk.localdomain>
2016-04-19 08:44+0200, Andrew Jones:
> On Fri, Apr 15, 2016 at 10:52:46PM +0200, Radim Krčmář wrote:
> > Host's nmi_watchdog takes one slot, making the "all counters" unit-test
> > fail. We know exactly what happens, mark it as expected failure.
> >
> > PMU test is now executed regardless of host_nmi_watchdog.
> >
> > Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
> > ---
> > x86/pmu.c | 9 ++++++++-
> > x86/unittests.cfg | 3 +--
> > 2 files changed, 9 insertions(+), 3 deletions(-)
> >
> > diff --git a/x86/pmu.c b/x86/pmu.c
> > index c68980044dee..70e9b3a41e96 100644
> > --- a/x86/pmu.c
> > +++ b/x86/pmu.c
> > @@ -92,6 +92,7 @@ struct pmu_event {
> > };
> >
> > static int num_counters;
> > +static bool host_nmi_watchdog;
> >
> > char *buf;
> >
> > @@ -291,7 +292,7 @@ static void check_counters_many(void)
> > if (!verify_counter(&cnt[i]))
> > break;
> >
> > - report("all counters", i == n);
> > + report_xfail("all counters", host_nmi_watchdog, i == n);
> > }
> >
> > static void check_counter_overflow(void)
> > @@ -374,6 +375,7 @@ static void check_rdpmc(void)
> >
> > int main(int ac, char **av)
> > {
> > + int i;
> > struct cpuid id = cpuid(10);
> >
> > setup_vm();
> > @@ -385,6 +387,11 @@ int main(int ac, char **av)
> > ebx.full = id.b;
> > edx.full = id.d;
> >
> > + /* XXX: horrible command line parsing */
> > + for (i = 1; i < ac; i++)
>
> This should be i = 0. Yes, I know, that's a crappy inconsistency we
> have. I have somewhere low on the todo an item to try and find a way
> for argv[0] to be the testname, but it's probably not worth it...
> Hmm, an easy good 'nuff solution might be to always have argv[0] be
> "TEST" or some such though.
argv[0] is the test name for me ... if I modify the loop to print them
all, then
% /x86-run x86/pmu.flat -append "a b c"
0: x86/pmu.flat
1: a
2: b
3: c
>> + if (!strcmp(av[i], "host_nmi_watchdog=1"))
>> + host_nmi_watchdog = true;
>
> You could use lib/util's parse_keyval here instead.
Wow, so it didn't have to be horrible ...
next prev parent reply other threads:[~2016-04-19 11:57 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
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ář [this message]
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=20160419115712.GC11472@potion.brq.redhat.com \
--to=rkrcmar@redhat.com \
--cc=drjones@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=pbonzini@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.