1 Star 0 Fork 71

yoo/libvirt

forked from src-openEuler/libvirt 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
libvirt-tests-add-baseline-test-cases-for-arm-CPU.patch 9.01 KB
一键复制 编辑 原始数据 按行查看 历史
From 89b60f0cefe533a5fda021fae303e7662c141d02 Mon Sep 17 00:00:00 2001
From: Xu Yandong <xuyandong2@huawei.com>
Date: Mon, 16 Oct 2017 17:45:48 +0800
Subject: [PATCH 11/11] tests: add baseline test cases for arm CPU
add baseline test cases for aarch64
Signed-off-by: Xu Yandong <xuyandong2@huawei.com>
---
tests/cputest.c | 7 +++++
.../aarch64-baseline-incompatible-vendors.xml | 26 +++++++++++++++++++
...-baseline-no-compatible-feature-result.xml | 4 +++
...aarch64-baseline-no-compatible-feature.xml | 19 ++++++++++++++
.../aarch64-baseline-no-feature-result.xml | 4 +++
.../aarch64-baseline-no-feature.xml | 7 +++++
.../cputestdata/aarch64-baseline-no-model.xml | 13 ++++++++++
.../aarch64-baseline-no-vendor-result.xml | 10 +++++++
.../aarch64-baseline-no-vendor.xml | 13 ++++++++++
...baseline-one-compatible-feature-result.xml | 5 ++++
...arch64-baseline-one-compatible-feature.xml | 20 ++++++++++++++
.../aarch64-baseline-one-feature-result.xml | 5 ++++
.../aarch64-baseline-one-feature.xml | 8 ++++++
13 files changed, 141 insertions(+)
create mode 100644 tests/cputestdata/aarch64-baseline-incompatible-vendors.xml
create mode 100644 tests/cputestdata/aarch64-baseline-no-compatible-feature-result.xml
create mode 100644 tests/cputestdata/aarch64-baseline-no-compatible-feature.xml
create mode 100644 tests/cputestdata/aarch64-baseline-no-feature-result.xml
create mode 100644 tests/cputestdata/aarch64-baseline-no-feature.xml
create mode 100644 tests/cputestdata/aarch64-baseline-no-model.xml
create mode 100644 tests/cputestdata/aarch64-baseline-no-vendor-result.xml
create mode 100644 tests/cputestdata/aarch64-baseline-no-vendor.xml
create mode 100644 tests/cputestdata/aarch64-baseline-one-compatible-feature-result.xml
create mode 100644 tests/cputestdata/aarch64-baseline-one-compatible-feature.xml
create mode 100644 tests/cputestdata/aarch64-baseline-one-feature-result.xml
create mode 100644 tests/cputestdata/aarch64-baseline-one-feature.xml
diff --git a/tests/cputest.c b/tests/cputest.c
index e4b4531..3657fa4 100644
--- a/tests/cputest.c
+++ b/tests/cputest.c
@@ -1194,6 +1194,13 @@ mymain(void)
DO_TEST_BASELINE(VIR_ARCH_PPC64, "same-model", 0, 0);
DO_TEST_BASELINE(VIR_ARCH_PPC64, "legacy", 0, -1);
+ DO_TEST_BASELINE(VIR_ARCH_AARCH64, "incompatible-vendors", 0, -1);
+ DO_TEST_BASELINE(VIR_ARCH_AARCH64, "no-vendor", 0, 0);
+ DO_TEST_BASELINE(VIR_ARCH_AARCH64, "no-feature", 0, 0);
+ DO_TEST_BASELINE(VIR_ARCH_AARCH64, "one-feature", 0, 0);
+ DO_TEST_BASELINE(VIR_ARCH_AARCH64, "no-compatible-feature", 0, 0);
+ DO_TEST_BASELINE(VIR_ARCH_AARCH64, "one-compatible-feature", 0, 0);
+
/* CPU features */
DO_TEST_HASFEATURE(VIR_ARCH_X86_64, "host", "vmx", YES);
DO_TEST_HASFEATURE(VIR_ARCH_X86_64, "host", "lm", YES);
diff --git a/tests/cputestdata/aarch64-baseline-incompatible-vendors.xml b/tests/cputestdata/aarch64-baseline-incompatible-vendors.xml
new file mode 100644
index 0000000..f2c71a1
--- /dev/null
+++ b/tests/cputestdata/aarch64-baseline-incompatible-vendors.xml
@@ -0,0 +1,26 @@
+<cpuTest>
+<cpu>
+ <arch>aarch64</arch>
+ <model>cortex-a57</model>
+ <vendor>ARM</vendor>
+ <feature name='fp'/>
+ <feature name='asimd'/>
+ <feature name='aes'/>
+ <feature name='pmull'/>
+ <feature name='sha1'/>
+ <feature name='sha2'/>
+ <feature name='crc32'/>
+</cpu>
+<cpu>
+ <arch>aarch64</arch>
+ <model>cortex-a72</model>
+ <vendor>Hisilicon</vendor>
+ <feature name='fp'/>
+ <feature name='asimd'/>
+ <feature name='aes'/>
+ <feature name='pmull'/>
+ <feature name='sha1'/>
+ <feature name='sha2'/>
+ <feature name='crc32'/>
+</cpu>
+</cpuTest>
diff --git a/tests/cputestdata/aarch64-baseline-no-compatible-feature-result.xml b/tests/cputestdata/aarch64-baseline-no-compatible-feature-result.xml
new file mode 100644
index 0000000..6db66aa
--- /dev/null
+++ b/tests/cputestdata/aarch64-baseline-no-compatible-feature-result.xml
@@ -0,0 +1,4 @@
+<cpu mode='custom' match='exact'>
+ <model fallback='forbid'>cortex-a57</model>
+ <vendor>ARM</vendor>
+</cpu>
diff --git a/tests/cputestdata/aarch64-baseline-no-compatible-feature.xml b/tests/cputestdata/aarch64-baseline-no-compatible-feature.xml
new file mode 100644
index 0000000..5fd3228
--- /dev/null
+++ b/tests/cputestdata/aarch64-baseline-no-compatible-feature.xml
@@ -0,0 +1,19 @@
+<cpuTest>
+<cpu>
+ <arch>aarch64</arch>
+ <model>cortex-a57</model>
+ <vendor>ARM</vendor>
+ <feature name='fp'/>
+ <feature name='asimd'/>
+ <feature name='pmull'/>
+ <feature name='sha2'/>
+ <feature name='crc32'/>
+</cpu>
+<cpu>
+ <arch>aarch64</arch>
+ <model>cortex-a57</model>
+ <vendor>ARM</vendor>
+ <feature name='aes'/>
+ <feature name='sha1'/>
+</cpu>
+</cpuTest>
diff --git a/tests/cputestdata/aarch64-baseline-no-feature-result.xml b/tests/cputestdata/aarch64-baseline-no-feature-result.xml
new file mode 100644
index 0000000..6db66aa
--- /dev/null
+++ b/tests/cputestdata/aarch64-baseline-no-feature-result.xml
@@ -0,0 +1,4 @@
+<cpu mode='custom' match='exact'>
+ <model fallback='forbid'>cortex-a57</model>
+ <vendor>ARM</vendor>
+</cpu>
diff --git a/tests/cputestdata/aarch64-baseline-no-feature.xml b/tests/cputestdata/aarch64-baseline-no-feature.xml
new file mode 100644
index 0000000..0d6af96
--- /dev/null
+++ b/tests/cputestdata/aarch64-baseline-no-feature.xml
@@ -0,0 +1,7 @@
+<cpuTest>
+<cpu>
+ <arch>aarch64</arch>
+ <model>cortex-a57</model>
+ <vendor>ARM</vendor>
+</cpu>
+</cpuTest>
diff --git a/tests/cputestdata/aarch64-baseline-no-model.xml b/tests/cputestdata/aarch64-baseline-no-model.xml
new file mode 100644
index 0000000..6033e4c
--- /dev/null
+++ b/tests/cputestdata/aarch64-baseline-no-model.xml
@@ -0,0 +1,13 @@
+<cpuTest>
+<cpu>
+ <arch>aarch64</arch>
+ <vendor>ARM</vendor>
+ <feature name='fp'/>
+ <feature name='asimd'/>
+ <feature name='aes'/>
+ <feature name='pmull'/>
+ <feature name='sha1'/>
+ <feature name='sha2'/>
+ <feature name='crc32'/>
+</cpu>
+</cpuTest>
diff --git a/tests/cputestdata/aarch64-baseline-no-vendor-result.xml b/tests/cputestdata/aarch64-baseline-no-vendor-result.xml
new file mode 100644
index 0000000..c1d74c2
--- /dev/null
+++ b/tests/cputestdata/aarch64-baseline-no-vendor-result.xml
@@ -0,0 +1,10 @@
+<cpu mode='custom' match='exact'>
+ <model fallback='forbid'>cortex-a57</model>
+ <feature policy='require' name='fp'/>
+ <feature policy='require' name='asimd'/>
+ <feature policy='require' name='aes'/>
+ <feature policy='require' name='pmull'/>
+ <feature policy='require' name='sha1'/>
+ <feature policy='require' name='sha2'/>
+ <feature policy='require' name='crc32'/>
+</cpu>
diff --git a/tests/cputestdata/aarch64-baseline-no-vendor.xml b/tests/cputestdata/aarch64-baseline-no-vendor.xml
new file mode 100644
index 0000000..8aacb3e
--- /dev/null
+++ b/tests/cputestdata/aarch64-baseline-no-vendor.xml
@@ -0,0 +1,13 @@
+<cpuTest>
+<cpu>
+ <arch>aarch64</arch>
+ <model>cortex-a57</model>
+ <feature name='fp'/>
+ <feature name='asimd'/>
+ <feature name='aes'/>
+ <feature name='pmull'/>
+ <feature name='sha1'/>
+ <feature name='sha2'/>
+ <feature name='crc32'/>
+</cpu>
+</cpuTest>
diff --git a/tests/cputestdata/aarch64-baseline-one-compatible-feature-result.xml b/tests/cputestdata/aarch64-baseline-one-compatible-feature-result.xml
new file mode 100644
index 0000000..84c559d
--- /dev/null
+++ b/tests/cputestdata/aarch64-baseline-one-compatible-feature-result.xml
@@ -0,0 +1,5 @@
+<cpu mode='custom' match='exact'>
+ <model fallback='forbid'>cortex-a57</model>
+ <vendor>ARM</vendor>
+ <feature policy='require' name='sha1'/>
+</cpu>
diff --git a/tests/cputestdata/aarch64-baseline-one-compatible-feature.xml b/tests/cputestdata/aarch64-baseline-one-compatible-feature.xml
new file mode 100644
index 0000000..c85059b
--- /dev/null
+++ b/tests/cputestdata/aarch64-baseline-one-compatible-feature.xml
@@ -0,0 +1,20 @@
+<cpuTest>
+<cpu>
+ <arch>aarch64</arch>
+ <model>cortex-a57</model>
+ <vendor>ARM</vendor>
+ <feature name='fp'/>
+ <feature name='asimd'/>
+ <feature name='aes'/>
+ <feature name='pmull'/>
+ <feature name='sha1'/>
+ <feature name='sha2'/>
+ <feature name='crc32'/>
+</cpu>
+<cpu>
+ <arch>aarch64</arch>
+ <model>cortex-a57</model>
+ <vendor>ARM</vendor>
+ <feature name='sha1'/>
+</cpu>
+</cpuTest>
diff --git a/tests/cputestdata/aarch64-baseline-one-feature-result.xml b/tests/cputestdata/aarch64-baseline-one-feature-result.xml
new file mode 100644
index 0000000..0fcea51
--- /dev/null
+++ b/tests/cputestdata/aarch64-baseline-one-feature-result.xml
@@ -0,0 +1,5 @@
+<cpu mode='custom' match='exact'>
+ <model fallback='forbid'>cortex-a57</model>
+ <vendor>ARM</vendor>
+ <feature policy='require' name='fp'/>
+</cpu>
diff --git a/tests/cputestdata/aarch64-baseline-one-feature.xml b/tests/cputestdata/aarch64-baseline-one-feature.xml
new file mode 100644
index 0000000..e0ae15f
--- /dev/null
+++ b/tests/cputestdata/aarch64-baseline-one-feature.xml
@@ -0,0 +1,8 @@
+<cpuTest>
+<cpu>
+ <arch>aarch64</arch>
+ <model>cortex-a57</model>
+ <vendor>ARM</vendor>
+ <feature name='fp'/>
+</cpu>
+</cpuTest>
--
2.23.0
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/mdLUbG/libvirt.git
git@gitee.com:mdLUbG/libvirt.git
mdLUbG
libvirt
libvirt
master

搜索帮助