On Mon, 8 May 2017 15:32:05 -0300 Eduardo Habkost <ehabk...@redhat.com> wrote:
> Add test code to ensure features are enabled/disabled correctly in the > command-line. The test case use the "feature-words" and > "filtered-features" properties to check if the features were > enabled/disabled correctly. > > Signed-off-by: Eduardo Habkost <ehabk...@redhat.com> > --- > Changes v1 -> v2: > * Remove explicit "accel=" option to avoid triggering warnings > on "make check" > * Use qdict_get_*() helpers to make code shorter > * Rename input_eax, input_ecx to in_eax, in_ecx to make > lines fit in the coding style width limit > * v1 was submitted as part of the series: > Subject: [PATCH 0/4] x86: Support "-cpu feature=force" > * Coding style: split lines > * Style changes on code comments > --- > tests/test-x86-cpuid-compat.c | 111 > ++++++++++++++++++++++++++++++++++++++++++ > 1 file changed, 111 insertions(+) > > diff --git a/tests/test-x86-cpuid-compat.c b/tests/test-x86-cpuid-compat.c [...] > + add_feature_test("x86/cpuid/features/max-plus-invtsc", > + "-cpu max,+invtsc", > + 0x80000007, 0, "EDX", 8, true); > + add_feature_test("x86/cpuid/features/max-invtsc-on", > + "-cpu max,invtsc=on", > + 0x80000007, 0, "EDX", 8, true); > + add_feature_test("x86/cpuid/features/max-minus-mmx", > + "-cpu max,-mmx", > + 1, 0, "EDX", 23, false); > + add_feature_test("x86/cpuid/features/max-invtsc-on,mmx=off", > + "-cpu max,mmx=off", > + 1, 0, "EDX", 23, false); Why do you add 'max' variants in addition to 486/pentium? > return g_test_run(); > }