From nobody Thu Sep 19 01:14:11 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1721311819018851.8501090231932; Thu, 18 Jul 2024 07:10:19 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 996) id E9436A0F; Thu, 18 Jul 2024 10:10:17 -0400 (EDT) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id A62FEA0E; Thu, 18 Jul 2024 10:08:30 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 4A1EFABA; Thu, 18 Jul 2024 10:08:25 -0400 (EDT) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id 5C7C3A02 for ; Thu, 18 Jul 2024 10:08:18 -0400 (EDT) Received: from mx-prod-mc-02.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-633-S-Yin-4sPU2FHHmlB3q8Og-1; Thu, 18 Jul 2024 10:08:16 -0400 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 336FA1955D62 for ; Thu, 18 Jul 2024 14:08:14 +0000 (UTC) Received: from maggie.brq.redhat.com (unknown [10.43.3.102]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 78C6C1955E80 for ; Thu, 18 Jul 2024 14:08:13 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on lists.libvirt.org X-Spam-Level: ** X-Spam-Status: No, score=2.8 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,RCVD_IN_SBL_CSS,SPF_HELO_NONE autolearn=no autolearn_force=no version=3.4.4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1721311697; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=uy41mL6DCvJAfiOaQ+iXcZC5HK/Xm7WMuF23GmnPP/0=; b=RthAWMUEIrSwiWcLXSxjV5ifrvKNDTmds5kNBpJ9yGFkbquoUaZV28TQwfKR5KvrHJh7CQ EI+Imfmn4ROwfnSmVdRR8nk9+/x1QdrOb0mF//MNLQcTEyBVpFfQ9R3uOTO4PGcjVVg8GQ +Azg2zJJDT2gsYq8sDRdEApoC1dOa8E= X-MC-Unique: S-Yin-4sPU2FHHmlB3q8Og-1 From: Michal Privoznik To: devel@lists.libvirt.org Subject: [PATCH 3/5] tests: Add HPE Apollo test case to sysinfotest Date: Thu, 18 Jul 2024 16:08:05 +0200 Message-ID: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: JIGBACJOQ7URYCB7XVTRZNFUA6IMK7ZV X-Message-ID-Hash: JIGBACJOQ7URYCB7XVTRZNFUA6IMK7ZV X-MailFrom: mprivozn@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-config-1; header-match-config-2; header-match-config-3; header-match-devel.lists.libvirt.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header X-Mailman-Version: 3.2.2 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1721311820374116600 Content-Type: text/plain; charset="utf-8"; x-default="true" 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 --- .../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/sysin= fodata/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 =20 + 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 =20 + 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, Re= vision 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 =20 + 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, Re= vision 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 =20 + 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/sys= infodata/aarch64-hpe-apollosysinfo.expect new file mode 100644 index 0000000000..331454834d --- /dev/null +++ b/tests/sysinfodata/aarch64-hpe-apollosysinfo.expect @@ -0,0 +1,90 @@ + + + EDK II + L50_5.13_1.11 + 06/18/2019 + 7.2 + + + HPE + Apollo 70 + X1 + 0000000000 + 69d9c240-bfde-1000-03ca-ea3db8730904 + P00367-B21 + CN99XX + + + HPE + C01_APACHE_MB + 876453-001 + PWJBD0AR9BI016 + PWJBD0AR9BI016 + Default string + + + HPE + P00367-B21 + 0000000000 + 0000000000 + Default string + + + Socket 0 + Central Processor + ARM + Cavium Inc. + Implementor 0x43, Variant 0x1, Architecture = 15, Part 0x0af, Revision 1 + Cavium ThunderX2(R) CPU CN9975 v2.1 @ 2.0GHz + 33 MHz + 2500 MHz + Populated, Enabled + 0000115D-1AEA3248 + CN9975-2000LG4077-Y21-G + + + Socket 1 + Central Processor + ARM + Cavium Inc. + Implementor 0x43, Variant 0x1, Architecture = 15, Part 0x0af, Revision 1 + Cavium ThunderX2(R) CPU CN9975 v2.1 @ 2.0GHz + 33 MHz + 2500 MHz + Populated, Enabled + 0000115D-2AEA322B + CN9975-2000LG4077-Y21-G + + + 16 GB + DIMM + DIMM_A0 + N0 + DDR4 + Registered (Buffered) + 2666 MT/s + Hyundai Electronics + 1112731123 + HMA82GR7CJR8N-VK + + + 16 GB + DIMM + DIMM_I0 + N1 + DDR4 + Registered (Buffered) + 2666 MT/s + Hyundai Electronics + 1112731032 + HMA82GR7CJR8N-VK + + + Default string + ThunderX2 System + Ha ha ha try parsing\n + String 3: this correctly + String 4:then + Comanche + + 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); =20 return ret; } --=20 2.44.2