From e6f8b1b6acde60638d5324bf36cc24337e029038 Mon Sep 17 00:00:00 2001 From: Jiri Denemark Date: Wed, 1 Jun 2016 17:52:52 +0200 Subject: [PATCH] tests: Add CPU detection test for Intel Core i7-3770 Signed-off-by: Jiri Denemark --- tests/cputest.c | 1 + .../x86-cpuid-Core-i7-3770-guest.xml | 23 ++++++ .../x86-cpuid-Core-i7-3770-host.xml | 23 ++++++ .../x86-cpuid-Core-i7-3770-json.xml | 8 ++ tests/cputestdata/x86-cpuid-Core-i7-3770.json | 77 +++++++++++++++++++ tests/cputestdata/x86-cpuid-Core-i7-3770.xml | 34 ++++++++ 6 files changed, 166 insertions(+) create mode 100644 tests/cputestdata/x86-cpuid-Core-i7-3770-guest.xml create mode 100644 tests/cputestdata/x86-cpuid-Core-i7-3770-host.xml create mode 100644 tests/cputestdata/x86-cpuid-Core-i7-3770-json.xml create mode 100644 tests/cputestdata/x86-cpuid-Core-i7-3770.json create mode 100644 tests/cputestdata/x86-cpuid-Core-i7-3770.xml diff --git a/tests/cputest.c b/tests/cputest.c index a08635b17f..7901693bf8 100644 --- a/tests/cputest.c +++ b/tests/cputest.c @@ -855,6 +855,7 @@ mymain(void) DO_TEST_CPUID("x86", "Core-i7-2600", true); DO_TEST_CPUID("x86", "Core-i7-3520M", false); DO_TEST_CPUID("x86", "Core-i7-3740QM", true); + DO_TEST_CPUID("x86", "Core-i7-3770", true); #if WITH_QEMU && WITH_YAJL qemuTestDriverFree(&driver); diff --git a/tests/cputestdata/x86-cpuid-Core-i7-3770-guest.xml b/tests/cputestdata/x86-cpuid-Core-i7-3770-guest.xml new file mode 100644 index 0000000000..f5125d47ce --- /dev/null +++ b/tests/cputestdata/x86-cpuid-Core-i7-3770-guest.xml @@ -0,0 +1,23 @@ + + x86_64 + IvyBridge + Intel + + + + + + + + + + + + + + + + + + + diff --git a/tests/cputestdata/x86-cpuid-Core-i7-3770-host.xml b/tests/cputestdata/x86-cpuid-Core-i7-3770-host.xml new file mode 100644 index 0000000000..80d3a9d820 --- /dev/null +++ b/tests/cputestdata/x86-cpuid-Core-i7-3770-host.xml @@ -0,0 +1,23 @@ + + x86_64 + IvyBridge + Intel + + + + + + + + + + + + + + + + + + + diff --git a/tests/cputestdata/x86-cpuid-Core-i7-3770-json.xml b/tests/cputestdata/x86-cpuid-Core-i7-3770-json.xml new file mode 100644 index 0000000000..9b4086eaa7 --- /dev/null +++ b/tests/cputestdata/x86-cpuid-Core-i7-3770-json.xml @@ -0,0 +1,8 @@ + + x86_64 + IvyBridge + + + + + diff --git a/tests/cputestdata/x86-cpuid-Core-i7-3770.json b/tests/cputestdata/x86-cpuid-Core-i7-3770.json new file mode 100644 index 0000000000..d83e7788b1 --- /dev/null +++ b/tests/cputestdata/x86-cpuid-Core-i7-3770.json @@ -0,0 +1,77 @@ +{ + "return": [ + { + "cpuid-register": "EAX", + "cpuid-input-ecx": 1, + "cpuid-input-eax": 13, + "features": 1 + }, + { + "cpuid-register": "EDX", + "cpuid-input-eax": 2147483658, + "features": 0 + }, + { + "cpuid-register": "EAX", + "cpuid-input-eax": 1073741825, + "features": 16777467 + }, + { + "cpuid-register": "EDX", + "cpuid-input-eax": 3221225473, + "features": 0 + }, + { + "cpuid-register": "EDX", + "cpuid-input-eax": 2147483655, + "features": 0 + }, + { + "cpuid-register": "ECX", + "cpuid-input-eax": 2147483649, + "features": 1 + }, + { + "cpuid-register": "EDX", + "cpuid-input-eax": 2147483649, + "features": 672139264 + }, + { + "cpuid-register": "EBX", + "cpuid-input-ecx": 0, + "cpuid-input-eax": 7, + "features": 643 + }, + { + "cpuid-register": "ECX", + "cpuid-input-eax": 1, + "features": 4156170755 + }, + { + "cpuid-register": "EDX", + "cpuid-input-eax": 1, + "features": 260832255 + } + ], + "id": "feature-words" +} + +{ + "return": 6, + "id": "family" +} + +{ + "return": 58, + "id": "model" +} + +{ + "return": 9, + "id": "stepping" +} + +{ + "return": " Intel(R) Core(TM) i7-3770 CPU @ 3.40GHz", + "id": "model-id" +} diff --git a/tests/cputestdata/x86-cpuid-Core-i7-3770.xml b/tests/cputestdata/x86-cpuid-Core-i7-3770.xml new file mode 100644 index 0000000000..ebdd50e939 --- /dev/null +++ b/tests/cputestdata/x86-cpuid-Core-i7-3770.xml @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -- GitLab