c1c534
From b4c36bdf3ed28042338716cc1add921bd4f54e2d Mon Sep 17 00:00:00 2001
c1c534
Message-Id: <b4c36bdf3ed28042338716cc1add921bd4f54e2d@dist-git>
c1c534
From: Martin Kletzander <mkletzan@redhat.com>
c1c534
Date: Wed, 31 Jan 2018 16:32:21 +0100
c1c534
Subject: [PATCH] tests: Add resctrl-skx-twocaches test case to vircaps2xmltest
c1c534
c1c534
https://bugzilla.redhat.com/show_bug.cgi?id=1289368
c1c534
c1c534
This doesn't add very much value for now, but future test for virresctrl will
c1c534
take information from vircaps2xmldata (since it is dependent on the same info
c1c534
then why duplicate it) and this particular use case helps us cover bit more of
c1c534
the code regarding proper formatting and handling errors.  And one more test for
c1c534
vircaps2xmltest doesn't hurt either.
c1c534
c1c534
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
c1c534
Reviewed-by: John Ferlan <jferlan@redhat.com>
c1c534
(cherry picked from commit d807014563bb25b466d5dbf718f023c18e762a4b)
c1c534
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
c1c534
---
c1c534
 .../resctrl/info/L3/cbm_mask                       |  1 +
c1c534
 .../resctrl/info/L3/min_cbm_bits                   |  1 +
c1c534
 .../resctrl/info/L3/num_closids                    |  1 +
c1c534
 .../linux-resctrl-skx-twocaches/resctrl/schemata   |  1 +
c1c534
 .../resctrl/some_reservation/schemata              |  1 +
c1c534
 .../system/cpu/cpu0/cache/index0/id                |  1 +
c1c534
 .../system/cpu/cpu0/cache/index0/level             |  1 +
c1c534
 .../system/cpu/cpu0/cache/index0/shared_cpu_list   |  1 +
c1c534
 .../system/cpu/cpu0/cache/index0/shared_cpu_map    |  1 +
c1c534
 .../system/cpu/cpu0/cache/index0/size              |  1 +
c1c534
 .../system/cpu/cpu0/cache/index0/type              |  1 +
c1c534
 .../system/cpu/cpu0/cache/index1/id                |  1 +
c1c534
 .../system/cpu/cpu0/cache/index1/level             |  1 +
c1c534
 .../system/cpu/cpu0/cache/index1/shared_cpu_list   |  1 +
c1c534
 .../system/cpu/cpu0/cache/index1/shared_cpu_map    |  1 +
c1c534
 .../system/cpu/cpu0/cache/index1/size              |  1 +
c1c534
 .../system/cpu/cpu0/cache/index1/type              |  1 +
c1c534
 .../system/cpu/cpu0/online                         |  1 +
c1c534
 .../system/cpu/cpu0/topology/core_id               |  1 +
c1c534
 .../system/cpu/cpu0/topology/core_siblings         |  1 +
c1c534
 .../system/cpu/cpu0/topology/core_siblings_list    |  1 +
c1c534
 .../system/cpu/cpu0/topology/physical_package_id   |  1 +
c1c534
 .../system/cpu/cpu0/topology/thread_siblings       |  1 +
c1c534
 .../system/cpu/cpu0/topology/thread_siblings_list  |  1 +
c1c534
 .../linux-resctrl-skx-twocaches/system/cpu/online  |  1 +
c1c534
 .../linux-resctrl-skx-twocaches/system/cpu/present |  1 +
c1c534
 .../system/node/node0/cpu0                         |  1 +
c1c534
 .../system/node/node0/cpulist                      |  1 +
c1c534
 .../system/node/node0/cpumap                       |  1 +
c1c534
 .../system/node/node0/distance                     |  1 +
c1c534
 .../linux-resctrl-skx-twocaches/system/node/online |  1 +
c1c534
 .../vircaps-x86_64-resctrl-skx-twocaches.xml       | 34 ++++++++++++++++++++++
c1c534
 tests/vircaps2xmltest.c                            |  1 +
c1c534
 33 files changed, 66 insertions(+)
c1c534
 create mode 100644 tests/vircaps2xmldata/linux-resctrl-skx-twocaches/resctrl/info/L3/cbm_mask
c1c534
 create mode 100644 tests/vircaps2xmldata/linux-resctrl-skx-twocaches/resctrl/info/L3/min_cbm_bits
