[PATCH] nodeinfo: deal with offline cpus in a node

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Commit 80533ca forgot to think about offline cpus.  When a node
cpu is offline, then its topology/ subdirectory is not present,
leading to spurious error messages leaked to the user such as:

libvir:  error : cannot open /home/dummy/libvirt/tests/nodeinfodata/linux-nodeinfo-sysfs-test-6/node/node0/cpu7/topology/physical_package_id: No such file or directory

Fix that, as well as test it; the test data is gathered from a
machine with one NUMA node, hyperthreading, and with 2 of the
8 cpus offline.

* src/nodeinfo.c (virNodeParseNode): Don't parse topology of
offline cpus.
* tests/nodeinfotest.c (mymain): Run new test.
* tests/nodeinfodata/linux-nodeinfo-sysfs-test-6*: New data.
---

Offline cpus are an annoying corner case :)

 src/nodeinfo.c                                     |    6 +
 .../linux-nodeinfo-sysfs-test-6-cpu-x86-output.txt |    1 +
 .../linux-nodeinfo-sysfs-test-6-x86.cpuinfo        |  150 ++++++++++++++++++++
 .../cpu/cpu0/topology/core_id                      |    1 +
 .../cpu/cpu0/topology/physical_package_id          |    1 +
 .../cpu/cpu0/topology/thread_siblings              |    1 +
 .../linux-nodeinfo-sysfs-test-6/cpu/cpu1/online    |    1 +
 .../cpu/cpu1/topology/core_id                      |    1 +
 .../cpu/cpu1/topology/physical_package_id          |    1 +
 .../cpu/cpu1/topology/thread_siblings              |    1 +
 .../linux-nodeinfo-sysfs-test-6/cpu/cpu2/online    |    1 +
 .../cpu/cpu2/topology/core_id                      |    1 +
 .../cpu/cpu2/topology/physical_package_id          |    1 +
 .../cpu/cpu2/topology/thread_siblings              |    1 +
 .../linux-nodeinfo-sysfs-test-6/cpu/cpu3/online    |    1 +
 .../cpu/cpu3/topology/core_id                      |    1 +
 .../cpu/cpu3/topology/physical_package_id          |    1 +
 .../cpu/cpu3/topology/thread_siblings              |    1 +
 .../linux-nodeinfo-sysfs-test-6/cpu/cpu4/online    |    1 +
 .../cpu/cpu4/topology/core_id                      |    1 +
 .../cpu/cpu4/topology/physical_package_id          |    1 +
 .../cpu/cpu4/topology/thread_siblings              |    1 +
 .../linux-nodeinfo-sysfs-test-6/cpu/cpu5/online    |    1 +
 .../linux-nodeinfo-sysfs-test-6/cpu/cpu6/online    |    1 +
 .../cpu/cpu6/topology/core_id                      |    1 +
 .../cpu/cpu6/topology/physical_package_id          |    1 +
 .../cpu/cpu6/topology/thread_siblings              |    1 +
 .../linux-nodeinfo-sysfs-test-6/cpu/cpu7/online    |    1 +
 .../linux-nodeinfo-sysfs-test-6/node/node0/cpu0    |    1 +
 .../linux-nodeinfo-sysfs-test-6/node/node0/cpu1    |    1 +
 .../linux-nodeinfo-sysfs-test-6/node/node0/cpu2    |    1 +
 .../linux-nodeinfo-sysfs-test-6/node/node0/cpu3    |    1 +
 .../linux-nodeinfo-sysfs-test-6/node/node0/cpu4    |    1 +
 .../linux-nodeinfo-sysfs-test-6/node/node0/cpu5    |    1 +
 .../linux-nodeinfo-sysfs-test-6/node/node0/cpu6    |    1 +
 .../linux-nodeinfo-sysfs-test-6/node/node0/cpu7    |    1 +
 .../linux-nodeinfo-sysfs-test-6/node/node0/meminfo |   29 ++++
 .../linux-nodeinfo-sysfs-test-6/node/online        |  Bin 0 -> 3 bytes
 .../linux-nodeinfo-sysfs-test-6/node/possible      |  Bin 0 -> 3 bytes
 tests/nodeinfotest.c                               |    1 +
 40 files changed, 220 insertions(+)
 create mode 100644 tests/nodeinfodata/linux-nodeinfo-sysfs-test-6-cpu-x86-output.txt
 create mode 100644 tests/nodeinfodata/linux-nodeinfo-sysfs-test-6-x86.cpuinfo
 create mode 100644 tests/nodeinfodata/linux-nodeinfo-sysfs-test-6/cpu/cpu0/topology/core_id
 create mode 100644 tests/nodeinfodata/linux-nodeinfo-sysfs-test-6/cpu/cpu0/topology/physical_package_id
 create mode 100644 tests/nodeinfodata/linux-nodeinfo-sysfs-test-6/cpu/cpu0/topology/thread_siblings
 create mode 100644 tests/nodeinfodata/linux-nodeinfo-sysfs-test-6/cpu/cpu1/online
 create mode 100644 tests/nodeinfodata/linux-nodeinfo-sysfs-test-6/cpu/cpu1/topology/core_id
 create mode 100644 tests/nodeinfodata/linux-nodeinfo-sysfs-test-6/cpu/cpu1/topology/physical_package_id
 create mode 100644 tests/nodeinfodata/linux-nodeinfo-sysfs-test-6/cpu/cpu1/topology/thread_siblings
 create mode 100644 tests/nodeinfodata/linux-nodeinfo-sysfs-test-6/cpu/cpu2/online
 create mode 100644 tests/nodeinfodata/linux-nodeinfo-sysfs-test-6/cpu/cpu2/topology/core_id
 create mode 100644 tests/nodeinfodata/linux-nodeinfo-sysfs-test-6/cpu/cpu2/topology/physical_package_id
 create mode 100644 tests/nodeinfodata/linux-nodeinfo-sysfs-test-6/cpu/cpu2/topology/thread_siblings
 create mode 100644 tests/nodeinfodata/linux-nodeinfo-sysfs-test-6/cpu/cpu3/online
 create mode 100644 tests/nodeinfodata/linux-nodeinfo-sysfs-test-6/cpu/cpu3/topology/core_id
 create mode 100644 tests/nodeinfodata/linux-nodeinfo-sysfs-test-6/cpu/cpu3/topology/physical_package_id
 create mode 100644 tests/nodeinfodata/linux-nodeinfo-sysfs-test-6/cpu/cpu3/topology/thread_siblings
 create mode 100644 tests/nodeinfodata/linux-nodeinfo-sysfs-test-6/cpu/cpu4/online
 create mode 100644 tests/nodeinfodata/linux-nodeinfo-sysfs-test-6/cpu/cpu4/topology/core_id
 create mode 100644 tests/nodeinfodata/linux-nodeinfo-sysfs-test-6/cpu/cpu4/topology/physical_package_id
 create mode 100644 tests/nodeinfodata/linux-nodeinfo-sysfs-test-6/cpu/cpu4/topology/thread_siblings
 create mode 100644 tests/nodeinfodata/linux-nodeinfo-sysfs-test-6/cpu/cpu5/online
 create mode 100644 tests/nodeinfodata/linux-nodeinfo-sysfs-test-6/cpu/cpu6/online
 create mode 100644 tests/nodeinfodata/linux-nodeinfo-sysfs-test-6/cpu/cpu6/topology/core_id
 create mode 100644 tests/nodeinfodata/linux-nodeinfo-sysfs-test-6/cpu/cpu6/topology/physical_package_id
 create mode 100644 tests/nodeinfodata/linux-nodeinfo-sysfs-test-6/cpu/cpu6/topology/thread_siblings
 create mode 100644 tests/nodeinfodata/linux-nodeinfo-sysfs-test-6/cpu/cpu7/online
 create mode 120000 tests/nodeinfodata/linux-nodeinfo-sysfs-test-6/node/node0/cpu0
 create mode 120000 tests/nodeinfodata/linux-nodeinfo-sysfs-test-6/node/node0/cpu1
 create mode 120000 tests/nodeinfodata/linux-nodeinfo-sysfs-test-6/node/node0/cpu2
 create mode 120000 tests/nodeinfodata/linux-nodeinfo-sysfs-test-6/node/node0/cpu3
 create mode 120000 tests/nodeinfodata/linux-nodeinfo-sysfs-test-6/node/node0/cpu4
 create mode 120000 tests/nodeinfodata/linux-nodeinfo-sysfs-test-6/node/node0/cpu5
 create mode 120000 tests/nodeinfodata/linux-nodeinfo-sysfs-test-6/node/node0/cpu6
 create mode 120000 tests/nodeinfodata/linux-nodeinfo-sysfs-test-6/node/node0/cpu7
 create mode 100644 tests/nodeinfodata/linux-nodeinfo-sysfs-test-6/node/node0/meminfo
 create mode 100644 tests/nodeinfodata/linux-nodeinfo-sysfs-test-6/node/online
 create mode 100644 tests/nodeinfodata/linux-nodeinfo-sysfs-test-6/node/possible

