From 40b54ebe1424058a5a625deed98e4ed98c690e84 Mon Sep 17 00:00:00 2001 From: Jiri Denemark Date: Wed, 1 Jun 2016 17:52:54 +0200 Subject: [PATCH] tests: Add CPU detection test for AMD Phenom II X4 B95 Signed-off-by: Jiri Denemark --- tests/cputest.c | 1 + .../x86-cpuid-Phenom-B95-guest.xml | 22 ++++++ .../cputestdata/x86-cpuid-Phenom-B95-host.xml | 31 ++++++++ .../cputestdata/x86-cpuid-Phenom-B95-json.xml | 20 +++++ tests/cputestdata/x86-cpuid-Phenom-B95.json | 77 +++++++++++++++++++ tests/cputestdata/x86-cpuid-Phenom-B95.xml | 38 +++++++++ 6 files changed, 189 insertions(+) create mode 100644 tests/cputestdata/x86-cpuid-Phenom-B95-guest.xml create mode 100644 tests/cputestdata/x86-cpuid-Phenom-B95-host.xml create mode 100644 tests/cputestdata/x86-cpuid-Phenom-B95-json.xml create mode 100644 tests/cputestdata/x86-cpuid-Phenom-B95.json create mode 100644 tests/cputestdata/x86-cpuid-Phenom-B95.xml diff --git a/tests/cputest.c b/tests/cputest.c index f85bd253e4..cebdf3dca1 100644 --- a/tests/cputest.c +++ b/tests/cputest.c @@ -866,6 +866,7 @@ mymain(void) DO_TEST_CPUID("x86", "Opteron-6234", true); DO_TEST_CPUID("x86", "Opteron-6282", false); DO_TEST_CPUID("x86", "Pentium-P6100", false); + DO_TEST_CPUID("x86", "Phenom-B95", true); #if WITH_QEMU && WITH_YAJL qemuTestDriverFree(&driver); diff --git a/tests/cputestdata/x86-cpuid-Phenom-B95-guest.xml b/tests/cputestdata/x86-cpuid-Phenom-B95-guest.xml new file mode 100644 index 0000000000..60ba9c1ebd --- /dev/null +++ b/tests/cputestdata/x86-cpuid-Phenom-B95-guest.xml @@ -0,0 +1,22 @@ + + x86_64 + Opteron_G3 + AMD + + + + + + + + + + + + + + + + + + diff --git a/tests/cputestdata/x86-cpuid-Phenom-B95-host.xml b/tests/cputestdata/x86-cpuid-Phenom-B95-host.xml new file mode 100644 index 0000000000..127b047854 --- /dev/null +++ b/tests/cputestdata/x86-cpuid-Phenom-B95-host.xml @@ -0,0 +1,31 @@ + + x86_64 + athlon + AMD + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/cputestdata/x86-cpuid-Phenom-B95-json.xml b/tests/cputestdata/x86-cpuid-Phenom-B95-json.xml new file mode 100644 index 0000000000..c1070de745 --- /dev/null +++ b/tests/cputestdata/x86-cpuid-Phenom-B95-json.xml @@ -0,0 +1,20 @@ + + x86_64 + Opteron_G3 + + + + + + + + + + + + + + + + + diff --git a/tests/cputestdata/x86-cpuid-Phenom-B95.json b/tests/cputestdata/x86-cpuid-Phenom-B95.json new file mode 100644 index 0000000000..5f5badda9e --- /dev/null +++ b/tests/cputestdata/x86-cpuid-Phenom-B95.json @@ -0,0 +1,77 @@ +{ + "return": [ + { + "cpuid-register": "EAX", + "cpuid-input-ecx": 1, + "cpuid-input-eax": 13, + "features": 0 + }, + { + "cpuid-register": "EDX", + "cpuid-input-eax": 2147483658, + "features": 9 + }, + { + "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": 1011 + }, + { + "cpuid-register": "EDX", + "cpuid-input-eax": 2147483649, + "features": 3862956032 + }, + { + "cpuid-register": "EBX", + "cpuid-input-ecx": 0, + "cpuid-input-eax": 7, + "features": 0 + }, + { + "cpuid-register": "ECX", + "cpuid-input-eax": 1, + "features": 2157977601 + }, + { + "cpuid-register": "EDX", + "cpuid-input-eax": 1, + "features": 126614527 + } + ], + "id": "feature-words" +} + +{ + "return": 16, + "id": "family" +} + +{ + "return": 4, + "id": "model" +} + +{ + "return": 2, + "id": "stepping" +} + +{ + "return": "AMD Phenom(tm) II X4 B95 Processor", + "id": "model-id" +} diff --git a/tests/cputestdata/x86-cpuid-Phenom-B95.xml b/tests/cputestdata/x86-cpuid-Phenom-B95.xml new file mode 100644 index 0000000000..ad989f96e9 --- /dev/null +++ b/tests/cputestdata/x86-cpuid-Phenom-B95.xml @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -- GitLab