c1c534
 create mode 100644 tests/vircaps2xmldata/linux-resctrl-skx-twocaches/resctrl/info/L3/num_closids
c1c534
 create mode 100644 tests/vircaps2xmldata/linux-resctrl-skx-twocaches/resctrl/schemata
c1c534
 create mode 100644 tests/vircaps2xmldata/linux-resctrl-skx-twocaches/resctrl/some_reservation/schemata
c1c534
 create mode 100644 tests/vircaps2xmldata/linux-resctrl-skx-twocaches/system/cpu/cpu0/cache/index0/id
c1c534
 create mode 100644 tests/vircaps2xmldata/linux-resctrl-skx-twocaches/system/cpu/cpu0/cache/index0/level
c1c534
 create mode 100644 tests/vircaps2xmldata/linux-resctrl-skx-twocaches/system/cpu/cpu0/cache/index0/shared_cpu_list
c1c534
 create mode 100644 tests/vircaps2xmldata/linux-resctrl-skx-twocaches/system/cpu/cpu0/cache/index0/shared_cpu_map
c1c534
 create mode 100644 tests/vircaps2xmldata/linux-resctrl-skx-twocaches/system/cpu/cpu0/cache/index0/size
c1c534
 create mode 100644 tests/vircaps2xmldata/linux-resctrl-skx-twocaches/system/cpu/cpu0/cache/index0/type
c1c534
 create mode 100644 tests/vircaps2xmldata/linux-resctrl-skx-twocaches/system/cpu/cpu0/cache/index1/id
c1c534
 create mode 100644 tests/vircaps2xmldata/linux-resctrl-skx-twocaches/system/cpu/cpu0/cache/index1/level
c1c534
 create mode 100644 tests/vircaps2xmldata/linux-resctrl-skx-twocaches/system/cpu/cpu0/cache/index1/shared_cpu_list
c1c534
 create mode 100644 tests/vircaps2xmldata/linux-resctrl-skx-twocaches/system/cpu/cpu0/cache/index1/shared_cpu_map
c1c534
 create mode 100644 tests/vircaps2xmldata/linux-resctrl-skx-twocaches/system/cpu/cpu0/cache/index1/size
c1c534
 create mode 100644 tests/vircaps2xmldata/linux-resctrl-skx-twocaches/system/cpu/cpu0/cache/index1/type
c1c534
 create mode 100644 tests/vircaps2xmldata/linux-resctrl-skx-twocaches/system/cpu/cpu0/online
c1c534
 create mode 100644 tests/vircaps2xmldata/linux-resctrl-skx-twocaches/system/cpu/cpu0/topology/core_id
c1c534
 create mode 100644 tests/vircaps2xmldata/linux-resctrl-skx-twocaches/system/cpu/cpu0/topology/core_siblings
c1c534
 create mode 100644 tests/vircaps2xmldata/linux-resctrl-skx-twocaches/system/cpu/cpu0/topology/core_siblings_list
c1c534
 create mode 100644 tests/vircaps2xmldata/linux-resctrl-skx-twocaches/system/cpu/cpu0/topology/physical_package_id
c1c534
 create mode 100644 tests/vircaps2xmldata/linux-resctrl-skx-twocaches/system/cpu/cpu0/topology/thread_siblings
c1c534
 create mode 100644 tests/vircaps2xmldata/linux-resctrl-skx-twocaches/system/cpu/cpu0/topology/thread_siblings_list
c1c534
 create mode 100644 tests/vircaps2xmldata/linux-resctrl-skx-twocaches/system/cpu/online
c1c534
 create mode 100644 tests/vircaps2xmldata/linux-resctrl-skx-twocaches/system/cpu/present
c1c534
 create mode 120000 tests/vircaps2xmldata/linux-resctrl-skx-twocaches/system/node/node0/cpu0
c1c534
 create mode 100644 tests/vircaps2xmldata/linux-resctrl-skx-twocaches/system/node/node0/cpulist
c1c534
 create mode 100644 tests/vircaps2xmldata/linux-resctrl-skx-twocaches/system/node/node0/cpumap
c1c534
 create mode 100644 tests/vircaps2xmldata/linux-resctrl-skx-twocaches/system/node/node0/distance
c1c534
 create mode 100644 tests/vircaps2xmldata/linux-resctrl-skx-twocaches/system/node/online
c1c534
 create mode 100644 tests/vircaps2xmldata/vircaps-x86_64-resctrl-skx-twocaches.xml
c1c534
c1c534
diff --git a/tests/vircaps2xmldata/linux-resctrl-skx-twocaches/resctrl/info/L3/cbm_mask b/tests/vircaps2xmldata/linux-resctrl-skx-twocaches/resctrl/info/L3/cbm_mask
c1c534
new file mode 100644
c1c534
index 0000000000..d482bbb269
c1c534
--- /dev/null
c1c534
+++ b/tests/vircaps2xmldata/linux-resctrl-skx-twocaches/resctrl/info/L3/cbm_mask
c1c534
@@ -0,0 +1 @@
c1c534
+7ff
c1c534
diff --git a/tests/vircaps2xmldata/linux-resctrl-skx-twocaches/resctrl/info/L3/min_cbm_bits b/tests/vircaps2xmldata/linux-resctrl-skx-twocaches/resctrl/info/L3/min_cbm_bits
c1c534
new file mode 100644
c1c534
index 0000000000..d00491fd7e
c1c534
--- /dev/null
c1c534
+++ b/tests/vircaps2xmldata/linux-resctrl-skx-twocaches/resctrl/info/L3/min_cbm_bits
c1c534
@@ -0,0 +1 @@
c1c534
+1
c1c534
diff --git a/tests/vircaps2xmldata/linux-resctrl-skx-twocaches/resctrl/info/L3/num_closids b/tests/vircaps2xmldata/linux-resctrl-skx-twocaches/resctrl/info/L3/num_closids
c1c534
new file mode 100644
c1c534
index 0000000000..b6a7d89c68
c1c534
--- /dev/null
c1c534
+++ b/tests/vircaps2xmldata/linux-resctrl-skx-twocaches/resctrl/info/L3/num_closids
c1c534
@@ -0,0 +1 @@
c1c534
+16
c1c534
diff --git a/tests/vircaps2xmldata/linux-resctrl-skx-twocaches/resctrl/schemata b/tests/vircaps2xmldata/linux-resctrl-skx-twocaches/resctrl/schemata
c1c534
new file mode 100644
c1c534
index 0000000000..691fbaf887
c1c534
--- /dev/null
c1c534
+++ b/tests/vircaps2xmldata/linux-resctrl-skx-twocaches/resctrl/schemata
c1c534
@@ -0,0 +1 @@
c1c534
+L3:0=0f0;1=000
c1c534
diff --git a/tests/vircaps2xmldata/linux-resctrl-skx-twocaches/resctrl/some_reservation/schemata b/tests/vircaps2xmldata/linux-resctrl-skx-twocaches/resctrl/some_reservation/schemata
c1c534
new file mode 100644
c1c534
index 0000000000..e76adc896c
c1c534
--- /dev/null
c1c534
+++ b/tests/vircaps2xmldata/linux-resctrl-skx-twocaches/resctrl/some_reservation/schemata
c1c534
@@ -0,0 +1 @@
c1c534
+L3:0=70e;1=3ff
c1c534
diff --git a/tests/vircaps2xmldata/linux-resctrl-skx-twocaches/system/cpu/cpu0/cache/index0/id b/tests/vircaps2xmldata/linux-resctrl-skx-twocaches/system/cpu/cpu0/cache/index0/id
c1c534
new file mode 100644
c1c534
index 0000000000..573541ac97
c1c534
--- /dev/null
c1c534
+++ b/tests/vircaps2xmldata/linux-resctrl-skx-twocaches/system/cpu/cpu0/cache/index0/id
c1c534
@@ -0,0 +1 @@
c1c534
+0
c1c534
diff --git a/tests/vircaps2xmldata/linux-resctrl-skx-twocaches/system/cpu/cpu0/cache/index0/level b/tests/vircaps2xmldata/linux-resctrl-skx-twocaches/system/cpu/cpu0/cache/index0/level
c1c534
new file mode 100644
c1c534
index 0000000000..00750edc07
c1c534
--- /dev/null
c1c534
+++ b/tests/vircaps2xmldata/linux-resctrl-skx-twocaches/system/cpu/cpu0/cache/index0/level
c1c534
@@ -0,0 +1 @@
c1c534
+3
c1c534
diff --git a/tests/vircaps2xmldata/linux-resctrl-skx-twocaches/system/cpu/cpu0/cache/index0/shared_cpu_list b/tests/vircaps2xmldata/linux-resctrl-skx-twocaches/system/cpu/cpu0/cache/index0/shared_cpu_list
c1c534
new file mode 100644
c1c534
index 0000000000..573541ac97
c1c534
--- /dev/null
c1c534
+++ b/tests/vircaps2xmldata/linux-resctrl-skx-twocaches/system/cpu/cpu0/cache/index0/shared_cpu_list
c1c534
@@ -0,0 +1 @@
c1c534
+0
c1c534
diff --git a/tests/vircaps2xmldata/linux-resctrl-skx-twocaches/system/cpu/cpu0/cache/index0/shared_cpu_map b/tests/vircaps2xmldata/linux-resctrl-skx-twocaches/system/cpu/cpu0/cache/index0/shared_cpu_map
c1c534
new file mode 100644
c1c534
index 0000000000..5325a8dff7
c1c534
--- /dev/null
c1c534
+++ b/tests/vircaps2xmldata/linux-resctrl-skx-twocaches/system/cpu/cpu0/cache/index0/shared_cpu_map
c1c534
@@ -0,0 +1 @@
c1c534
+001
c1c534
diff --git a/tests/vircaps2xmldata/linux-resctrl-skx-twocaches/system/cpu/cpu0/cache/index0/size b/tests/vircaps2xmldata/linux-resctrl-skx-twocaches/system/cpu/cpu0/cache/index0/size
c1c534
new file mode 100644
c1c534
index 0000000000..d23da60c12
c1c534
--- /dev/null
c1c534
+++ b/tests/vircaps2xmldata/linux-resctrl-skx-twocaches/system/cpu/cpu0/cache/index0/size
c1c534
@@ -0,0 +1 @@
c1c534
+33M
c1c534
diff --git a/tests/vircaps2xmldata/linux-resctrl-skx-twocaches/system/cpu/cpu0/cache/index0/type b/tests/vircaps2xmldata/linux-resctrl-skx-twocaches/system/cpu/cpu0/cache/index0/type
c1c534
new file mode 100644
c1c534
index 0000000000..e4fd9dccda
c1c534
--- /dev/null
c1c534
+++ b/tests/vircaps2xmldata/linux-resctrl-skx-twocaches/system/cpu/cpu0/cache/index0/type
c1c534
@@ -0,0 +1 @@
c1c534
+Unified
c1c534
diff --git a/tests/vircaps2xmldata/linux-resctrl-skx-twocaches/system/cpu/cpu0/cache/index1/id b/tests/vircaps2xmldata/linux-resctrl-skx-twocaches/system/cpu/cpu0/cache/index1/id
c1c534
new file mode 100644
c1c534
index 0000000000..d00491fd7e
c1c534
--- /dev/null
c1c534
+++ b/tests/vircaps2xmldata/linux-resctrl-skx-twocaches/system/cpu/cpu0/cache/index1/id
c1c534
@@ -0,0 +1 @@
c1c534
+1
c1c534
diff --git a/tests/vircaps2xmldata/linux-resctrl-skx-twocaches/system/cpu/cpu0/cache/index1/level b/tests/vircaps2xmldata/linux-resctrl-skx-twocaches/system/cpu/cpu0/cache/index1/level
c1c534
new file mode 100644
c1c534
index 0000000000..00750edc07
c1c534
--- /dev/null
c1c534
+++ b/tests/vircaps2xmldata/linux-resctrl-skx-twocaches/system/cpu/cpu0/cache/index1/level
c1c534
@@ -0,0 +1 @@
c1c534
+3
c1c534
diff --git a/tests/vircaps2xmldata/linux-resctrl-skx-twocaches/system/cpu/cpu0/cache/index1/shared_cpu_list b/tests/vircaps2xmldata/linux-resctrl-skx-twocaches/system/cpu/cpu0/cache/index1/shared_cpu_list
c1c534
new file mode 100644
c1c534
index 0000000000..573541ac97
c1c534
--- /dev/null
c1c534
+++ b/tests/vircaps2xmldata/linux-resctrl-skx-twocaches/system/cpu/cpu0/cache/index1/shared_cpu_list
c1c534
@@ -0,0 +1 @@
c1c534
+0
c1c534
diff --git a/tests/vircaps2xmldata/linux-resctrl-skx-twocaches/system/cpu/cpu0/cache/index1/shared_cpu_map b/tests/vircaps2xmldata/linux-resctrl-skx-twocaches/system/cpu/cpu0/cache/index1/shared_cpu_map
c1c534
new file mode 100644
c1c534
index 0000000000..5325a8dff7
c1c534
--- /dev/null
c1c534
+++ b/tests/vircaps2xmldata/linux-resctrl-skx-twocaches/system/cpu/cpu0/cache/index1/shared_cpu_map
c1c534
@@ -0,0 +1 @@
c1c534
+001
c1c534
diff --git a/tests/vircaps2xmldata/linux-resctrl-skx-twocaches/system/cpu/cpu0/cache/index1/size b/tests/vircaps2xmldata/linux-resctrl-skx-twocaches/system/cpu/cpu0/cache/index1/size
c1c534
new file mode 100644
c1c534
index 0000000000..d23da60c12
c1c534
--- /dev/null
c1c534
+++ b/tests/vircaps2xmldata/linux-resctrl-skx-twocaches/system/cpu/cpu0/cache/index1/size
c1c534
@@ -0,0 +1 @@
c1c534
+33M
c1c534
diff --git a/tests/vircaps2xmldata/linux-resctrl-skx-twocaches/system/cpu/cpu0/cache/index1/type b/tests/vircaps2xmldata/linux-resctrl-skx-twocaches/system/cpu/cpu0/cache/index1/type
c1c534
new file mode 100644
c1c534
index 0000000000..e4fd9dccda
c1c534
--- /dev/null
c1c534
+++ b/tests/vircaps2xmldata/linux-resctrl-skx-twocaches/system/cpu/cpu0/cache/index1/type
c1c534
@@ -0,0 +1 @@
c1c534
+Unified
c1c534
diff --git a/tests/vircaps2xmldata/linux-resctrl-skx-twocaches/system/cpu/cpu0/online b/tests/vircaps2xmldata/linux-resctrl-skx-twocaches/system/cpu/cpu0/online
c1c534
new file mode 100644
c1c534
index 0000000000..d00491fd7e
c1c534
--- /dev/null
c1c534
+++ b/tests/vircaps2xmldata/linux-resctrl-skx-twocaches/system/cpu/cpu0/online
c1c534
@@ -0,0 +1 @@
c1c534
+1
c1c534
diff --git a/tests/vircaps2xmldata/linux-resctrl-skx-twocaches/system/cpu/cpu0/topology/core_id b/tests/vircaps2xmldata/linux-resctrl-skx-twocaches/system/cpu/cpu0/topology/core_id
c1c534
new file mode 100644
c1c534
index 0000000000..573541ac97
c1c534
--- /dev/null
c1c534
+++ b/tests/vircaps2xmldata/linux-resctrl-skx-twocaches/system/cpu/cpu0/topology/core_id
c1c534
@@ -0,0 +1 @@
c1c534
+0
c1c534
diff --git a/tests/vircaps2xmldata/linux-resctrl-skx-twocaches/system/cpu/cpu0/topology/core_siblings b/tests/vircaps2xmldata/linux-resctrl-skx-twocaches/system/cpu/cpu0/topology/core_siblings
c1c534
new file mode 100644
c1c534
index 0000000000..5325a8dff7
c1c534
--- /dev/null
c1c534
+++ b/tests/vircaps2xmldata/linux-resctrl-skx-twocaches/system/cpu/cpu0/topology/core_siblings
c1c534
@@ -0,0 +1 @@
c1c534
+001
c1c534
diff --git a/tests/vircaps2xmldata/linux-resctrl-skx-twocaches/system/cpu/cpu0/topology/core_siblings_list b/tests/vircaps2xmldata/linux-resctrl-skx-twocaches/system/cpu/cpu0/topology/core_siblings_list
c1c534
new file mode 100644
c1c534
index 0000000000..573541ac97
c1c534
--- /dev/null
c1c534
+++ b/tests/vircaps2xmldata/linux-resctrl-skx-twocaches/system/cpu/cpu0/topology/core_siblings_list
c1c534
@@ -0,0 +1 @@
c1c534
+0
c1c534
diff --git a/tests/vircaps2xmldata/linux-resctrl-skx-twocaches/system/cpu/cpu0/topology/physical_package_id b/tests/vircaps2xmldata/linux-resctrl-skx-twocaches/system/cpu/cpu0/topology/physical_package_id
c1c534
new file mode 100644
c1c534
index 0000000000..573541ac97
c1c534
--- /dev/null
c1c534
+++ b/tests/vircaps2xmldata/linux-resctrl-skx-twocaches/system/cpu/cpu0/topology/physical_package_id
c1c534
@@ -0,0 +1 @@
c1c534
+0
c1c534
diff --git a/tests/vircaps2xmldata/linux-resctrl-skx-twocaches/system/cpu/cpu0/topology/thread_siblings b/tests/vircaps2xmldata/linux-resctrl-skx-twocaches/system/cpu/cpu0/topology/thread_siblings
c1c534
new file mode 100644
c1c534
index 0000000000..5325a8dff7
c1c534
--- /dev/null
c1c534
+++ b/tests/vircaps2xmldata/linux-resctrl-skx-twocaches/system/cpu/cpu0/topology/thread_siblings
c1c534
@@ -0,0 +1 @@
c1c534
+001
c1c534
diff --git a/tests/vircaps2xmldata/linux-resctrl-skx-twocaches/system/cpu/cpu0/topology/thread_siblings_list b/tests/vircaps2xmldata/linux-resctrl-skx-twocaches/system/cpu/cpu0/topology/thread_siblings_list
c1c534
new file mode 100644
c1c534
index 0000000000..573541ac97
c1c534
--- /dev/null
c1c534
+++ b/tests/vircaps2xmldata/linux-resctrl-skx-twocaches/system/cpu/cpu0/topology/thread_siblings_list
c1c534
@@ -0,0 +1 @@
c1c534
+0
c1c534
diff --git a/tests/vircaps2xmldata/linux-resctrl-skx-twocaches/system/cpu/online b/tests/vircaps2xmldata/linux-resctrl-skx-twocaches/system/cpu/online
c1c534
new file mode 100644
c1c534
index 0000000000..573541ac97
c1c534
--- /dev/null
c1c534
+++ b/tests/vircaps2xmldata/linux-resctrl-skx-twocaches/system/cpu/online
c1c534
@@ -0,0 +1 @@
c1c534
+0
c1c534
diff --git a/tests/vircaps2xmldata/linux-resctrl-skx-twocaches/system/cpu/present b/tests/vircaps2xmldata/linux-resctrl-skx-twocaches/system/cpu/present
c1c534
new file mode 100644
c1c534
index 0000000000..573541ac97
c1c534
--- /dev/null
c1c534
+++ b/tests/vircaps2xmldata/linux-resctrl-skx-twocaches/system/cpu/present
c1c534
@@ -0,0 +1 @@
c1c534
+0
c1c534
diff --git a/tests/vircaps2xmldata/linux-resctrl-skx-twocaches/system/node/node0/cpu0 b/tests/vircaps2xmldata/linux-resctrl-skx-twocaches/system/node/node0/cpu0
c1c534
new file mode 120000
c1c534
index 0000000000..c841bea28b
c1c534
--- /dev/null
c1c534
+++ b/tests/vircaps2xmldata/linux-resctrl-skx-twocaches/system/node/node0/cpu0
c1c534
@@ -0,0 +1 @@
c1c534
+../../cpu/cpu0
c1c534
\ No newline at end of file
c1c534
diff --git a/tests/vircaps2xmldata/linux-resctrl-skx-twocaches/system/node/node0/cpulist b/tests/vircaps2xmldata/linux-resctrl-skx-twocaches/system/node/node0/cpulist
c1c534
new file mode 100644
c1c534
index 0000000000..573541ac97
c1c534
--- /dev/null
c1c534
+++ b/tests/vircaps2xmldata/linux-resctrl-skx-twocaches/system/node/node0/cpulist
c1c534
@@ -0,0 +1 @@
c1c534
+0
c1c534
diff --git a/tests/vircaps2xmldata/linux-resctrl-skx-twocaches/system/node/node0/cpumap b/tests/vircaps2xmldata/linux-resctrl-skx-twocaches/system/node/node0/cpumap
c1c534
new file mode 100644
c1c534
index 0000000000..5325a8dff7
c1c534
--- /dev/null
c1c534
+++ b/tests/vircaps2xmldata/linux-resctrl-skx-twocaches/system/node/node0/cpumap
c1c534
@@ -0,0 +1 @@
c1c534
+001
c1c534
diff --git a/tests/vircaps2xmldata/linux-resctrl-skx-twocaches/system/node/node0/distance b/tests/vircaps2xmldata/linux-resctrl-skx-twocaches/system/node/node0/distance
c1c534
new file mode 100644
c1c534
index 0000000000..f599e28b8a
c1c534
--- /dev/null
c1c534
+++ b/tests/vircaps2xmldata/linux-resctrl-skx-twocaches/system/node/node0/distance
c1c534
@@ -0,0 +1 @@
c1c534
+10
c1c534
diff --git a/tests/vircaps2xmldata/linux-resctrl-skx-twocaches/system/node/online b/tests/vircaps2xmldata/linux-resctrl-skx-twocaches/system/node/online
c1c534
new file mode 100644
c1c534
index 0000000000..573541ac97
c1c534
--- /dev/null
c1c534
+++ b/tests/vircaps2xmldata/linux-resctrl-skx-twocaches/system/node/online
c1c534
@@ -0,0 +1 @@
c1c534
+0
c1c534
diff --git a/tests/vircaps2xmldata/vircaps-x86_64-resctrl-skx-twocaches.xml b/tests/vircaps2xmldata/vircaps-x86_64-resctrl-skx-twocaches.xml
c1c534
new file mode 100644
c1c534
index 0000000000..d18665b24f
c1c534
--- /dev/null
c1c534
+++ b/tests/vircaps2xmldata/vircaps-x86_64-resctrl-skx-twocaches.xml
c1c534
@@ -0,0 +1,34 @@
c1c534
+<capabilities>
c1c534
+
c1c534
+  <host>
c1c534
+    <cpu>
c1c534
+      <arch>x86_64</arch>
c1c534
+    </cpu>
c1c534
+    <power_management/>
c1c534
+    <migration_features>
c1c534
+      <live/>
c1c534
+    </migration_features>
c1c534
+    <topology>
c1c534
+      <cells num='1'>
c1c534
+        <cell id='0'>
c1c534
+          <memory unit='KiB'>1048576</memory>
c1c534
+          <pages unit='KiB' size='4'>2048</pages>
c1c534
+          <pages unit='KiB' size='2048'>4096</pages>
c1c534
+          <pages unit='KiB' size='1048576'>6144</pages>
c1c534
+          <cpus num='1'>
c1c534
+            <cpu id='0' socket_id='0' core_id='0' siblings='0'/>
c1c534
+          </cpus>
c1c534
+        </cell>
c1c534
+      </cells>
c1c534
+    </topology>
c1c534
+    <cache>
c1c534
+      <bank id='0' level='3' type='both' size='33' unit='MiB' cpus='0'>
c1c534
+        <control granularity='3' unit='MiB' type='both' maxAllocs='16'/>
c1c534
+      </bank>
c1c534
+      <bank id='1' level='3' type='both' size='33' unit='MiB' cpus='0'>
c1c534
+        <control granularity='3' unit='MiB' type='both' maxAllocs='16'/>
c1c534
+      </bank>
c1c534
+    </cache>
c1c534
+  </host>
c1c534
+
c1c534
+</capabilities>
c1c534
diff --git a/tests/vircaps2xmltest.c b/tests/vircaps2xmltest.c
c1c534
index c0a67858fe..9ee9bf9f95 100644
c1c534
--- a/tests/vircaps2xmltest.c
c1c534
+++ b/tests/vircaps2xmltest.c
c1c534
@@ -121,6 +121,7 @@ mymain(void)
c1c534
     DO_TEST_FULL("resctrl", VIR_ARCH_X86_64, true, true, true);
c1c534
     DO_TEST_FULL("resctrl-cdp", VIR_ARCH_X86_64, true, true, true);
c1c534
     DO_TEST_FULL("resctrl-skx", VIR_ARCH_X86_64, true, true, true);
c1c534
+    DO_TEST_FULL("resctrl-skx-twocaches", VIR_ARCH_X86_64, true, true, true);
c1c534
 
c1c534
     return ret;
c1c534
 }
c1c534
-- 
c1c534
2.16.1
c1c534