From patchwork Wed Sep 3 13:36:10 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 199 Return-Path: X-Original-To: u-boot-concept@u-boot.org Delivered-To: u-boot-concept@u-boot.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1756906641; bh=Od/vMCNxMm2v666HNX6bSvEwvoTWDqIBNctzO11GIn8=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=BDErBKwFDD5UaHNoWpPLVhge7pCcFMsjz98rnb5O5PzLTVtLHAWl20H6vrv+AQyi/ qU/DqW6N3olqR30m4GNMuJfruh6YtQR+CkDvXyKZ4LI/ZjEPC5epoUR8ib0g/y7kBp zZcJgG09B0q6cv84oSybiVUxq/0CspTZFnFKWiHMfYysQqutPuh1CXdLpLgRihxSJD en2YValSGEpeuD5bm3xTBY1u+LaGLQVSDRkGnIQiChtfTg3YiOyEPs6zU4PHumBiWB YC+IJ8w+FNYZpYnFV9aiBI21sRG/FmMQFgR/ZbSl8eDxd0G20SgeaZ8BI06wM7ExeX sP/xBynuybQ1A== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 6E715678F3 for ; Wed, 3 Sep 2025 07:37:21 -0600 (MDT) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10024) with ESMTP id CYMZ9udQv6Ey for ; Wed, 3 Sep 2025 07:37:21 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1756906641; bh=Od/vMCNxMm2v666HNX6bSvEwvoTWDqIBNctzO11GIn8=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=BDErBKwFDD5UaHNoWpPLVhge7pCcFMsjz98rnb5O5PzLTVtLHAWl20H6vrv+AQyi/ qU/DqW6N3olqR30m4GNMuJfruh6YtQR+CkDvXyKZ4LI/ZjEPC5epoUR8ib0g/y7kBp zZcJgG09B0q6cv84oSybiVUxq/0CspTZFnFKWiHMfYysQqutPuh1CXdLpLgRihxSJD en2YValSGEpeuD5bm3xTBY1u+LaGLQVSDRkGnIQiChtfTg3YiOyEPs6zU4PHumBiWB YC+IJ8w+FNYZpYnFV9aiBI21sRG/FmMQFgR/ZbSl8eDxd0G20SgeaZ8BI06wM7ExeX sP/xBynuybQ1A== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 5E8AB678B2 for ; Wed, 3 Sep 2025 07:37:21 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1756906639; bh=oujV4Wdarb/LcD4MJx7hyMvq8RdM1LBSDS4YFhQfcQo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=D3o9+BJVKq7C4YQ30TXC385g/EHObmgR1X/mVYvuPVvZrxEgylL+bgrxeTOyXh6hD XLtjGhGSL+dED2Q1hH4wU4owoRbr7Ew80B7G2Ri7jxjnBEz3vROYheu5O20Nye2aQH WQufd6S6ITr6wmnIp1LZwILGr/YP9zDEKVS4kigjIJTonJ0jrvW4mMedfJ3dSP1uBh 0ennNlnzX4hJ7cJ4YVTkVmAMUmfrymIn/eUnvk+X74BesZOFft0JTa+WNu+fMsFvgR yLd9xZDnsrXBR3NhBCvYKi2i1foGoKI1rSHJ5Q9S+XieFupZujntU+gDEJQBg26oBL 75XYhZpKm1koQ== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 002DE6789D; Wed, 3 Sep 2025 07:37:19 -0600 (MDT) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10026) with ESMTP id GC3YGlKFFQaL; Wed, 3 Sep 2025 07:37:18 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1756906637; bh=2nPembUlNDweJuZc6gBTxMuYBSltDnci4hFbNql2BcI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=VPTOvH5/xZE91t9U8j6u5iKyi1URdWp8cw6ixLyR4IJtw9Pls/w+/+qUkudL27SGr spc3/t9SZhQOzvswO4eJiQ5fGmRYUaFv2tyfrC1VyxbrgVCGtkJN9+aaFlJs6HJJr1 MtVCZeSlNYtNRimiD2bQCeE9rSqzOVecwSPqrx12jdYqwcgrPLHYgiXuY8iF22fgKG 04lhu8BzBy+QReHmwn7R1AYM6YEPx6cqyM5rjXzULho3VE4MushCupsLSzefIRcg7D uDrD4HwrVCORku3wHkoU7c8CCnsnH72f/kLArCy2FkgmirY4uQ3QddA8Aj+Cva+STq ZJ92jzT6iMfFw== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 0C3A15FE1B; Wed, 3 Sep 2025 07:37:16 -0600 (MDT) From: Simon Glass To: U-Boot Concept Date: Wed, 3 Sep 2025 07:36:10 -0600 Message-ID: <20250903133639.3235920-11-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250903133639.3235920-1-sjg@u-boot.org> References: <20250903133639.3235920-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: 3ADIMCMBHBDH2JJPAJUCYAE72MOT6OBY X-Message-ID-Hash: 3ADIMCMBHBDH2JJPAJUCYAE72MOT6OBY X-MailFrom: sjg@u-boot.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Simon Glass , Claude X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH 10/25] test: Add more SMBIOS data to sandbox List-Id: Discussion and patches related to U-Boot Concept Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Simon Glass Some common smbios settings are not included with sandbox. Add these to test.dts so the data is more meaningful. Update smbios tests to match the new devicetree values. Co-developed-by: Claude Signed-off-by: Simon Glass --- arch/sandbox/dts/test.dts | 24 ++++++++++++++++++++++++ test/cmd/smbios.c | 20 ++++++++++---------- test/py/tests/test_smbios.py | 2 +- 3 files changed, 35 insertions(+), 11 deletions(-) diff --git a/arch/sandbox/dts/test.dts b/arch/sandbox/dts/test.dts index 1783a21894a..b79f06ce0fe 100644 --- a/arch/sandbox/dts/test.dts +++ b/arch/sandbox/dts/test.dts @@ -1938,6 +1938,30 @@ sysinfo { compatible = "sandbox,sysinfo-sandbox"; + + smbios { + /* Type 1 table */ + system { + manufacturer = "Sandbox Corp"; + product = "Sandbox Computer"; + version = "1.0"; + serial = "SB12345678"; + sku = "SANDBOX-SKU"; + family = "Sandbox_Family"; + }; + + /* Type 2 table */ + baseboard { + manufacturer = "Sandbox Boards"; + product = "Sandbox Motherboard"; + asset-tag = "SB-ASSET-001"; + }; + + /* Type 3 table */ + chassis { + manufacturer = "Sandbox Chassis Inc"; + }; + }; }; sysinfo-gpio { diff --git a/test/cmd/smbios.c b/test/cmd/smbios.c index e8ed38af2ed..69596dd1c45 100644 --- a/test/cmd/smbios.c +++ b/test/cmd/smbios.c @@ -43,22 +43,22 @@ static int cmd_smbios_test(struct unit_test_state *uts) ut_assert_nextline_empty(); ut_assert_nextlinen("Handle 0x0001, DMI type 1, 27 bytes at"); ut_assert_nextline("System Information"); - ut_assert_nextline("\tManufacturer: sandbox"); - ut_assert_nextline("\tProduct Name: sandbox"); - ut_assert_nextline("\tVersion: "); - ut_assert_nextline("\tSerial Number: "); + ut_assert_nextline("\tManufacturer: Sandbox Corp"); + ut_assert_nextline("\tProduct Name: Sandbox Computer"); + ut_assert_nextline("\tVersion: 1.0"); + ut_assert_nextline("\tSerial Number: SB12345678"); ut_assert_nextline("\tUUID: 00000000-0000-0000-0000-000000000000"); ut_assert_nextline("\tWake-up Type: Unknown"); - ut_assert_nextline("\tSKU Number: "); - ut_assert_nextline("\tFamily: "); + ut_assert_nextline("\tSKU Number: SANDBOX-SKU"); + ut_assert_nextline("\tFamily: Sandbox_Family"); ut_assert_nextline_empty(); ut_assert_nextlinen("Handle 0x0002, DMI type 2, 15 bytes at"); ut_assert_nextline("Baseboard Information"); - ut_assert_nextline("\tManufacturer: sandbox"); - ut_assert_nextline("\tProduct Name: sandbox"); + ut_assert_nextline("\tManufacturer: Sandbox Boards"); + ut_assert_nextline("\tProduct Name: Sandbox Motherboard"); ut_assert_nextline("\tVersion: "); ut_assert_nextline("\tSerial Number: "); - ut_assert_nextline("\tAsset Tag: "); + ut_assert_nextline("\tAsset Tag: SB-ASSET-001"); ut_assert_nextline("\tFeature Flags: 0x00"); ut_assert_nextline("\tChassis Location: "); ut_assert_nextline("\tChassis Handle: 0x0003"); @@ -67,7 +67,7 @@ static int cmd_smbios_test(struct unit_test_state *uts) ut_assert_nextline_empty(); ut_assert_nextlinen("Handle 0x0003, DMI type 3, 22 bytes at"); ut_assert_nextline("Baseboard Information"); - ut_assert_nextline("\tManufacturer: "); + ut_assert_nextline("\tManufacturer: Sandbox Chassis Inc"); ut_assert_nextline("\tType: 0x02"); ut_assert_nextline("\tVersion: "); ut_assert_nextline("\tSerial Number: "); diff --git a/test/py/tests/test_smbios.py b/test/py/tests/test_smbios.py index 3b85a7cc661..eea2c934893 100644 --- a/test/py/tests/test_smbios.py +++ b/test/py/tests/test_smbios.py @@ -34,7 +34,7 @@ def test_cmd_smbios_sandbox(ubman): assert 'DMI type 0,' in output assert 'Vendor: U-Boot' in output assert 'DMI type 1,' in output - assert 'Manufacturer: sandbox' in output + assert 'Manufacturer: Sandbox Corp' in output assert 'DMI type 2,' in output assert 'DMI type 3,' in output assert 'DMI type 4,' in output