[PATCH 3/5] tests: Add HPE Apollo test case to sysinfotest

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

 



Introduce a test case for sysinfotest. The data was obtained by
running dmidecode as libvirt would run it:

   dmidecode -q -t 0,1,2,3,4,11,17

Now, the expected output fits almost perfectly, except for OEM
strings where the third string looks nothing like in the
dmidecode output. This is because of testDMIDecodeDryRun() which
overwrites the third OEM string (see v6.5.0-rc1~214 for more
info). But that's okay for now.

Speaking of OEM strings, it's worth noticing two 'OEM Strings'
sections in the dmidecode output. This is causing some troubles
and will be fixed in next commit.

Signed-off-by: Michal Privoznik <mprivozn@xxxxxxxxxx>
---
 .../aarch64-hpe-apollosysinfo.data            | 162 ++++++++++++++++++
 .../aarch64-hpe-apollosysinfo.expect          |  90 ++++++++++
 tests/sysinfotest.c                           |   1 +
 3 files changed, 253 insertions(+)
 create mode 100644 tests/sysinfodata/aarch64-hpe-apollosysinfo.data
 create mode 100644 tests/sysinfodata/aarch64-hpe-apollosysinfo.expect

diff --git a/tests/sysinfodata/aarch64-hpe-apollosysinfo.data b/tests/sysinfodata/aarch64-hpe-apollosysinfo.data
new file mode 100644
index 0000000000..769373f2ce
--- /dev/null
+++ b/tests/sysinfodata/aarch64-hpe-apollosysinfo.data
@@ -0,0 +1,162 @@
+BIOS Information
+	Vendor: EDK II
+	Version: L50_5.13_1.11
+	Release Date: 06/18/2019
+	Address: 0xF0000
+	Runtime Size: 64 kB
+	ROM Size: 64 MB
+	Characteristics:
+		PCI is supported
+		BIOS is upgradeable
+		BIOS shadowing is allowed
+		Boot from CD is supported
+		Selectable boot is supported
+		BIOS ROM is socketed
+		ACPI is supported
+		BIOS boot specification is supported
+		Targeted content distribution is supported
+		UEFI is supported
+	BIOS Revision: 7.2
+
+System Information
+	Manufacturer: HPE
+	Product Name: Apollo 70             
+	Version: X1
+	Serial Number: 0000000000
+	UUID: 69d9c240-bfde-1000-03ca-ea3db8730904
+	Wake-up Type: Power Switch
+	SKU Number: P00367-B21
+	Family: CN99XX
+
+Base Board Information
+	Manufacturer: HPE
+	Product Name: C01_APACHE_MB         
+	Version: 876453-001
+	Serial Number: PWJBD0AR9BI016
+	Asset Tag: PWJBD0AR9BI016
+	Features:
+		Board is a hosting board
+		Board is replaceable
+	Location In Chassis: Default string
+	Type: Motherboard
+
+Chassis Information
+	Manufacturer: HPE
+	Type: Rack Mount Chassis
+	Lock: Not Present
+	Version: P00367-B21
+	Serial Number: 0000000000
+	Asset Tag: 0000000000
+	Boot-up State: Safe
+	Power Supply State: Safe
+	Thermal State: Safe
+	Security Status: None
+	OEM Information: 0x00000000
+	Height: Unspecified
+	Number Of Power Cords: 1
+	Contained Elements: 0
+	SKU Number: Default string
+
+OEM Strings
+	String 1: Default string
+
+OEM Strings
+	String 1: ThunderX2 System
+	String 2: cavium.com
+	String 3: Comanche
+
+Processor Information
+	Socket Designation: Socket 0
+	Type: Central Processor
+	Family: ARM
+	Manufacturer: Cavium Inc.
+	Signature: Implementor 0x43, Variant 0x1, Architecture 15, Part 0x0af, Revision 1
+	Version: Cavium ThunderX2(R) CPU CN9975 v2.1 @ 2.0GHz
+	Voltage: 0.8 V
+	External Clock: 33 MHz
+	Max Speed: 2500 MHz
+	Current Speed: 2000 MHz
+	Status: Populated, Enabled
+	Upgrade: Other
+	Serial Number: 0000115D-1AEA3248
+	Asset Tag: Not Specified
+	Part Number: CN9975-2000LG4077-Y21-G
+	Core Count: 28
+	Core Enabled: 28
+	Thread Count: 112
+	Characteristics:
+		64-bit capable
+		Multi-Core
+		Hardware Thread
+		Execute Protection
+		Enhanced Virtualization
+		Power/Performance Control
+
+Memory Device
+	Total Width: 72 bits
+	Data Width: 64 bits
+	Size: 16 GB
+	Form Factor: DIMM
+	Set: None
+	Locator: DIMM_A0
+	Bank Locator: N0
+	Type: DDR4
+	Type Detail: Registered (Buffered)
+	Speed: 2666 MT/s
+	Manufacturer: Hyundai Electronics
+	Serial Number: 1112731123
+	Asset Tag: Not Specified
+	Part Number: HMA82GR7CJR8N-VK    
+	Rank: 2
+	Configured Memory Speed: 2666 MT/s
+	Minimum Voltage: 1.2 V
+	Maximum Voltage: 1.2 V
+	Configured Voltage: 1.2 V
+
+Processor Information
+	Socket Designation: Socket 1
+	Type: Central Processor
+	Family: ARM
+	Manufacturer: Cavium Inc.
+	Signature: Implementor 0x43, Variant 0x1, Architecture 15, Part 0x0af, Revision 1
+	Version: Cavium ThunderX2(R) CPU CN9975 v2.1 @ 2.0GHz
+	Voltage: 0.8 V
+	External Clock: 33 MHz
+	Max Speed: 2500 MHz
+	Current Speed: 2000 MHz
+	Status: Populated, Enabled
+	Upgrade: Other
+	Serial Number: 0000115D-2AEA322B
+	Asset Tag: Not Specified
+	Part Number: CN9975-2000LG4077-Y21-G
+	Core Count: 28
+	Core Enabled: 28
+	Thread Count: 112
+	Characteristics:
+		64-bit capable
+		Multi-Core
+		Hardware Thread
+		Execute Protection
+		Enhanced Virtualization
+		Power/Performance Control
+
+Memory Device
+	Total Width: 72 bits
+	Data Width: 64 bits
+	Size: 16 GB
+	Form Factor: DIMM
+	Set: None
+	Locator: DIMM_I0
+	Bank Locator: N1
+	Type: DDR4
+	Type Detail: Registered (Buffered)
+	Speed: 2666 MT/s
+	Manufacturer: Hyundai Electronics
+	Serial Number: 1112731032
+	Asset Tag: Not Specified
+	Part Number: HMA82GR7CJR8N-VK    
+	Rank: 2
+	Configured Memory Speed: 2666 MT/s
+	Minimum Voltage: 1.2 V
+	Maximum Voltage: 1.2 V
+	Configured Voltage: 1.2 V
diff --git a/tests/sysinfodata/aarch64-hpe-apollosysinfo.expect b/tests/sysinfodata/aarch64-hpe-apollosysinfo.expect
new file mode 100644
index 0000000000..331454834d
--- /dev/null
+++ b/tests/sysinfodata/aarch64-hpe-apollosysinfo.expect
@@ -0,0 +1,90 @@
+<sysinfo type='smbios'>
+  <bios>
+    <entry name='vendor'>EDK II</entry>
+    <entry name='version'>L50_5.13_1.11</entry>
+    <entry name='date'>06/18/2019</entry>
+    <entry name='release'>7.2</entry>
+  </bios>
+  <system>
+    <entry name='manufacturer'>HPE</entry>
+    <entry name='product'>Apollo 70</entry>
+    <entry name='version'>X1</entry>
+    <entry name='serial'>0000000000</entry>
+    <entry name='uuid'>69d9c240-bfde-1000-03ca-ea3db8730904</entry>
+    <entry name='sku'>P00367-B21</entry>
+    <entry name='family'>CN99XX</entry>
+  </system>
+  <baseBoard>
+    <entry name='manufacturer'>HPE</entry>
+    <entry name='product'>C01_APACHE_MB</entry>
+    <entry name='version'>876453-001</entry>
+    <entry name='serial'>PWJBD0AR9BI016</entry>
+    <entry name='asset'>PWJBD0AR9BI016</entry>
+    <entry name='location'>Default string</entry>
+  </baseBoard>
+  <chassis>
+    <entry name='manufacturer'>HPE</entry>
+    <entry name='version'>P00367-B21</entry>
+    <entry name='serial'>0000000000</entry>
+    <entry name='asset'>0000000000</entry>
+    <entry name='sku'>Default string</entry>
+  </chassis>
+  <processor>
+    <entry name='socket_destination'>Socket 0</entry>
+    <entry name='type'>Central Processor</entry>
+    <entry name='family'>ARM</entry>
+    <entry name='manufacturer'>Cavium Inc.</entry>
+    <entry name='signature'>Implementor 0x43, Variant 0x1, Architecture 15, Part 0x0af, Revision 1</entry>
+    <entry name='version'>Cavium ThunderX2(R) CPU CN9975 v2.1 @ 2.0GHz</entry>
+    <entry name='external_clock'>33 MHz</entry>
+    <entry name='max_speed'>2500 MHz</entry>
+    <entry name='status'>Populated, Enabled</entry>
+    <entry name='serial_number'>0000115D-1AEA3248</entry>
+    <entry name='part_number'>CN9975-2000LG4077-Y21-G</entry>
+  </processor>
+  <processor>
+    <entry name='socket_destination'>Socket 1</entry>
+    <entry name='type'>Central Processor</entry>
+    <entry name='family'>ARM</entry>
+    <entry name='manufacturer'>Cavium Inc.</entry>
+    <entry name='signature'>Implementor 0x43, Variant 0x1, Architecture 15, Part 0x0af, Revision 1</entry>
+    <entry name='version'>Cavium ThunderX2(R) CPU CN9975 v2.1 @ 2.0GHz</entry>
+    <entry name='external_clock'>33 MHz</entry>
+    <entry name='max_speed'>2500 MHz</entry>
+    <entry name='status'>Populated, Enabled</entry>
+    <entry name='serial_number'>0000115D-2AEA322B</entry>
+    <entry name='part_number'>CN9975-2000LG4077-Y21-G</entry>
+  </processor>
+  <memory_device>
+    <entry name='size'>16 GB</entry>
+    <entry name='form_factor'>DIMM</entry>
+    <entry name='locator'>DIMM_A0</entry>
+    <entry name='bank_locator'>N0</entry>
+    <entry name='type'>DDR4</entry>
+    <entry name='type_detail'>Registered (Buffered)</entry>
+    <entry name='speed'>2666 MT/s</entry>
+    <entry name='manufacturer'>Hyundai Electronics</entry>
+    <entry name='serial_number'>1112731123</entry>
+    <entry name='part_number'>HMA82GR7CJR8N-VK</entry>
+  </memory_device>
+  <memory_device>
+    <entry name='size'>16 GB</entry>
+    <entry name='form_factor'>DIMM</entry>
+    <entry name='locator'>DIMM_I0</entry>
+    <entry name='bank_locator'>N1</entry>
+    <entry name='type'>DDR4</entry>
+    <entry name='type_detail'>Registered (Buffered)</entry>
+    <entry name='speed'>2666 MT/s</entry>
+    <entry name='manufacturer'>Hyundai Electronics</entry>
+    <entry name='serial_number'>1112731032</entry>
+    <entry name='part_number'>HMA82GR7CJR8N-VK</entry>
+  </memory_device>
+  <oemStrings>
+    <entry>Default string</entry>
+    <entry>ThunderX2 System</entry>
+    <entry>Ha ha ha try parsing\n
+      String 3: this correctly
+      String 4:then</entry>
+    <entry>Comanche</entry>
+  </oemStrings>
+</sysinfo>
diff --git a/tests/sysinfotest.c b/tests/sysinfotest.c
index 09cfe6fa45..d8bd1f38ba 100644
--- a/tests/sysinfotest.c
+++ b/tests/sysinfotest.c
@@ -141,6 +141,7 @@ mymain(void)
     TEST("aarch64", virSysinfoReadARM);
     TEST("aarch64-moonshot", virSysinfoReadARM);
     TEST("aarch64-gigabyte", virSysinfoReadARM);
+    TEST("aarch64-hpe-apollo", virSysinfoReadARM);
 
     return ret;
 }
-- 
2.44.2




[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]

  Powered by Linux