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@xxxxxxxxxx> > > --- > > 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 ... -- 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