diff --git a/src/nodeinfo.c b/src/nodeinfo.c
index a892e7a..052b006 100644
--- a/src/nodeinfo.c
+++ b/src/nodeinfo.c
@@ -225,6 +225,12 @@ virNodeParseNode(const char *node, int *sockets, int *cores, int *threads)
         if (sscanf(cpudirent->d_name, "cpu%u", &cpu) != 1)
             continue;

+        if ((online = virNodeGetCpuValue(node, cpu, "online", true)) < 0)
+            goto cleanup;
+
+        if (!online)
+            continue;
+
         /* Parse socket */
         sock = virNodeParseSocket(node, cpu);
         CPU_SET(sock, &sock_map);
diff --git a/tests/nodeinfodata/linux-nodeinfo-sysfs-test-6-cpu-x86-output.txt b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-6-cpu-x86-output.txt
new file mode 100644
index 0000000..7ffcb8e
--- /dev/null
+++ b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-6-cpu-x86-output.txt
@@ -0,0 +1 @@
+CPUs: 6/8, MHz: 1596, Nodes: 1, Sockets: 1, Cores: 4, Threads: 2
diff --git a/tests/nodeinfodata/linux-nodeinfo-sysfs-test-6-x86.cpuinfo b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-6-x86.cpuinfo
new file mode 100644
index 0000000..61838dd
--- /dev/null
+++ b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-6-x86.cpuinfo
@@ -0,0 +1,150 @@
+processor	: 0
+vendor_id	: GenuineIntel
+cpu family	: 6
+model		: 44
+model name	: Intel(R) Xeon(R) CPU           E5640  @ 2.67GHz
+stepping	: 2
+cpu MHz		: 1596.000
+cache size	: 12288 KB
+physical id	: 0
+siblings	: 6
+core id		: 0
+cpu cores	: 4
+apicid		: 0
+initial apicid	: 0
+fpu		: yes
+fpu_exception	: yes
+cpuid level	: 11
+wp		: yes
+flags		: fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good xtopology nonstop_tsc aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm dca sse4_1 sse4_2 popcnt aes lahf_lm ida arat epb dts tpr_shadow vnmi flexpriority ept vpid
+bogomips	: 5333.90
+clflush size	: 64
+cache_alignment	: 64
+address sizes	: 40 bits physical, 48 bits virtual
+power management:
+
+processor	: 1
+vendor_id	: GenuineIntel
+cpu family	: 6
+model		: 44
+model name	: Intel(R) Xeon(R) CPU           E5640  @ 2.67GHz
+stepping	: 2
+cpu MHz		: 1596.000
+cache size	: 12288 KB
+physical id	: 0
+siblings	: 6
+core id		: 1
+cpu cores	: 4
+apicid		: 2
+initial apicid	: 2
+fpu		: yes
+fpu_exception	: yes
+cpuid level	: 11
+wp		: yes
+flags		: fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good xtopology nonstop_tsc aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm dca sse4_1 sse4_2 popcnt aes lahf_lm ida arat epb dts tpr_shadow vnmi flexpriority ept vpid
+bogomips	: 5333.90
+clflush size	: 64
+cache_alignment	: 64
+address sizes	: 40 bits physical, 48 bits virtual
+power management:
+
+processor	: 2
+vendor_id	: GenuineIntel
+cpu family	: 6
+model		: 44
+model name	: Intel(R) Xeon(R) CPU           E5640  @ 2.67GHz
+stepping	: 2
+cpu MHz		: 1596.000
+cache size	: 12288 KB
+physical id	: 0
+siblings	: 6
+core id		: 9
+cpu cores	: 4
+apicid		: 18
+initial apicid	: 18
+fpu		: yes
+fpu_exception	: yes
+cpuid level	: 11
+wp		: yes
+flags		: fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good xtopology nonstop_tsc aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm dca sse4_1 sse4_2 popcnt aes lahf_lm ida arat epb dts tpr_shadow vnmi flexpriority ept vpid
+bogomips	: 5333.90
+clflush size	: 64
+cache_alignment	: 64
+address sizes	: 40 bits physical, 48 bits virtual
+power management:
+
+processor	: 3
+vendor_id	: GenuineIntel
+cpu family	: 6
+model		: 44
+model name	: Intel(R) Xeon(R) CPU           E5640  @ 2.67GHz
+stepping	: 2
+cpu MHz		: 1596.000
+cache size	: 12288 KB
+physical id	: 0
+siblings	: 6
+core id		: 10
+cpu cores	: 4
+apicid		: 20
+initial apicid	: 20
+fpu		: yes
+fpu_exception	: yes
+cpuid level	: 11
+wp		: yes
+flags		: fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good xtopology nonstop_tsc aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm dca sse4_1 sse4_2 popcnt aes lahf_lm ida arat epb dts tpr_shadow vnmi flexpriority ept vpid
+bogomips	: 5333.90
+clflush size	: 64
+cache_alignment	: 64
+address sizes	: 40 bits physical, 48 bits virtual
+power management:
+
+processor	: 4
+vendor_id	: GenuineIntel
+cpu family	: 6
+model		: 44
+model name	: Intel(R) Xeon(R) CPU           E5640  @ 2.67GHz
+stepping	: 2
+cpu MHz		: 1596.000
+cache size	: 12288 KB
+physical id	: 0
+siblings	: 6
+core id		: 0
+cpu cores	: 4
+apicid		: 1
+initial apicid	: 1
+fpu		: yes
+fpu_exception	: yes
+cpuid level	: 11
+wp		: yes
+flags		: fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good xtopology nonstop_tsc aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm dca sse4_1 sse4_2 popcnt aes lahf_lm ida arat epb dts tpr_shadow vnmi flexpriority ept vpid
+bogomips	: 5333.90
+clflush size	: 64
+cache_alignment	: 64
+address sizes	: 40 bits physical, 48 bits virtual
+power management:
+
+processor	: 6
+vendor_id	: GenuineIntel
+cpu family	: 6
+model		: 44
+model name	: Intel(R) Xeon(R) CPU           E5640  @ 2.67GHz
+stepping	: 2
+cpu MHz		: 1596.000
+cache size	: 12288 KB
+physical id	: 0
+siblings	: 6
+core id		: 9
+cpu cores	: 4
+apicid		: 19
+initial apicid	: 19
+fpu		: yes
+fpu_exception	: yes
+cpuid level	: 11
+wp		: yes
+flags		: fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good xtopology nonstop_tsc aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm dca sse4_1 sse4_2 popcnt aes lahf_lm ida arat epb dts tpr_shadow vnmi flexpriority ept vpid
+bogomips	: 5333.90
+clflush size	: 64
+cache_alignment	: 64
+address sizes	: 40 bits physical, 48 bits virtual
+power management:
+
diff --git a/tests/nodeinfodata/linux-nodeinfo-sysfs-test-6/cpu/cpu0/topology/core_id b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-6/cpu/cpu0/topology/core_id
new file mode 100644
index 0000000..573541a
--- /dev/null
+++ b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-6/cpu/cpu0/topology/core_id
@@ -0,0 +1 @@
+0
diff --git a/tests/nodeinfodata/linux-nodeinfo-sysfs-test-6/cpu/cpu0/topology/physical_package_id b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-6/cpu/cpu0/topology/physical_package_id
new file mode 100644
index 0000000..573541a
--- /dev/null
+++ b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-6/cpu/cpu0/topology/physical_package_id
@@ -0,0 +1 @@
+0
diff --git a/tests/nodeinfodata/linux-nodeinfo-sysfs-test-6/cpu/cpu0/topology/thread_siblings b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-6/cpu/cpu0/topology/thread_siblings
new file mode 100644
index 0000000..b4de394
--- /dev/null
+++ b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-6/cpu/cpu0/topology/thread_siblings
@@ -0,0 +1 @@
+11
diff --git a/tests/nodeinfodata/linux-nodeinfo-sysfs-test-6/cpu/cpu1/online b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-6/cpu/cpu1/online
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-6/cpu/cpu1/online
@@ -0,0 +1 @@
+1
diff --git a/tests/nodeinfodata/linux-nodeinfo-sysfs-test-6/cpu/cpu1/topology/core_id b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-6/cpu/cpu1/topology/core_id
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-6/cpu/cpu1/topology/core_id
@@ -0,0 +1 @@
+1
diff --git a/tests/nodeinfodata/linux-nodeinfo-sysfs-test-6/cpu/cpu1/topology/physical_package_id b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-6/cpu/cpu1/topology/physical_package_id
new file mode 100644
index 0000000..573541a
--- /dev/null
+++ b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-6/cpu/cpu1/topology/physical_package_id
@@ -0,0 +1 @@
+0
diff --git a/tests/nodeinfodata/linux-nodeinfo-sysfs-test-6/cpu/cpu1/topology/thread_siblings b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-6/cpu/cpu1/topology/thread_siblings
new file mode 100644
index 0000000..9e22bcb
--- /dev/null
+++ b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-6/cpu/cpu1/topology/thread_siblings
@@ -0,0 +1 @@
+02
diff --git a/tests/nodeinfodata/linux-nodeinfo-sysfs-test-6/cpu/cpu2/online b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-6/cpu/cpu2/online
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-6/cpu/cpu2/online
@@ -0,0 +1 @@
+1
diff --git a/tests/nodeinfodata/linux-nodeinfo-sysfs-test-6/cpu/cpu2/topology/core_id b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-6/cpu/cpu2/topology/core_id
new file mode 100644
index 0000000..ec63514
--- /dev/null
+++ b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-6/cpu/cpu2/topology/core_id
@@ -0,0 +1 @@
+9
diff --git a/tests/nodeinfodata/linux-nodeinfo-sysfs-test-6/cpu/cpu2/topology/physical_package_id b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-6/cpu/cpu2/topology/physical_package_id
new file mode 100644
index 0000000..573541a
--- /dev/null
+++ b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-6/cpu/cpu2/topology/physical_package_id
@@ -0,0 +1 @@
+0
diff --git a/tests/nodeinfodata/linux-nodeinfo-sysfs-test-6/cpu/cpu2/topology/thread_siblings b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-6/cpu/cpu2/topology/thread_siblings
new file mode 100644
index 0000000..c739b42
--- /dev/null
+++ b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-6/cpu/cpu2/topology/thread_siblings
@@ -0,0 +1 @@
+44
diff --git a/tests/nodeinfodata/linux-nodeinfo-sysfs-test-6/cpu/cpu3/online b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-6/cpu/cpu3/online
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-6/cpu/cpu3/online
@@ -0,0 +1 @@
+1
diff --git a/tests/nodeinfodata/linux-nodeinfo-sysfs-test-6/cpu/cpu3/topology/core_id b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-6/cpu/cpu3/topology/core_id
new file mode 100644
index 0000000..f599e28
--- /dev/null
+++ b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-6/cpu/cpu3/topology/core_id
@@ -0,0 +1 @@
+10
diff --git a/tests/nodeinfodata/linux-nodeinfo-sysfs-test-6/cpu/cpu3/topology/physical_package_id b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-6/cpu/cpu3/topology/physical_package_id
new file mode 100644
index 0000000..573541a
--- /dev/null
+++ b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-6/cpu/cpu3/topology/physical_package_id
@@ -0,0 +1 @@
+0
diff --git a/tests/nodeinfodata/linux-nodeinfo-sysfs-test-6/cpu/cpu3/topology/thread_siblings b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-6/cpu/cpu3/topology/thread_siblings
new file mode 100644
index 0000000..adb9de8
--- /dev/null
+++ b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-6/cpu/cpu3/topology/thread_siblings
@@ -0,0 +1 @@
+08
diff --git a/tests/nodeinfodata/linux-nodeinfo-sysfs-test-6/cpu/cpu4/online b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-6/cpu/cpu4/online
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-6/cpu/cpu4/online
@@ -0,0 +1 @@
+1
diff --git a/tests/nodeinfodata/linux-nodeinfo-sysfs-test-6/cpu/cpu4/topology/core_id b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-6/cpu/cpu4/topology/core_id
new file mode 100644
index 0000000..573541a
--- /dev/null
+++ b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-6/cpu/cpu4/topology/core_id
@@ -0,0 +1 @@
+0
diff --git a/tests/nodeinfodata/linux-nodeinfo-sysfs-test-6/cpu/cpu4/topology/physical_package_id b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-6/cpu/cpu4/topology/physical_package_id
new file mode 100644
index 0000000..573541a
--- /dev/null
+++ b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-6/cpu/cpu4/topology/physical_package_id
@@ -0,0 +1 @@
+0
diff --git a/tests/nodeinfodata/linux-nodeinfo-sysfs-test-6/cpu/cpu4/topology/thread_siblings b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-6/cpu/cpu4/topology/thread_siblings
new file mode 100644
index 0000000..b4de394
--- /dev/null
+++ b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-6/cpu/cpu4/topology/thread_siblings
@@ -0,0 +1 @@
+11
diff --git a/tests/nodeinfodata/linux-nodeinfo-sysfs-test-6/cpu/cpu5/online b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-6/cpu/cpu5/online
new file mode 100644
index 0000000..573541a
--- /dev/null
+++ b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-6/cpu/cpu5/online
@@ -0,0 +1 @@
+0
diff --git a/tests/nodeinfodata/linux-nodeinfo-sysfs-test-6/cpu/cpu6/online b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-6/cpu/cpu6/online
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-6/cpu/cpu6/online
@@ -0,0 +1 @@
+1
diff --git a/tests/nodeinfodata/linux-nodeinfo-sysfs-test-6/cpu/cpu6/topology/core_id b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-6/cpu/cpu6/topology/core_id
new file mode 100644
index 0000000..ec63514
--- /dev/null
+++ b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-6/cpu/cpu6/topology/core_id
@@ -0,0 +1 @@
+9
diff --git a/tests/nodeinfodata/linux-nodeinfo-sysfs-test-6/cpu/cpu6/topology/physical_package_id b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-6/cpu/cpu6/topology/physical_package_id
new file mode 100644
index 0000000..573541a
--- /dev/null
+++ b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-6/cpu/cpu6/topology/physical_package_id
@@ -0,0 +1 @@
+0
diff --git a/tests/nodeinfodata/linux-nodeinfo-sysfs-test-6/cpu/cpu6/topology/thread_siblings b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-6/cpu/cpu6/topology/thread_siblings
new file mode 100644
index 0000000..c739b42
--- /dev/null
+++ b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-6/cpu/cpu6/topology/thread_siblings
@@ -0,0 +1 @@
+44
diff --git a/tests/nodeinfodata/linux-nodeinfo-sysfs-test-6/cpu/cpu7/online b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-6/cpu/cpu7/online
new file mode 100644
index 0000000..573541a
--- /dev/null
+++ b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-6/cpu/cpu7/online
@@ -0,0 +1 @@
+0
diff --git a/tests/nodeinfodata/linux-nodeinfo-sysfs-test-6/node/node0/cpu0 b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-6/node/node0/cpu0
new file mode 120000
index 0000000..c841bea
--- /dev/null
+++ b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-6/node/node0/cpu0
@@ -0,0 +1 @@
+../../cpu/cpu0
\ No newline at end of file
diff --git a/tests/nodeinfodata/linux-nodeinfo-sysfs-test-6/node/node0/cpu1 b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-6/node/node0/cpu1
new file mode 120000
index 0000000..5f45362
--- /dev/null
+++ b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-6/node/node0/cpu1
@@ -0,0 +1 @@
+../../cpu/cpu1
\ No newline at end of file
diff --git a/tests/nodeinfodata/linux-nodeinfo-sysfs-test-6/node/node0/cpu2 b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-6/node/node0/cpu2
new file mode 120000
index 0000000..2dcca33
--- /dev/null
+++ b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-6/node/node0/cpu2
@@ -0,0 +1 @@
+../../cpu/cpu2
\ No newline at end of file
diff --git a/tests/nodeinfodata/linux-nodeinfo-sysfs-test-6/node/node0/cpu3 b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-6/node/node0/cpu3
new file mode 120000
index 0000000..c7690e5
--- /dev/null
+++ b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-6/node/node0/cpu3
@@ -0,0 +1 @@
+../../cpu/cpu3
\ No newline at end of file
diff --git a/tests/nodeinfodata/linux-nodeinfo-sysfs-test-6/node/node0/cpu4 b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-6/node/node0/cpu4
new file mode 120000
index 0000000..9e77a64
--- /dev/null
+++ b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-6/node/node0/cpu4
@@ -0,0 +1 @@
+../../cpu/cpu4
\ No newline at end of file
diff --git a/tests/nodeinfodata/linux-nodeinfo-sysfs-test-6/node/node0/cpu5 b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-6/node/node0/cpu5
new file mode 120000
index 0000000..cc07c3b
--- /dev/null
+++ b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-6/node/node0/cpu5
@@ -0,0 +1 @@
+../../cpu/cpu5
\ No newline at end of file
diff --git a/tests/nodeinfodata/linux-nodeinfo-sysfs-test-6/node/node0/cpu6 b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-6/node/node0/cpu6
new file mode 120000
index 0000000..2e75763
--- /dev/null
+++ b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-6/node/node0/cpu6
@@ -0,0 +1 @@
+../../cpu/cpu6
\ No newline at end of file
diff --git a/tests/nodeinfodata/linux-nodeinfo-sysfs-test-6/node/node0/cpu7 b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-6/node/node0/cpu7
new file mode 120000
index 0000000..09e3f79
--- /dev/null
+++ b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-6/node/node0/cpu7
@@ -0,0 +1 @@
+../../cpu/cpu7
\ No newline at end of file
diff --git a/tests/nodeinfodata/linux-nodeinfo-sysfs-test-6/node/node0/meminfo b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-6/node/node0/meminfo
new file mode 100644
index 0000000..8122d41
--- /dev/null
+++ b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-6/node/node0/meminfo
@@ -0,0 +1,29 @@
+
+Node 0 MemTotal:        8379620 kB
+Node 0 MemFree:         2971308 kB
+Node 0 MemUsed:         5408312 kB
+Node 0 Active:          3795016 kB
+Node 0 Inactive:         869528 kB
+Node 0 Active(anon):    3081132 kB
+Node 0 Inactive(anon):    13352 kB
+Node 0 Active(file):     713884 kB
+Node 0 Inactive(file):   856176 kB
+Node 0 Unevictable:       48324 kB
+Node 0 Mlocked:           13580 kB
+Node 0 Dirty:                84 kB
+Node 0 Writeback:             0 kB
+Node 0 FilePages:       1585776 kB
+Node 0 Mapped:           134048 kB
+Node 0 AnonPages:        866116 kB
+Node 0 Shmem:             13512 kB
+Node 0 KernelStack:        3904 kB
+Node 0 PageTables:        40664 kB
+Node 0 NFS_Unstable:          0 kB
+Node 0 Bounce:                0 kB
+Node 0 WritebackTmp:          0 kB
+Node 0 Slab:             244404 kB
+Node 0 SReclaimable:     161784 kB
+Node 0 SUnreclaim:        82620 kB
+Node 0 HugePages_Total:     0
+Node 0 HugePages_Free:      0
+Node 0 HugePages_Surp:      0
diff --git a/tests/nodeinfodata/linux-nodeinfo-sysfs-test-6/node/online b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-6/node/online
new file mode 100644
index 0000000000000000000000000000000000000000..c1da2e294b3f3646e368cc0056986632de06e2cc
GIT binary patch
literal 3
KcmXruVgLXDrvN(u

literal 0
HcmV?d00001

diff --git a/tests/nodeinfodata/linux-nodeinfo-sysfs-test-6/node/possible b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-6/node/possible
new file mode 100644
index 0000000000000000000000000000000000000000..c1da2e294b3f3646e368cc0056986632de06e2cc
GIT binary patch
literal 3
KcmXruVgLXDrvN(u

literal 0
HcmV?d00001

diff --git a/tests/nodeinfotest.c b/tests/nodeinfotest.c
index 346af58..851acd0 100644
--- a/tests/nodeinfotest.c
+++ b/tests/nodeinfotest.c
@@ -130,6 +130,7 @@ mymain(void)
         "nodeinfo-sysfs-test-3",
         "nodeinfo-sysfs-test-4",
         "nodeinfo-sysfs-test-5",
+        "nodeinfo-sysfs-test-6",
 # endif
     };

-- 
1.7.10.4

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]