From 29461bc01991010d0c9d9993d4c7235ae3633395 Mon Sep 17 00:00:00 2001 From: Jiri Denemark Date: Wed, 1 Jun 2016 17:52:53 +0200 Subject: [PATCH] tests: Add CPU detection test for AMD Opteron 2350 Signed-off-by: Jiri Denemark --- tests/cputest.c | 1 + .../x86-cpuid-Opteron-2350-guest.xml | 19 +++++ .../x86-cpuid-Opteron-2350-host.xml | 19 +++++ .../x86-cpuid-Opteron-2350-json.xml | 19 +++++ tests/cputestdata/x86-cpuid-Opteron-2350.json | 71 +++++++++++++++++++ tests/cputestdata/x86-cpuid-Opteron-2350.xml | 37 ++++++++++ 6 files changed, 166 insertions(+) create mode 100644 tests/cputestdata/x86-cpuid-Opteron-2350-guest.xml create mode 100644 tests/cputestdata/x86-cpuid-Opteron-2350-host.xml create mode 100644 tests/cputestdata/x86-cpuid-Opteron-2350-json.xml create mode 100644 tests/cputestdata/x86-cpuid-Opteron-2350.json create mode 100644 tests/cputestdata/x86-cpuid-Opteron-2350.xml diff --git a/tests/cputest.c b/tests/cputest.c index 06ebac3394..d69eff77bb 100644 --- a/tests/cputest.c +++ b/tests/cputest.c @@ -862,6 +862,7 @@ mymain(void) DO_TEST_CPUID("x86", "Core2-Q9500", false); DO_TEST_CPUID("x86", "FX-8150", false); DO_TEST_CPUID("x86", "Opteron-1352", false); + DO_TEST_CPUID("x86", "Opteron-2350", true); #if WITH_QEMU && WITH_YAJL qemuTestDriverFree(&driver); diff --git a/tests/cputestdata/x86-cpuid-Opteron-2350-guest.xml b/tests/cputestdata/x86-cpuid-Opteron-2350-guest.xml new file mode 100644 index 0000000000..828a142711 --- /dev/null +++ b/tests/cputestdata/x86-cpuid-Opteron-2350-guest.xml @@ -0,0 +1,19 @@ + + x86_64 + Opteron_G3 + AMD + + + + + + + + + + + + + + + diff --git a/tests/cputestdata/x86-cpuid-Opteron-2350-host.xml b/tests/cputestdata/x86-cpuid-Opteron-2350-host.xml new file mode 100644 index 0000000000..399398eb3a --- /dev/null +++ b/tests/cputestdata/x86-cpuid-Opteron-2350-host.xml @@ -0,0 +1,19 @@ + + x86_64 + Opteron_G3 + AMD + + + + + + + + + + + + + + + diff --git a/tests/cputestdata/x86-cpuid-Opteron-2350-json.xml b/tests/cputestdata/x86-cpuid-Opteron-2350-json.xml new file mode 100644 index 0000000000..be4cf5c74d --- /dev/null +++ b/tests/cputestdata/x86-cpuid-Opteron-2350-json.xml @@ -0,0 +1,19 @@ + + x86_64 + Opteron_G3 + + + + + + + + + + + + + + + + diff --git a/tests/cputestdata/x86-cpuid-Opteron-2350.json b/tests/cputestdata/x86-cpuid-Opteron-2350.json new file mode 100644 index 0000000000..79b5afad07 --- /dev/null +++ b/tests/cputestdata/x86-cpuid-Opteron-2350.json @@ -0,0 +1,71 @@ +{ + "return": [ + { + "cpuid-register": "EDX", + "cpuid-input-eax": 2147483658, + "features": 1 + }, + { + "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": 1015 + }, + { + "cpuid-register": "EDX", + "cpuid-input-eax": 2147483649, + "features": 3864004608 + }, + { + "cpuid-register": "EBX", + "cpuid-input-ecx": 0, + "cpuid-input-eax": 7, + "features": 0 + }, + { + "cpuid-register": "ECX", + "cpuid-input-eax": 1, + "features": 2174754817 + }, + { + "cpuid-register": "EDX", + "cpuid-input-eax": 1, + "features": 126614527 + } + ], + "id": "feature-words" +} + +{ + "return": 16, + "id": "family" +} + +{ + "return": 2, + "id": "model" +} + +{ + "return": 3, + "id": "stepping" +} + +{ + "return": "Quad-Core AMD Opteron(tm) Processor 2350", + "id": "model-id" +} diff --git a/tests/cputestdata/x86-cpuid-Opteron-2350.xml b/tests/cputestdata/x86-cpuid-Opteron-2350.xml new file mode 100644 index 0000000000..a92811151a --- /dev/null +++ b/tests/cputestdata/x86-cpuid-Opteron-2350.xml @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +